Adding text at the last bar on the chart

To add comments, please log in or register
Antony Augustine
2885
Antony Augustine  

Hi,

I am trying to add text at the last bar on the chart.

Is it possible?

Any suggestions?

Antony

Simon Gniadkowski
17644
Simon Gniadkowski  
Antony:

Hi,

I am trying to add text at the last bar on the chart.

Is it possible?

Any suggestions?

Yes,  use a Text object.
Antony Augustine
2885
Antony Augustine  

Thank you.

I have coded like this, 

   ObjectCreate("100_text", OBJ_TEXT, 0, Time[0], Close[0]);
   ObjectSetText("100_text","Up...",12);
   ObjectSet("100_text",OBJPROP_TIME1,Time[0]);
   ObjectSet("100_text",OBJPROP_PRICE1, Close[0]);
   ObjectSet("100_text",OBJPROP_COLOR,Green); 

But it's not moving to last bar when new bar comes.

Any solution?

Thanks again for your suggestion.

Thanks!!

Antony 

Email ID: antony.theruvil@gmail.com 

Simon Gniadkowski
17644
Simon Gniadkowski  
Antony:

Thank you.

I have coded like this, 

   ObjectCreate("100_text", OBJ_TEXT, 0, Time[0], Close[0]);
   ObjectSetText("100_text","Up...",12);
   ObjectSet("100_text",OBJPROP_TIME1,Time[0]);
   ObjectSet("100_text",OBJPROP_PRICE1, Close[0]);
   ObjectSet("100_text",OBJPROP_COLOR,Green); 

But it's not moving to last bar when new bar comes.

Any solution? 

You may want to remove your email address from your post unless you like SPAM,  this Forum is open to anyone to read.

When a new bar arrives, not for every tick,  you move the Object,  use ObjectSet()  to change it's position. 

To add comments, please log in or register