i try to convert my EA mql4 to mql5
ObjectSetText
You may use ObjectSetString instead.
If you are too lazy to recode... copy and paste in your code.
void ObjectSetText(long chart_id, string obj_name, string text, int font_size, string font, color clr) { ObjectSetString(chart_id,obj_name,OBJPROP_TEXT,text); ObjectSetString(chart_id,obj_name,OBJPROP_FONT,font); ObjectSetInteger(chart_id,obj_name,OBJPROP_FONTSIZE,font_size); ObjectSetInteger(chart_id,obj_name,OBJPROP_COLOR,clr); }
@Fabio Cavalloni thanks so much not exist a library with this equivalent function?
and example if i want change this
void OnTick() { if(OnOffChiusuraAuto==1) { for (int ij = 0; ij < OrdersTotal(); ij++) { if( OrderSelect( ij, SELECT_BY_POS, MODE_TRADES ) == false ) { Print("ERROR - Unable to select the order - ",GetLastError()); break; }
i notice orderselct in mql5 have only ticket , is possible use in this context ? thanks
I strongely suggest you to use CTrade class approach, read this article as a reference.
- www.mql5.com
Hi guys how can convert in mql5 this part of code ?
ObjectSetText not exist what i must use in alternative ? thanks