Skip to content
All library documents

Trend Trading with SMA Limit Orders and Direction Filters

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses a simple moving average to classify direction and places limit orders at the average in the direction of the prevailing trend. With its anti-saw filter enabled, an uptrend requires the bar’s low to be above the average and a downtrend requires the high to be below it; otherwise, it uses the close relative to the average. Long and short trading can be enabled separately, and the rules include a configurable date window and exits when a position conflicts with the trend.

The document presents the approach as a simple trend-following method and lists SMA lag, missed fills, and sensitivity to the chosen period as risks. It suggests added filters, adaptive periods, and more flexible stops, but provides no measured evidence for these changes. Published backtest settings cover BTC-USDT Binance futures from late 2022 to early 2023 on daily bars with hourly base data; no performance results are supplied. The source’s exact exit behavior depends on which trade directions are enabled, so the summary’s general description of trend-mismatch exits should be checked against the implementation before use.

Key ideas

  • The moving average sets trend direction, and limit orders are placed at its value in that direction.
  • The anti-saw option uses bar highs and lows relative to the average instead of closes alone.
  • Long and short entries can be enabled independently, with a configurable date range.
  • Limit orders may not fill during short-term price adjustments, and the moving average can lag reversals.
  • The published backtest settings do not include performance results.

Tags

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