Skip to content
All library documents

Supertrend and Moving Average Crossover with Configurable Risk Exits

Article Strategy library · Author: sachinlanke

Summary

This script describes a crossover strategy that compares a selectable moving average with a Supertrend line. In its standard mode, a move of the average above the Supertrend triggers a long signal, while a move below triggers a short signal; an option reverses those directions. Both indicators can use configurable price sources, and the average can be applied to an EMA-smoothed Supertrend line. The visible settings include Supertrend ATR period and factor, moving-average type and length, and optional stop-loss and take-profit levels set in percentages or price points.

The supplied document is only a partial script: it ends during the Supertrend band calculation. It gives no backtest results, market, timeframe, or evidence of performance. The described crossover and exit settings therefore explain the intended mechanics, but do not establish profitability or robustness. Any evaluation would need the complete implementation and testing that accounts for trading costs, execution, and different market conditions.

Key ideas

  • The strategy uses moving-average crosses of a Supertrend line to generate directional entries.
  • Supertrend and moving-average price sources can be selected independently.
  • The moving average can instead use an EMA-smoothed Supertrend as its input.
  • Stop-loss and take-profit levels can be enabled separately and specified in percentages or price points.
  • The supplied script is truncated and contains no performance evidence.

Tags

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