Array on chart

Back to topics list To post a new topic, please log in or register
avatar
63
Route206 2015.06.24 11:10
 

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?

avatar
Moderator
3423
GumRai 2015.06.24 11:38 #
 
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

avatar
76
Paul_B 2015.06.24 11:51 #
 

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

 

avatar
63
Route206 2015.06.24 12:15 #
 
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);

 

avatar
63
Route206 2015.06.24 12:16 #
 
Paul_B:

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

 

 

smart - i'll try that first!
Back to topics list  

To add comments, please log in or register