OPEN-SOURCE SCRIPT
Improved Options Confluence RSI Filter Backtest Strategy

Best Settings
EMA -9
Chandlier Exit -10
Multiplier -3
Bos look back 1
For call entries RSI must be above -47
For put entries RSI must be below - 35
RSI Mid zone low 35
RSI Mid Zone High 47
Options Confluence + RSI Filter — Backtest Strategy
A multi-factor confluence strategy designed for intraday options trading (CALL/PUT), combining trend, momentum, and volatility-exhaustion filters to reduce false signals during sideways/choppy price action.
Core Logic
The strategy only enters a trade when all of the following align:
EMA (13) — price must be trading above/below the EMA in the direction of the trade
VWAP — price must also be above/below VWAP, confirming intraday value-area bias
Chandelier Exit — an ATR-based trend/volatility filter must confirm the same directional bias
Break of Structure (BOS) — price must break the recent swing high/low over a configurable lookback, confirming momentum
RSI Filter (added to reduce sideways whipsaws)
Three additional RSI-based conditions are layered on top of the core confluence:
Mid-zone block — entries are disabled entirely when RSI sits between 45-55, since this range is typically a sign of indecisive, range-bound price action with no real momentum.
Directional confirmation — CALL entries require RSI above 55; PUT entries require RSI below 45, ensuring momentum genuinely supports the trade direction.
Overbought/Oversold block — CALL entries are disabled when RSI is above 70 (overbought), and PUT entries are disabled when RSI is below 30 (oversold), avoiding entries into an already-extended move that's prone to mean-reversion.
Effectively, this narrows valid entries to two RSI bands: CALLs only between RSI 55-70, and PUTs only between RSI 30-45.
Exit Logic
Positions are closed when price crosses back below/above the EMA, or when the Chandelier Exit flips direction — whichever comes first.
Visual Aids
EMA and VWAP plotted on the price chart
Background highlighting for RSI mid-zone (sideways), overbought, and oversold conditions, so you can visually see why a trade was or wasn't taken
CALL/PUT/EXIT labels marked directly on the chart
Inputs (fully adjustable)
EMA length, Chandelier ATR period & multiplier, BOS lookback, RSI length, RSI bull/bear confirmation levels, RSI mid-zone bounds, RSI overbought/oversold levels — every filter can be toggled or tuned to fit different instruments and timeframes.
Intended Use
Built and tested on 5-minute index charts (e.g. Bank Nifty) for options directional trading. Best used as a decision-support tool alongside price action and option-chain context, not as a fully automated signal generator. As with any strategy, backtest thoroughly on your instrument and timeframe before live use, and note that past performance does not guarantee future results.
EMA -9
Chandlier Exit -10
Multiplier -3
Bos look back 1
For call entries RSI must be above -47
For put entries RSI must be below - 35
RSI Mid zone low 35
RSI Mid Zone High 47
Options Confluence + RSI Filter — Backtest Strategy
A multi-factor confluence strategy designed for intraday options trading (CALL/PUT), combining trend, momentum, and volatility-exhaustion filters to reduce false signals during sideways/choppy price action.
Core Logic
The strategy only enters a trade when all of the following align:
EMA (13) — price must be trading above/below the EMA in the direction of the trade
VWAP — price must also be above/below VWAP, confirming intraday value-area bias
Chandelier Exit — an ATR-based trend/volatility filter must confirm the same directional bias
Break of Structure (BOS) — price must break the recent swing high/low over a configurable lookback, confirming momentum
RSI Filter (added to reduce sideways whipsaws)
Three additional RSI-based conditions are layered on top of the core confluence:
Mid-zone block — entries are disabled entirely when RSI sits between 45-55, since this range is typically a sign of indecisive, range-bound price action with no real momentum.
Directional confirmation — CALL entries require RSI above 55; PUT entries require RSI below 45, ensuring momentum genuinely supports the trade direction.
Overbought/Oversold block — CALL entries are disabled when RSI is above 70 (overbought), and PUT entries are disabled when RSI is below 30 (oversold), avoiding entries into an already-extended move that's prone to mean-reversion.
Effectively, this narrows valid entries to two RSI bands: CALLs only between RSI 55-70, and PUTs only between RSI 30-45.
Exit Logic
Positions are closed when price crosses back below/above the EMA, or when the Chandelier Exit flips direction — whichever comes first.
Visual Aids
EMA and VWAP plotted on the price chart
Background highlighting for RSI mid-zone (sideways), overbought, and oversold conditions, so you can visually see why a trade was or wasn't taken
CALL/PUT/EXIT labels marked directly on the chart
Inputs (fully adjustable)
EMA length, Chandelier ATR period & multiplier, BOS lookback, RSI length, RSI bull/bear confirmation levels, RSI mid-zone bounds, RSI overbought/oversold levels — every filter can be toggled or tuned to fit different instruments and timeframes.
Intended Use
Built and tested on 5-minute index charts (e.g. Bank Nifty) for options directional trading. Best used as a decision-support tool alongside price action and option-chain context, not as a fully automated signal generator. As with any strategy, backtest thoroughly on your instrument and timeframe before live use, and note that past performance does not guarantee future results.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.