Download MetaTrader 5

why can't display text

To add comments, please log in or register
Have you just installed MetaTrader 5? Learn it in details!
wslwhd
40
wslwhd 2014.04.27 14:55 

i want to write text diaplayed on the main chart just below the k line .i read the help document and write the script code below but failed to display text. can anyone tell me how to solve this problem?

void OnStart()
  { 
   ObjectCreate(1,"j",0,OBJ_TEXT,Time[1],Open[1]);
   ObjectSetString(1,"j",OBJPROP_TEXT,"text");
   ObjectSetInteger(1,"j",OBJPROP_COLOR,clrRed);
 
  } 
Alain Verleyen
Moderator
30707
Alain Verleyen 2014.04.27 16:56  

Forum on trading, automated trading systems and testing trading strategies


Hello,

Please use the SRC button when you post code. Thank you.


This time, I edited it for you.


Alain Verleyen
Moderator
30707
Alain Verleyen 2014.04.27 16:59  
wslwhd:

i want to write text diaplayed on the main chart just below the k line .i read the help document and write the script code below but failed to display text. can anyone tell me how to solve this problem?

Please read the documentation again :

chart_id

[in]  Chart identifier. 0 means the current chart.

What chart is 1 ?
To add comments, please log in or register