Skip to content
All library documents

Trend and Higher-Timeframe Stochastic Entries with ATR-Based Stop Management

Article TradingView scripts

Summary

This strategy separates directional filtering from entry timing. A 38- and 62-period EMA comparison sets the trend direction, while current-timeframe and automatically selected higher-timeframe stochastic measures must confirm momentum around the 50 midline for an entry. The trend requirement and long or short direction can be adjusted. The script also offers equity-percentage or ATR-stop-based position sizing.

Risk management begins with an ATR-scaled stop. At a configurable favorable R multiple the stop can move to entry price, then trail at an ATR distance after a further threshold. Additional exits include stochastic fade, an optional EMA trend reversal, and a maximum holding period. The source provides parameter defaults and implementation details, but no backtest results or evidence of profitability. Higher-timeframe values use lookahead disabled, and behavior can still depend on timeframe, instrument, costs, and settings; the staged rules are a strategy design to evaluate rather than proof of an edge.

Key ideas

  • The EMA relationship defines the permitted trend direction, while stochastic signals determine entry timing.
  • Entries require current- and higher-timeframe stochastic confirmation around the 50 level.
  • The initial stop scales with ATR, with optional breakeven and ATR-trailing stages as a trade moves favorably.
  • Position size can be based on a share of equity or a chosen equity risk amount relative to the ATR stop distance.
  • Stochastic fade, trend reversal, and elapsed bars provide additional exit conditions, but no performance evidence is reported.

Tags

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