Skip to content
All library documents

Dual Moving Average Slope Trend Strategy with Session and Risk Controls

Article TradingView scripts

Summary

This strategy uses the slopes of a fast and a slow simple moving average to define direction. It signals long when both averages rise and short when both fall, with an optional additional filter based on the slope of another moving average. Traders can restrict the allowed direction and limit entries to a configured intraday session. The template also supports point based stop losses, optional take profit levels, and closing open positions when the session ends.

The code and description frame this as a trend following template for a Vietnamese futures market, but provide no backtest statistics or evidence of profitability. Its entries are described as occurring on the next bar after the signal bar closes. Although comments describe natural exits when either average changes slope, the code primarily implements stop and optional target exits; those comments do not correspond to a separate general exit condition. Results depend on instrument units, chart interval, session timezone, and execution assumptions.

Key ideas

  • Long signals require both the fast and slow moving averages to slope upward.
  • Short signals require both averages to slope downward.
  • An optional moving average slope filter and direction setting can restrict trades.
  • Entries are limited to the configured session, and open positions can be closed when it ends.
  • Stops and optional targets use fixed point distances, and the document includes no performance validation.

Tags

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