Skip to content
All library documents

Selectable Moving Average Price-Crossover Strategy

Article Strategy library · Author: ChaoZhang

Summary

The document describes a trend-following strategy that lets the user choose SMA, EMA, TEMA, WMA, or HMA and set the calculation period. Its stated signal rule is to go long when the close is above the selected average and short when below. The Pine source instead enters long when price is above the average and closes that position when price falls below it; it does not implement short entries. Orders are limited to a configurable backtest date range, and the published test settings identify BTC/USDT futures, but no performance results are provided.

The note explains that moving averages smooth prices but lag turning points, and that fixed settings may overfit. It suggests adding filters, stops, adaptive periods, and position management. These are proposed improvements rather than tested results. Despite the title and prose referring to multiple timeframes, the supplied logic uses one chart series and one selected average, so the document does not demonstrate a multi-timeframe method.

Key ideas

  • The strategy selects one of five moving average types and applies a configurable lookback period.
  • The written rules describe long and short signals, while the code only opens and closes long positions.
  • The source constrains trading to a selected date window and gives no performance evidence.
  • Moving average lag and parameter overfitting are identified as limitations.
  • Additional filters, stop rules, adaptive periods, and position sizing are suggested but not evaluated.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.