OPEN-SOURCE SCRIPT
Momentum Variance Oscillator

What MVO measures:
-PV (Price-Volume) Oscillator – how far price is from a volatility-scaled basis, then weighted by relative volume.
- > 0 = bullish pressure; < 0 = bearish pressure.
-|PV| larger ⇒ stronger momentum.
-Signal line (EMA of PV) – a smoother track of PV; crossings flag momentum shifts.
-Zero line gradient – instantly shows direction (greenish bull / reddish bear) and strength (paler → stronger).
-Extreme bands (±obLevel) – “hot zone” thresholds; being beyond them = exceptional push.
-Variance histogram – MACD-like view (PV minus slower PV-EMA) to see thrust building vs. fading.
-(Optional) Bar coloring & background tint – paints price bars and/or the panel on key events so you can read the regime at a glance.
-Auto-Tune – searches a grid of (obLevel, weakLvl) pairs and (optionally) auto-applies the best, ranked by CAGR vs. drawdown.
Core signals & how to trade them:
1) Define the regime:
-Bullish regime: PV above 0 and/or PV above Signal; zero line is in bull gradient.
-Bearish regime: PV below 0 and/or PV below Signal; zero line is in bear gradient.
-Action: Prefer trades with the regime (avoid fading strong color/strength unless you have a clear reversal setup).
2) Entries:
Momentum entry:
-Long: PV crosses above Signal while PV > 0.
-Short: PV crosses below Signal while PV < 0.
Breakout/acceleration:
-Long add-on: PV crosses above +obLevel (extreme top) and holds.
-Short add-on: PV crosses below −obLevel (extreme bottom) and holds.
-Histogram confirm: Growing bars in your direction = thrust improving; shrinking/flip = thrust stalling.
3) Exits / risk:
-Soft exit / tighten stops: PV loses the extreme and re-enters inside, or histogram fades/turns against you.
-Hard exit / reverse: Opposite PV↔Signal crossover and PV crosses the zero line.
-Weak zone filter: If |PV| < weakLvl, treat signals as lower quality (smaller size or skip).
4) Practical setup - Suggested defaults (good starting point):
-Signal length: 26
-Volume power: 0.50
-obLevel (extreme): 2.00
-weakLvl: 0.75
-Show histogram & dots: On
-Auto-Tune (recommended)
-Turn Auto-Select Best ON. MVO will scan obLevel 1.50→3.00 (step 0.05) and weakLvl 0.50→1.00 (step 0.05), then use the top-ranked pair (CAGR/(1+MDD)).
-If you want to see the top combos, enable the Optimizer Table (Top-3).
5) Visual options
-Bar Colors: Regime+Strength – bars follow the zero-line gradient (great for quick read).
-Extremes – paint only when beyond ±obLevel.
-Cross Signals – paint only on the bar that crosses an extreme.
-Background on breach: A one-bar tint when PV crosses an extreme.
6) Example playbook:
Long setup:
-Zero line shows bull gradient and PV > 0.
-PV crosses above Signal (entry).
-If PV drives above +obLevel, consider add-on; trail under the last minor swing or use ATR.
-Exit/trim on PV crossing below Signal or histogram turning negative; flatten on a drop through 0.
Short setup mirrors the above on the bear side.
7) Tips to avoid common traps:
-Don’t fade strong extremes without clear confirmation (e.g., PV re-entering inside + histogram flip).
-Respect the weak zone: if |PV| < weakLvl, signals are fragile—size down or wait.
-Align with structure: higher-timeframe trend and SR improve expectancy.
-Instrument personality matters: use Auto-Tune or re-calibrate obLevel/weakLvl across assets/timeframes.
8) Alerts you can set:
-Bull Signal X – PV crossed above Signal
-Bear Signal X – PV crossed below Signal
-Bull Baseline X – PV crossed above 0
-Bear Baseline X – PV crossed below 0
-PV (Price-Volume) Oscillator – how far price is from a volatility-scaled basis, then weighted by relative volume.
- > 0 = bullish pressure; < 0 = bearish pressure.
-|PV| larger ⇒ stronger momentum.
-Signal line (EMA of PV) – a smoother track of PV; crossings flag momentum shifts.
-Zero line gradient – instantly shows direction (greenish bull / reddish bear) and strength (paler → stronger).
-Extreme bands (±obLevel) – “hot zone” thresholds; being beyond them = exceptional push.
-Variance histogram – MACD-like view (PV minus slower PV-EMA) to see thrust building vs. fading.
-(Optional) Bar coloring & background tint – paints price bars and/or the panel on key events so you can read the regime at a glance.
-Auto-Tune – searches a grid of (obLevel, weakLvl) pairs and (optionally) auto-applies the best, ranked by CAGR vs. drawdown.
Core signals & how to trade them:
1) Define the regime:
-Bullish regime: PV above 0 and/or PV above Signal; zero line is in bull gradient.
-Bearish regime: PV below 0 and/or PV below Signal; zero line is in bear gradient.
-Action: Prefer trades with the regime (avoid fading strong color/strength unless you have a clear reversal setup).
2) Entries:
Momentum entry:
-Long: PV crosses above Signal while PV > 0.
-Short: PV crosses below Signal while PV < 0.
Breakout/acceleration:
-Long add-on: PV crosses above +obLevel (extreme top) and holds.
-Short add-on: PV crosses below −obLevel (extreme bottom) and holds.
-Histogram confirm: Growing bars in your direction = thrust improving; shrinking/flip = thrust stalling.
3) Exits / risk:
-Soft exit / tighten stops: PV loses the extreme and re-enters inside, or histogram fades/turns against you.
-Hard exit / reverse: Opposite PV↔Signal crossover and PV crosses the zero line.
-Weak zone filter: If |PV| < weakLvl, treat signals as lower quality (smaller size or skip).
4) Practical setup - Suggested defaults (good starting point):
-Signal length: 26
-Volume power: 0.50
-obLevel (extreme): 2.00
-weakLvl: 0.75
-Show histogram & dots: On
-Auto-Tune (recommended)
-Turn Auto-Select Best ON. MVO will scan obLevel 1.50→3.00 (step 0.05) and weakLvl 0.50→1.00 (step 0.05), then use the top-ranked pair (CAGR/(1+MDD)).
-If you want to see the top combos, enable the Optimizer Table (Top-3).
5) Visual options
-Bar Colors: Regime+Strength – bars follow the zero-line gradient (great for quick read).
-Extremes – paint only when beyond ±obLevel.
-Cross Signals – paint only on the bar that crosses an extreme.
-Background on breach: A one-bar tint when PV crosses an extreme.
6) Example playbook:
Long setup:
-Zero line shows bull gradient and PV > 0.
-PV crosses above Signal (entry).
-If PV drives above +obLevel, consider add-on; trail under the last minor swing or use ATR.
-Exit/trim on PV crossing below Signal or histogram turning negative; flatten on a drop through 0.
Short setup mirrors the above on the bear side.
7) Tips to avoid common traps:
-Don’t fade strong extremes without clear confirmation (e.g., PV re-entering inside + histogram flip).
-Respect the weak zone: if |PV| < weakLvl, signals are fragile—size down or wait.
-Align with structure: higher-timeframe trend and SR improve expectancy.
-Instrument personality matters: use Auto-Tune or re-calibrate obLevel/weakLvl across assets/timeframes.
8) Alerts you can set:
-Bull Signal X – PV crossed above Signal
-Bear Signal X – PV crossed below Signal
-Bull Baseline X – PV crossed above 0
-Bear Baseline X – PV crossed below 0
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。