Moving-Average Trailing Stop Expert Advisor Options
Summary
This document describes an expert advisor that manages trailing stops for existing orders rather than generating buy or sell entries. Its stop placement is based on a moving average, with configurable controls for how many bars back to reference, the minimum gap from the average, and the minimum distance from price when a position is in profit or loss. It also offers a maximum stop-loss limit and a trail step.
The author reports several revisions that corrected logic errors and changed parts of the trailing method, including handling older orders that exceed the maximum loss limit when the advisor lacks permission to close them. The default settings were chosen for one-minute chart testing, though the author says it can run on other timeframes and currency pairs. No performance results or detailed formula are provided, and the author describes the implementation as an early effort that may need further improvement.
Key ideas
- The advisor adjusts stops using a moving average and does not open trades.
- Users can configure the lookback bars, stop distance, maximum loss limit, and trail step.
- The author revised the logic several times, including how it handles existing orders beyond the maximum loss limit.
- The defaults were selected for one-minute testing, while the author says other timeframes and currency pairs are supported.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.