This Expert Advisor employs two Parabolic SAR indicators, one for entry and one for exit. As the name implies, this Expert Advisor uses the stop-
and-reverse mechanism, and hence its signals alternate between LONG and SHORT. It is highly successful in cyclical markets, but its performance
degrades in sideways or neutral markets.
The Expert Advisor trades between starting time specified by START_HOUR and START_MINUTE, and the ending time specified by END_HOUR
and END_MINUTE. During the inactive period the Expert Advisor only tracks the exit rules and ignores all entry rules.
The Expert Advisor opens a BUY trade when the entry Parabolic SAR based on the TRADE_STEP and TRADE_MAX parameters generates a
BULLISH signal. If a BUY trade is already open, then the signal is ignored, whereas if a SELL trade is open, it is closed and then the BUY trade is
opened. Similar rules are applied when a SELL signal is generated by the entry Parabolic SAR indicator. If MONEY_MANAGEMENT is TRUE, the
lot-size is calculated based on the Account Balance and the RISK_PERCENT parameters, otherwise the fixed LOT_SIZE value is used.
The initial stop-loss is based on the Average True Range indicator calculated using the ATR_PERIOD and ATR_MULTIPLIER parameters.
Additionally, to protect profits and respond to adverse market movements, the Expert Advisor uses the exit Parabolic SAR calculated from the
STOP_STEP and STOP_MAX parameters for a tighter trailing stop and reversal criteria.
When a position reaches profit which is equal to the initial stop-loss, the Expert Advisor moves the stop-loss to the entry price if BREAKEVEN is set
to TRUE. Likewise, if PARTIAL_CLOSING is set to TRUE, it closes half of the position upon reaching this profit milestone.
The Expert Advisor does not use a profit target for the open positions. The open positions are closed by the initial-stop, the trailing stop or based on
the MACD exit rules. By not using a fixed profit target, the Expert Advisor capitalizes on generating huge profits when the trend is very strong and
continues for a long time.