VIDYA Trend Reversals with ATR Bands and Position Flips
Summary
This script defines a trend-following strategy using a Variable Index Dynamic Average (VIDYA) and volatility-scaled bands. Its VIDYA calculation adjusts responsiveness using the balance of positive and negative price momentum, then smooths the result. The upper and lower bands are offset from that average by a multiple of a long-window ATR.
A close crossing above the upper band triggers a long entry and closes any short; crossing below the lower band triggers a short and closes any long. Thus, the rules follow directional band breaks and reverse exposure when the opposite break occurs. The overview describes volatility adjustment and trend visualization, but the supplied excerpt ends before the full explanation and includes no backtest statistics or comparative evidence. The script shows no explicit stop, profit target, or position-sizing rule. Its parameters, market, and trading costs are not assessed, so historical testing and robustness checks would be needed before drawing conclusions about performance.
Key ideas
- VIDYA adapts its effective smoothing to the relative magnitude of positive and negative momentum.
- Upper and lower thresholds are formed by offsetting VIDYA with an ATR multiple.
- Crosses above or below the bands initiate positions in the corresponding direction and close the opposing position.
- The excerpt provides no performance results and defines no explicit stop loss, take profit, or sizing method.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.