OPEN-SOURCE SCRIPT

Global MA + Oscillator Score, Vol-Rank Filter and HA candles

93
OVERVIEW
This strategy goes long when TradingView’s global Technical-Rating score
(MA plus Oscillator composite) is strong and exits on weak scores or
volatility spikes. Scores are calculated on Heikin-Ashi candles for noise
reduction, but every order is executed on standard OHLC data, so back-tests
use real-candle prices.

KEY POINTS
• Uses the global Technical Rating because tests showed better risk-adjusted
returns than MA-only or Oscillator-only variants.
• Vol-Rank percentiles (Larry Williams VIX-Fix adaptation) block trades when
short-term volatility is in the top 20 % of the last 252 bars and allow
re-entry once it falls below 60 %.
• End-of-month Thursday profit-lock rule exits open winners just before
monthly option expiry.
• Works on any timeframe and any liquid symbol; defaults are tuned for QQQ
daily.

ENTRY AND EXIT
Long entry: globalRating ≥ +0.4
Soft exit: globalRating < −0.6
Hard exit: Vol-Rank ≥ 80 % or last-Thursday of the month rule
Re-entry: Same bar if Vol-Rank ≤ 60 % after last-thursday hard exit

INPUTS
symbol_correlation default QQQ (editable)
ratingThresholdIn +0.4
ratingThresholdOut −0.6



DEFAULT STRATEGY PROPERTIES
Initial capital default
Order size 5 % of equity
Pyramiding 1 order
Commission 0.05 % per trade
Slippage 5 ticks
Margin requirement long 100 %
Margin requirement short 100 %
Fill orders bar magnifier ON, on bar close, using standard OHLC

LIMITATIONS
• Heikin-Ashi smoothing delays signals; real-time fills can differ.
• Vol-Rank is derived from price, not true options IV Rank.
• Past results never guarantee future performance.

CREDITS
TradingView Technical Rating library v3
Larry Williams VIX-Fix concept (adapted)

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.