MQL 5 . bear engulfing EA built on ChatGpt shows no error on compile but sell trade not executing at market price
If your code compiles with no error but it does not do what what it should learn to use the debugger:
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
Tips from a professional programmer (Part I): Code storing, debugging and compiling. Working with projects and logs https://www.mql5.com/en/articles/9266
Tips from a professional programmer (Part II): Storing and exchanging parameters between an Expert Advisor, scripts and external programs https://www.mql5.com/en/articles/9327
Tips from a professional programmer (Part III): Logging. Connecting to the Seq log collection and analysis system https://www.mql5.com/en/articles/10475
Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator https://www.mql5.com/en/articles/35
Beside that:
Bear in mind there's virtually nothing that hasn't already been programmed for MT4/MT5 and is ready for you - so searching gives better results than AI or ChatGPT!
- www.metatrader5.com
i just changed the order send function but it says there is an error in ordersned parameters :
ulong ticket = OrderSend(_Symbol, ORDER_TYPE_SELL, positionSize, entryPrice, 3, stopLoss, entryPrice - takeProfit, "Bearish Engulfing", MagicNumber, 0);would you please find out anything wrong data type or parameters enterd
i know its chatgpt generated, but i want to know whats wrong in this just order sending block code , there is some little common mistake i think

- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This is the code , there is no error on compile but its not executing order on market price :
If someone can find that little mistake please tell me , Thank you