Download MetaTrader 5

why can't display text

To add comments, please log in or register
wslwhd
40
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?

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
29867
Alain Verleyen  

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
29867
Alain Verleyen  
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