Array on chart

 

Hello

is there an easy way to get an Array[27][4] on a chart for real-time monitoring?

I was well under way with Comment() but ran into a maximum. The idea is to show these variables and also to have some headers. Ideally negative values in red etc. but definitely in the category 'nice to have'.

also tried with ObjectCreate() and ObjectSetText() but the latter didn't take variables. 

Ideally there is some ready made code out there.... Any suggestions?

 
Route206:


also tried with ObjectCreate() and ObjectSetText() but the latter didn't take variables. 

 Show the code you have used

 ObjectSetText() can be used with a string variable as the text

 

Use nested https://docs.mql4.com/strings/stringconcatenate to get past the maximum limitation. For example:

 

string text;

for(int i=0; i<=26; i++)
{
   text=StringConcatenate(text,Array[i][0]," ",Array[i][1]," ",Array[i][2]," ",Array[i][3],"\n");
}

Comment(text);
 
GumRai:

 Show the code you have used

 ObjectSetText() can be used with a string variable as the text

  ObjectCreate("ObjName", OBJ_LABEL, 0, 0, 0);
  ObjectSetText("ObjName",("00.00      07.00      FOREX       W/V     Max\n",k0,"    ",k1,"    ",inst,"     ",wv,"      ",max),10, "Verdana", Green);
  ObjectSet("ObjName", OBJPROP_CORNER, 3);
  ObjectSet("ObjName", OBJPROP_XDISTANCE, 100);
  ObjectSet("ObjName", OBJPROP_YDISTANCE, 20);

 

 
Paul_B:

Use nested https://docs.mql4.com/strings/stringconcatenate to get past the maximum limitation. For example:

 

 

smart - i'll try that first!
Reason: