Moving-Average Offset Levels for Long and Short Entries
Summary
This strategy calculates a simple moving average from a selectable price source, then creates long and short trigger levels by shifting that average by user-set percentages. The narrative describes entering long above the upper offset and short below the lower offset, with opposing levels used to close positions. Its inputs include a moving-average length, long and short offsets, and switches for trade direction and chart display.
A published BTC_USDT futures backtest setup is included, but the document provides no performance statistics. There is also a meaningful difference between the prose and sample code: the code submits stop entry orders at the offset levels, rather than explicitly implementing the described close rules. The short side is disabled by default, and the displayed lines are shifted for plotting, so users should distinguish the visualization from the order logic.
The document flags backtest overfitting, stops placed too close to the average, margin demands from two-sided trading, and parameter sensitivity. It suggests trend filters, trailing stops, and parameter evaluation, but does not establish that these changes improve results.
Key ideas
- A simple moving average is shifted by separate percentages to create long and short price levels.
- The narrative uses crossings of those levels for directional entries and exits.
- The sample code submits stop entries and does not directly match every exit rule in the prose.
- The short side is disabled by default in the listed settings.
- No backtest performance metrics are reported, and offset choice can affect behavior.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.