ATR Expansion Breakout (Python). StockSharp

Author: StockSharp
N: 1389
v5.0.0 (7/30/2025)
Downloads: 14

This strategy follows bursts of volatility using the Average True Range. When ATR is rising compared to the previous bar and price trades relative to a moving average, it looks to ride the breakout.
Expansion of ATR implies a strong move is underway. Entries align with the direction of price relative to the moving average, while contractions in volatility trigger exits.
Stops are set using an ATR multiple to let trades breathe during high volatility.

  • Entry Criteria: ATR increasing and price above/below MA.
  • Long/Short: Both directions.
  • Exit Criteria: ATR contracts or stop is hit.
  • Stops: Yes.
  • Default Values:

    • AtrPeriod = 14
    • MAPeriod = 20
    • AtrMultiplier = 2.0m
    • CandleType = TimeSpan.FromMinutes(5)

  • Filters:

    • Category: Breakout
    • Direction: Both
    • Indicators: ATR, MA
    • Stops: Yes
    • Complexity: Basic
    • Timeframe: Intraday
    • Seasonality: No
    • Neural Networks: No
    • Divergence: No
    • Risk Level: Medium