creating obj_text in the lower right corner.

 

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).  

 

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.

 
I mean, when I move by graphic, roll back in the past, the OBJ_TEXT will stay where I created it. 
 
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.
Reason: