Hello Everyone, Please I am trying to create a bot that takes a buy stop and sell stop order simultaneously at a a particular time but it seems there's a trade order error. Code attach below
Files:
StraddleNews_2nd_Strag_GPT_Dec23.mq4
15 kb
- Open pending orders!
- HI everyone EA coding issue please help!
- Counting Orders
badim004: Hello Everyone, Please I am trying to create a bot that takes a buy stop and sell stop order simultaneously at a a particular time but it seems there's a trade order error. Code attach below
Why does your EA name include the word "GPT"?
There is no GPT functionality in thes code, so I can only assume that it is because it was generated by by ChatGPT (or some other A.I.).
Is that the case?
There is no trade error. There is only your error; your code does not have any trading logic.
void OnTick() { // Your trading logic here... // Example: If a loss occurs if (/* Condition for a loss */) { OnLoss(); } // Check if there should be a delay if (ShouldDelayTrading()) { Print("Delaying trading for 6 hours after 2 consecutive losses."); return; // Do not take any trades during the delay } // Continue with your trading logic... }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register