Building a Parabolic SAR Trend-Following Expert Advisor in MQL5
Summary
The document explains a basic MQL5 Expert Advisor that uses Parabolic SAR to choose trade direction. It compares the prior completed candle’s close with the indicator: a close above SAR prompts a buy, and a close below prompts a sell. The EA checks that no position is already open for the symbol and exposes inputs for trade size, SAR sensitivity, and slippage. The article also describes initialization, trade functions, and the indicator’s use as a trend and reversal signal.
It reports a backtest on USDJPY on a one-minute chart, using every-tick modeling from January 1 to August 5, 2024, and states that the author found the approach suitable for USDJPY and EURUSD but not GBPUSD. No numerical performance metrics are provided in the excerpt. The example is presented as a starting point: it lacks detailed risk controls such as a trailing stop, and the author recommends further parameter tuning, backtesting, forward testing, and monitoring. The stated results do not establish future profitability.
Key ideas
- The EA buys when the previous candle closes above Parabolic SAR and sells when it closes below it.
- It avoids opening another position when one is already open for the traded symbol.
- Lot size and SAR sensitivity are configurable, while the example also sets an allowable slippage input.
- The reported instrument observations come from a one-minute USDJPY backtest and are not accompanied by performance statistics.
- The article recommends adding risk management and validating the approach through further testing before live use.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.