why can't display text

 

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);
 
  } 
 

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.


 
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 ?
Reason: