Skip to content
All library documents

RSI Midline Breakouts with ATR Targets, Pending Orders, and Session Filters

Article TradingView scripts

Summary

This script describes a US30-oriented strategy that uses RSI crossing the 50 level to generate directional signals, subject to configurable trading sessions and an ATR floor. A signal places a stop entry beyond the signal bar’s high or low by a set offset, with a protective stop beyond the other side of that bar. A maximum initial stop-distance filter can reject wide setups. The profit target is a configurable percentage of ATR, while order size is calculated from account equity and rounded down to a lot increment.

The code also handles pending orders: it cancels them after a set number of bars, when RSI flips back across 50, or when an opposite signal appears. Open positions can exit at their fixed stop or target, or through an RSI-based early exit; webhook alerts support external execution. This is an implementation specification, not a reported performance analysis: no trade results or validation are supplied. Behavior will depend on instrument point values, broker settings, session time interpretation, and alert routing, so the code’s configuration requires independent review before deployment.

Key ideas

  • RSI crossings of 50 provide long and short signals when ATR and session filters pass.
  • Stop entries are placed beyond the signal bar, with a stop-loss across the bar and an ATR-scaled target.
  • Position quantity scales with strategy equity and is rounded down to the configured lot step.
  • Pending orders can be canceled by age, an RSI reversal, or an opposite signal.
  • The document gives no backtest evidence, and live behavior depends on broker and alert configuration.

Tags

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