creating obj_text in the lower right corner.

Back to topics list To post a new topic, please log in or register
avatar
11
jkmaks 2016.04.07 10:15
 

I know how to create a obj_text and then attach it to the bar:

 

      ObjectCreate("z1", OBJ_TEXT, 0, X_TopRight(), Y_TopRight2());

      ObjectSetText("z1", "z", 14, "Times New Roman", Maroon);

      ObjectSet("z1", OBJPROP_TIMEFRAMES, OBJ_PERIOD_M1);      

 

datetime X_TopRight(int fidge)

   {     

      return (Time[fidge - 10]);

   }


double Y_TopRight() 

   {

      double   top=WindowPriceMax();

      double   bottom=WindowPriceMin();

      

      return (top - 0.8*(top-bottom)); 

   }

    

But is there way to create an OBJ_TEXT and put it to the right corner (not depending on the bar)??

Of course OBJ_TEXT will stay where it appeared (and won't behave like OBJ_LABEL).  

avatar
Moderator
3412
GumRai 2016.04.07 10:48 #
 

Of course OBJ_TEXT will stay where it appeared (and won't behave like OBJ_LABEL). 

You have it the wrong way round.

Use an OBJ_LABEL with x and y co-ordinates and it will stay where you put it.

avatar
11
jkmaks 2016.04.07 16:22 #
 
I mean, when I move by graphic, roll back in the past, the OBJ_TEXT will stay where I created it. 
avatar
12992
WHRoeder 2016.04.07 17:56 #
 
jkmaks: I mean, when I move by graphic, roll back in the past, the OBJ_TEXT will stay where I created it. 

Asked and answered
GumRai: Use an OBJ_LABEL with x and y co-ordinates and it will stay where you put it.
Back to topics list  

To add comments, please log in or register