I am relatively new to MetaTrader, not to trading though, and have
created some EAs using Expert Adviser Builder. Most work fine but am
having trouble when I use multiple exits. Close(buy) logics and close
(sell) logics with the OR function. Multiples with AND work fine, but
it won't recognize any I create with OR. Below is the exit code.
//+------------------------------------------------------------------+
//| Signal Begin(Exit Sell) |
//+------------------------------------------------------------------+
if (CloseSell1_1 < CloseSell1_2 && CloseSell2_1 > CloseSell2_2 || CloseSell3_1 > CloseSell3_2) Order = SIGNAL_CLOSESELL;
The bold part is the signal it is ignoring. Any ideas. This is the only
thing holding me up from properly backtesting. If anyone can help and
it backtests fine, you can have it. By just manually filtering out the
trades that should be closed, it looks promising.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
//+------------------------------------------------------------------+
//| Signal Begin(Exit Sell) |
//+------------------------------------------------------------------+
if (CloseSell1_1 < CloseSell1_2 && CloseSell2_1 > CloseSell2_2 || CloseSell3_1 > CloseSell3_2) Order = SIGNAL_CLOSESELL;
The bold part is the signal it is ignoring. Any ideas. This is the only thing holding me up from properly backtesting. If anyone can help and it backtests fine, you can have it. By just manually filtering out the trades that should be closed, it looks promising.
Thanks.