You are using ChatGPT, right? Then please ask ChatGPT to fix it for you.
Obviously, if you are using an A.I. to produce your code, then clearly you don't know how to code in MQL.
So any advice we give you, you will not understand nor will you know how to implement.
ChatGPT produces the most horrible code. If you want something better, then please hire a human coder to do it properly.
-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
ChatGPT (the worst), 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, 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 - Mixing MT4 and MT5 code together.
- Creating multiple OnCalculate/OnTick functions.
- OnCalculate returning a double.
- Filling buffers with zero in OnInit (they have no size yet). Setting buffer elements to zero but not setting Empty Value to correspond.
- Calling undefined functions.
- Sometimes, not using strict (MT4 code).
- Code that will not compile.
- Creating code outside of functions.
- Creating incomplete code.
- Initialization of Global variables with non-constants.
- Assigning a MT5 handle to a double or missing the buffer and bar indexes in a MT4 call.
- Useing MT4 Trade Functions without first selecting an order.
- Even it says do not use it
for coding. (2023)
EA builder - Counting up while closing multiple orders.
- New bar code: Bars is unreliable (Max bars in chart), volume is unreliable (miss ticks.) Always use time.
- Not adjusting for 4/5 digit brokers, TP/SL and slippage.
- Not checking return codes.
EATree Uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.) ForexEAdvisor FX EA Builder - Not checking return codes.
- Loosing open tickets on terminal restart. No recovery (crash/power failure.)
- Not adjusting stops for the spread.
- Using OrdersTotal directly.
-
Only problem is Chat GPT is only as good as you can prompt it : you'll have to learn to engineer your prompts correctly ,
dumb prompt dumb answer , its a tool for ideas
but the fact that you don't see your code is incomplete is the problem ,this means you don't know what its doing and therefore you yourself don't know how to fix it Fernando Carreiro is correct it should fix it for you this will teach you how to prompt it to do what you require , but it is also worthy to note that it does not yet consider every aspect of mql5 library and the proper execution there of you could have worked past it feeding it the parameters in the prompted itself but you do not know what they are because you have the idea to make money.
but your lacking the right formula to obtain your goal thus your progress will be slow in this regard and nobody here is going to try and help as you have taken the easy way /this is shown by the fact that you did not realize that the code is incomplete to begin with .
You are using ChatGPT, right? Then please ask ChatGPT to fix it for you.
Obviously, if you are using an A.I. to produce your code, then clearly you don't know how to code in MQL.
So any advice we give you, you will not understand nor will you know how to implement.
ChatGPT produces the most horrible code. If you want something better, then please hire a human coder to do it properly.
Thank you for your honest answer Mr Fernando
- 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 kindly need help with compiling mql5 code with 2 errors '{' - unexpected end of program on line: 85 column 5 and '{' - unbalanced parentheses on line : 50 column 1. Any help