Hello.
Attach here your source code please to let us solve the problem.
Hello.
Attach here your source code please to let us solve the problem.
Here:
//+------------------------------------------------------------------+ //| Create a text label | //+------------------------------------------------------------------+ bool LabelCreate(const long chart_ID=0, // chart's ID const string name="Label", // label name const int sub_window=0, // subwindow index const int x=0, // X coordinate const int y=0, // Y coordinate const ENUM_BASE_CORNER corner=CORNER_LEFT_UPPER, // chart corner for anchoring const string text="Label", // text const string font="Arial", // font const int font_size=8, // font size const color clr=clrWhite, // color const double angle=0.0, // text slope const ENUM_ANCHOR_POINT anchor=ANCHOR_LEFT_UPPER, // anchor type const bool back=false, // in the background const bool selection=false, // highlight to move const bool hidden=true, // hidden in the object list const string tooltip="\n", // sets the tooltip const long z_order=0) // priority for mouse click
{ string namep = "Lbl_prm_"+IntegerToString(i); string namev = "Lbl_val_"+IntegerToString(i); LabelCreate(0,namep,0,paramsX,locationY,CORNER_LEFT_UPPER,m_DynamicInfoParams[i]); LabelCreate(0,namev,0,valuesX,locationY,CORNER_LEFT_UPPER,""); locationY+=12; } LabelCreate(0,"Lbl_pos_0",0,350, 0,CORNER_LEFT_UPPER,"","Ariel",10); LabelCreate(0,"Lbl_pos_1",0,350,15,CORNER_LEFT_UPPER,"","Ariel",10); LabelCreate(0,"Lbl_pos_2",0,350,29,CORNER_LEFT_UPPER,"","Ariel",10);
Please attach entire file. There are some mistakes in compilation of code you wrote.
I keep getting this error message when trying to test my EA:
LabelCreate: failed to create text label! Error code = 4200
Any idea how to fix this?
That error id show that the object already exists
4200 |
ERR_OBJECT_ALREADY_EXISTS |
You can add this command :
if ( ObjectFind(0,"Lbl_pos_0") < 0 ) LabelCreate(0,"Lbl_pos_0",0,350, 0,CORNER_LEFT_UPPER,"","Ariel",10); if ( ObjectFind(0,"Lbl_pos_1") < 0 ) LabelCreate(0,"Lbl_pos_1",0,350,15,CORNER_LEFT_UPPER,"","Ariel",10); if ( ObjectFind(0,"Lbl_pos_2") < 0 ) LabelCreate(0,"Lbl_pos_2",0,350,29,CORNER_LEFT_UPPER,"","Ariel",10);
But I also wonder, do you mistype the font name "Ariel" ? I think the font name is "Arial".
You can add this command :
But I also wonder, do you mistype the font name "Ariel" ? I think the font name is "Arial".
Enter for me AUDUSD,H4: LabelCreate: failed to create text label! Error code = 4200

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I keep getting this error message when trying to test my EA:
LabelCreate: failed to create text label! Error code = 4200
Any idea how to fix this?