When you post code please use the CODE button (Alt-S)!
don't do this
ObjectDelete( "InfoPanel");
because it's bad code... you should use ObjectFind instead to see if it already exists
neither is this correct as it should be
ObjectDelete(0, "InfoPanel");
Sorry but any non-programmer who uses chatGPT to do all the work is frowned upon, rightly so, and it will give you bad code.
You can't use \n to make a new margin with Objects. For that to work you will use the Comment() function...
You have to change the Y value for every new label.
int OnInit() { //--- indicator buffers mapping //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { DisplayInfoPanel(); //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ //+-----------------------------------------+ //| Exibe o painel de informações no gráfico | //| Display information panel on chart | //+-----------------------------------------+ void DisplayInfoPanel(){ string info_1 = "aaaaaaaaa"; string info_2 = "bbbbbbbbb"; string info_3 = "ccccccccc"; makeLabel(10, 10, CORNER_LEFT_UPPER, 8, clrWhite, info_1, 0); makeLabel(10, 20, CORNER_LEFT_UPPER, 8, clrWhite, info_2, 1); makeLabel(10, 30, CORNER_LEFT_UPPER, 8, clrWhite, info_3, 2); } void makeLabel(int xPos, int yPos, ENUM_BASE_CORNER corner, int fontSize, color fontColor, string info, int index) { if (ObjectFind(0, "InfoPanel" + IntegerToString(index)) < 0){ //If the object does not exist, create it ObjectCreate(0, "InfoPanel" + IntegerToString(index), OBJ_LABEL, 0, 0, 0); } // Set properties of the label object ObjectSetInteger(0, "InfoPanel" + IntegerToString(index), OBJPROP_XDISTANCE, xPos); ObjectSetInteger(0, "InfoPanel" + IntegerToString(index), OBJPROP_YDISTANCE, yPos); ObjectSetInteger(0, "InfoPanel" + IntegerToString(index), OBJPROP_CORNER, corner); ObjectSetInteger(0, "InfoPanel" + IntegerToString(index), OBJPROP_FONTSIZE, fontSize); ObjectSetInteger(0, "InfoPanel" + IntegerToString(index), OBJPROP_COLOR, fontColor); ObjectSetString(0, "InfoPanel" + IntegerToString(index), OBJPROP_TEXT, info); } // delete the objects when you remove the indicator void OnDeinit(const int reason){ ObjectsDeleteAll(0, "InfoPanel"); }
Stop using ChatGPT/Copilot.
Help needed to debug and fix an AI EA - Trading Systems - MQL5 programming forum #2 (2023)
ChatGPT (the worst), “Bots Builder”, “EA builder”, “EA Builder Pro”, EATree, “Etasoft forex generator”, “Forex Strategy Builder”, ForexEAdvisor (aka. ForexEAdvisor STRATEGY BUILDER, and Online Forex Expert Advisor Generator), ForexRobotAcademy.com, forexsb, “FX EA Builder”, fxDreema, Forex Generator, FxPro, “LP-MOBI”, Molanis, “Octa-FX Meta Editor”, Strategy Builder FX, “Strategy Quant”, “Visual Trader Studio”, “MQL5 Wizard”, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.
Since you haven't learned MQL4/5, therefor there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
We are willing to HELP you when you post your attempt (using Code button) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own.
ChatGPT |
|
bot builder | Creating two OnInit() functions. * |
EA builder | |
EATree | Uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.) |
ForexEAdvisor |
|
FX EA Builder |
|
Hi guys,
Im not a programmer, but just tried to write a code using chatgpt and it works a bit, but the part of the code that I want to show me a display info, keeps showing me some errors...
Can someone please help me?
Im posting the code of this part here.... it keeps showing me part of this code in one horizontal line, but what It should supposed to show is on the top, left side of the chart all these info in the vertical, with each info in one line vertically...
Thanks for all your time reading this topic...
You are not a programmer. And you want the code fixed. hire a programmer.
MQL5 is complex.
And programmers don't work for free, as well as ChatGPT4o...
So, choose one...
don't do this
because it's bad code... you should use ObjectFind instead to see if it already exists
neither is this correct as it should be
Sorry but any non-programmer who uses chatGPT to do all the work is frowned upon, rightly so, and it will give you bad code.
You can't use \n to make a new margin with Objects. For that to work you will use the Comment() function...
You have to change the Y value for every new label.
You are not a programmer. And you want the code fixed. hire a programmer.
MQL5 is complex.
And programmers don't work for free, as well as ChatGPT4o...
So, choose one...
Dude, I appreciate your answer and all my respect to all programmers that at least has the patience to kindly let me know that chatgpt and others IAs are not so good for beginners like me, and you dont have to tell what I should do... and dont blame ppl that want at least give an answer for free and not say what you are saying me...
That looks like a cheap programmer that wants some money just to give an answer...
Have a good day man !
Stop using ChatGPT/Copilot.
Help needed to debug and fix an AI EA - Trading Systems - MQL5 programming forum #2 (2023)
ChatGPT (the worst), “Bots Builder”, “EA builder”, “EA Builder Pro”, EATree, “Etasoft forex generator”, “Forex Strategy Builder”, ForexEAdvisor (aka. ForexEAdvisor STRATEGY BUILDER, and Online Forex Expert Advisor Generator), ForexRobotAcademy.com, forexsb, “FX EA Builder”, fxDreema, Forex Generator, FxPro, “LP-MOBI”, Molanis, “Octa-FX Meta Editor”, Strategy Builder FX, “Strategy Quant”, “Visual Trader Studio”, “MQL5 Wizard”, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.
Since you haven't learned MQL4/5, therefor there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
We are willing to HELP you when you post your attempt (using Code button) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own.
ChatGPT |
|
bot builder | Creating two OnInit() functions. * |
EA builder | |
EATree | Uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.) |
ForexEAdvisor |
|
FX EA Builder |
|

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
Im not a programmer, but just tried to write a code using chatgpt and it works a bit, but the part of the code that I want to show me a display info, keeps showing me some errors...
Can someone please help me?
Im posting the code of this part here.... it keeps showing me part of this code in one horizontal line, but what It should supposed to show is on the top, left side of the chart all these info in the vertical, with each info in one line vertically...
Thanks for all your time reading this topic...