OPEN-SOURCE SCRIPT

Acrofins - Momentum Scanner

317
Acrofins - Momentum Scanner for Nifty and Index Traders
This is a multi-factor momentum scanner built specifically for index trading on Nifty 50, Bank Nifty, and similar instruments. It combines 10 independent technical conditions into a single composite score, and only generates a Buy or Sell signal when enough of those conditions align at the same time. The goal is simple: fewer signals, but each one backed by strong confluence across price, volume, trend, and market structure.

1. How the scoring works
Every bar on the chart is evaluated against 10 conditions. Each condition contributes 1 point to either the bull score or the bear score, except for a price breakout which contributes 2 points because it is historically the strongest signal. The maximum possible score is 11. You can set a minimum threshold in the settings (default is 5), and a signal is only generated when the score crosses that threshold. This means the indicator waits for multiple conditions to agree before calling a trade.

The 10 conditions are:

i. Price Breakout (2 points): Price closes above the highest high of the last 20 bars for a buy, or below the lowest low for a sell. This is the foundation of the signal.

ii. Directional Volume Spike: Volume is above 1.5x its 20-bar average AND the candle closes in the direction of the trade. This filters out volume spikes that occur on opposing candles, which most volume indicators ignore.

iii. RSI Zone (current timeframe): RSI is above 55 for bulls or below 45 for bears. Unlike a crossover, this is a persistent zone check so it does not fire and disappear in a single bar.

iv.RSI 1-Hour Confluence: The 1-hour RSI is checked simultaneously. If the higher timeframe RSI agrees with the signal direction, it adds a point. This is a simple multi-timeframe filter that prevents entering a short-term trade that is running against the larger trend.

v.Engulfing Candle Pattern: A classic bullish or bearish engulfing pattern on the signal bar adds a point for pattern confirmation.

vi. Candle Body Strength: The candle body must be at least 60% of the 10-bar average body size. This filters out doji and indecision candles so the entry bar itself shows conviction.

vii.DMI Direction (DI+ vs DI-): If the positive directional index is stronger than the negative, it adds a bull point and vice versa. This checks who is winning the tug of war between buyers and sellers.

viii. ADX Strength Bonus: If the ADX reading is above 25, an extra point is added. This rewards signals that appear during strong trending conditions.

ix. VWAP Bias: Price above the session VWAP adds a bull point, below adds a bear point. VWAP is the benchmark that institutional desks use as a reference during the day, so being on the right side of it matters.

x. Camarilla Proximity: If price is near a Camarilla support level (L3 or L4) it adds a bull point. Near resistance (H3 or H4) adds a bear point. These levels are calculated from the previous day's high, low, and close, and they act as natural reaction zones that many professional traders watch.

2. Regime gates (hard filters)
Two conditions must both be true before any signal can fire, regardless of the score. First, ADX must be above 20, which blocks all signals in flat and ranging markets. Second, the Bollinger Band width must not be in a squeeze, meaning the bands are not contracting relative to their 50-bar average. These gates exist because most false signals in momentum trading occur during consolidation phases.

3. EMA direction filter
There is an optional EMA-50 direction filter that can be toggled on or off. When active, buy signals can only fire when price is above the EMA-50, and sell signals can only fire when price is below it. This prevents counter-trend entries. On the chart you will see two EMA lines: the yellow EMA-20 which moves close to price and shows short-term direction, and the colored EMA-50 which turns green above and red below to show the overall trend.

4. Trade management
Once a signal fires, the indicator automatically calculates three levels based on the current ATR (Average True Range), which makes the levels adapt to the actual volatility of the instrument at that moment rather than using fixed percentages. The Stop Loss is set at 1.5x ATR below the entry for longs, above for shorts. The Take Profit is set at 3x ATR, giving a natural 1:2 risk-reward ratio. The Trailing Stop starts at 2x ATR but does not activate immediately. It only switches on after the trade has moved at least 1 ATR in your favour, which gives the trade room to breathe before the trail kicks in. Once active, it ratchets in your direction and never moves against you. After any exit, whether by stop loss, take profit, or trailing stop, the indicator enforces a cooldown of 5 bars before a new signal can be generated. This is the core fix that prevents the rapid signal repetition that many momentum indicators suffer from.

5. What you see on the chart
A large green BUY label below the bar and a large red SELL label above the bar are the primary action signals. An orange X mark appears when a trade is closed.
The blue dashed horizontal line is the entry price. The red solid line is the stop loss. The green solid line is the take profit. The orange dotted line is the trailing stop, which moves upward for longs as the trade progresses. The aqua VWAP line with faded bands shows where price stands relative to the session's volume-weighted average. The green and red dotted Camarilla levels (L3, L4, H3, H4) are the previous day's key support and resistance zones and remain fixed throughout the trading day. The background shading gives a quick read on market state. A faint green tint means price is above the EMA-50 and only buy signals are allowed. A faint red tint means price is below and only sell signals are allowed. When you are actively in a trade, the tint becomes brighter to confirm the open position.

6. The information table (top right)
The table shows the live status of every component in one place. Position, entry price, stop loss, take profit, and trailing stop are shown when a trade is open. Below that you can read the EMA trend direction, ADX value and strength rating, Bollinger Band regime status, India VIX with its 52-week IV rank percentile, RSI on both the current timeframe and the 1-hour, VWAP bias, Camarilla proximity, current bull and bear scores, and the indicator status which shows whether it is ready to trade, waiting out a cooldown, or paused due to a ranging market.

7. Settings you can adjust
All major parameters are grouped in the settings panel. You can change the EMA periods, the minimum score required to trade, the cooldown length, the ATR multipliers for stop loss, take profit and trailing stop, the ADX thresholds, the RSI zones, the volume spike multiplier, and the Bollinger Band period. Each group is labelled clearly so you can find what you need quickly. The indicator also comes with five built-in alerts covering buy entry, sell entry, long exit, short exit, and squeeze detection.

8. A note on India VIX
The India VIX data feed requires an NSE data subscription on TradingView. If it shows N/A in the table, this is a data access issue at the platform level and does not affect any of the signals.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.