This line contains a bug:
bool res = OrderSelect(i,SELECT_BY_POS,OrderMagicNumber() == MagicNumber);
Both in CountBuy/Sell. You probably wanted to check the magic number on a separate instruction.
Also, several other places make use of OrdersTotal() where only the EA's orders should be counted. There might be more that requires a fix.
By the way this is MQL 4.
This line contains a bug:
Both in CountBuy/Sell. You probably wanted to check the magic number on a separate instruction.
Also, several other places make use of OrdersTotal() where only the EA's orders should be counted. There might be more that requires a fix.
By the way this is MQL 4.
Thank you so much . I can fix it Now
But i have new a problem .My EA i Open Order and TP ,but EA Open Order again ( Ex. time19.30.00 Open Buy Gold 1200.00 time 19.31.00 TP 1202.00 => time 19.31.00 Open Buy Gold 1202.00)
how do i can fix it ?
-
You are looking at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12 -
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19
Do not double post!
I have deleted your duplicated post.
- 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,I have a problem, want to help me find a bug.
my ea send order buy and sell at the same time
i use MA Cross Martingale But My EA buy and sell at the same time .
see picture EA Buy and Sell 0.50 And Buy 0.65 (I using Martingale 1.3 & 0.5*1.3 = 0.65) Same Time and same price