OPEN-SOURCE SCRIPT
MASU+ Institutional Fibonacci MTF [BTT]

Multi-asset institutional-grade strategy combining Fibonacci retracement, multi-timeframe trend alignment, order flow analysis, and adaptive volatility regime detection. Designed for stocks, precious metals (gold, silver, miners), crypto, and forex.
━━━ HOW IT WORKS ━━━
The strategy operates on a 7-layer confluence engine:
① FIBONACCI RETRACEMENT — Automatically detects significant swing highs/lows using ATR-filtered pivot detection. Calculates dynamic 38.2%, 50%, and 61.8% retracement levels with visual zone fills between levels. Entries trigger on confirmed bounce (bullish wick or green close above level) at Fib support in upswings, or rejection candle at Fib resistance in downswings.
② MULTI-TIMEFRAME FILTER — Higher timeframe (default 4H) trend confirmation via EMA crossover. Trades are only taken in the direction of the dominant trend. Prevents counter-trend entries that statistically underperform.
③ MA RIBBON (8 MAs) — Fibonacci-sequenced moving average ribbon (8, 13, 21, 34, 55, 89, 144, 233). When 6+ of 7 pairs are aligned, the ribbon confirms strong directional momentum. Supports EMA, SMA, and HMA modes.
④ ORDER FLOW — Intraday VWAP with 3 standard deviation bands. Cumulative Volume Delta (CVD) identifies hidden buying/selling pressure divergences. Volume ratio analysis detects institutional accumulation/distribution.
⑤ VOLATILITY REGIME — Bollinger Band width expansion/contraction + ATR percentile ranking. Automatically switches between trend-following mode (high volatility) and mean-reversion mode (low volatility). Adapts stop distances to current market conditions.
⑥ BREAKOUT + MEAN REVERSION — Dual-mode execution: breakout entries on new highs/lows with volume confirmation, and BB + RSI mean reversion entries during ranging conditions.
⑦ RISK MANAGEMENT — ATR-based dynamic stop loss and take profit. Optional trailing stop. Kelly Criterion position sizing calculated from live win rate and payoff ratio.
━━━ MARKETS & TIMEFRAMES ━━━
▸ Stocks — US equities, ETFs (SPY, QQQ, AAPL, TSLA, etc.)
▸ Precious Metals — XAU/USD, XAG/USD, GLD, SLV, NEM, GOLD, AEM, miners
▸ Crypto — BTC/USD, ETH/USD, SOL/USD, and all major pairs
▸ Forex — All major and cross pairs
▸ Indices — NQ, ES, YM, DAX, FTSE
▸ Commodities — Oil, Natural Gas, Copper
Recommended timeframes: 15M (scalping/intraday), 1H (swing), 4H (position).
The MTF filter automatically reads higher timeframes regardless of chart TF.
━━━ DASHBOARD ━━━
Compact 3-column light-theme dashboard (bottom right) showing:
• MTF alignment (15M / 1H / 4H) with directional arrows and score
• MA Ribbon status and alignment count
• ADX strength + Order Flow direction
• Live Fibonacci levels with prices
• Support / Resistance levels
• Stop Loss / Take Profit / Risk:Reward ratio
• Kelly % position sizing
• Confluence score (0–5) with strength label
• Session detection (London / New York / Asia / Overlap)
• Signal: ◆ LONG / ◆ SHORT / — WAIT
━━━ VISUAL FEATURES ━━━
• Fibonacci zones rendered as dashed lines with semi-transparent linefill shading between 38.2–50% and 50–61.8% levels
• Price labels at each Fib level on the right edge
• Swing high/low reference lines (dotted)
• Extension target level for take-profit reference
• Diamond-shaped entry signals (green/red)
• Subtle Fib bounce/rejection triangle markers
• Background pulse highlight on signal bars
• Gradient trend candles (RSI-based color intensity)
• Dynamic S/R lines with labels
• TP/SL lines when in position
━━━ SETTINGS ━━━
All parameters are fully configurable:
• Swing detection sensitivity (lookback, min ATR size)
• Fib levels toggle (38.2 / 50 / 61.8), zone width, bounce wick threshold
• MTF timeframe and EMA lengths
• Ribbon MA type (EMA/SMA/HMA) and alignment threshold
• Order Flow CVD period and threshold, VWAP bands
• Volatility expansion/contraction thresholds
• Breakout period, BB period, RSI levels
• SL/TP ATR multipliers, trailing stop
• ADX threshold, volume filter
• Time session filter
• All visual elements can be toggled on/off
━━━ NOTES ━━━
• This is a strategy (not indicator) — full backtest results available in Strategy Tester
• No repainting — all signals use barstate.isconfirmed
• Commission and slippage included in backtest (0.1% commission, 3 ticks slippage)
• Pine Script v6 compatible
• Pyramiding disabled by default (1 position at a time)
━━━ HOW IT WORKS ━━━
The strategy operates on a 7-layer confluence engine:
① FIBONACCI RETRACEMENT — Automatically detects significant swing highs/lows using ATR-filtered pivot detection. Calculates dynamic 38.2%, 50%, and 61.8% retracement levels with visual zone fills between levels. Entries trigger on confirmed bounce (bullish wick or green close above level) at Fib support in upswings, or rejection candle at Fib resistance in downswings.
② MULTI-TIMEFRAME FILTER — Higher timeframe (default 4H) trend confirmation via EMA crossover. Trades are only taken in the direction of the dominant trend. Prevents counter-trend entries that statistically underperform.
③ MA RIBBON (8 MAs) — Fibonacci-sequenced moving average ribbon (8, 13, 21, 34, 55, 89, 144, 233). When 6+ of 7 pairs are aligned, the ribbon confirms strong directional momentum. Supports EMA, SMA, and HMA modes.
④ ORDER FLOW — Intraday VWAP with 3 standard deviation bands. Cumulative Volume Delta (CVD) identifies hidden buying/selling pressure divergences. Volume ratio analysis detects institutional accumulation/distribution.
⑤ VOLATILITY REGIME — Bollinger Band width expansion/contraction + ATR percentile ranking. Automatically switches between trend-following mode (high volatility) and mean-reversion mode (low volatility). Adapts stop distances to current market conditions.
⑥ BREAKOUT + MEAN REVERSION — Dual-mode execution: breakout entries on new highs/lows with volume confirmation, and BB + RSI mean reversion entries during ranging conditions.
⑦ RISK MANAGEMENT — ATR-based dynamic stop loss and take profit. Optional trailing stop. Kelly Criterion position sizing calculated from live win rate and payoff ratio.
━━━ MARKETS & TIMEFRAMES ━━━
▸ Stocks — US equities, ETFs (SPY, QQQ, AAPL, TSLA, etc.)
▸ Precious Metals — XAU/USD, XAG/USD, GLD, SLV, NEM, GOLD, AEM, miners
▸ Crypto — BTC/USD, ETH/USD, SOL/USD, and all major pairs
▸ Forex — All major and cross pairs
▸ Indices — NQ, ES, YM, DAX, FTSE
▸ Commodities — Oil, Natural Gas, Copper
Recommended timeframes: 15M (scalping/intraday), 1H (swing), 4H (position).
The MTF filter automatically reads higher timeframes regardless of chart TF.
━━━ DASHBOARD ━━━
Compact 3-column light-theme dashboard (bottom right) showing:
• MTF alignment (15M / 1H / 4H) with directional arrows and score
• MA Ribbon status and alignment count
• ADX strength + Order Flow direction
• Live Fibonacci levels with prices
• Support / Resistance levels
• Stop Loss / Take Profit / Risk:Reward ratio
• Kelly % position sizing
• Confluence score (0–5) with strength label
• Session detection (London / New York / Asia / Overlap)
• Signal: ◆ LONG / ◆ SHORT / — WAIT
━━━ VISUAL FEATURES ━━━
• Fibonacci zones rendered as dashed lines with semi-transparent linefill shading between 38.2–50% and 50–61.8% levels
• Price labels at each Fib level on the right edge
• Swing high/low reference lines (dotted)
• Extension target level for take-profit reference
• Diamond-shaped entry signals (green/red)
• Subtle Fib bounce/rejection triangle markers
• Background pulse highlight on signal bars
• Gradient trend candles (RSI-based color intensity)
• Dynamic S/R lines with labels
• TP/SL lines when in position
━━━ SETTINGS ━━━
All parameters are fully configurable:
• Swing detection sensitivity (lookback, min ATR size)
• Fib levels toggle (38.2 / 50 / 61.8), zone width, bounce wick threshold
• MTF timeframe and EMA lengths
• Ribbon MA type (EMA/SMA/HMA) and alignment threshold
• Order Flow CVD period and threshold, VWAP bands
• Volatility expansion/contraction thresholds
• Breakout period, BB period, RSI levels
• SL/TP ATR multipliers, trailing stop
• ADX threshold, volume filter
• Time session filter
• All visual elements can be toggled on/off
━━━ NOTES ━━━
• This is a strategy (not indicator) — full backtest results available in Strategy Tester
• No repainting — all signals use barstate.isconfirmed
• Commission and slippage included in backtest (0.1% commission, 3 ticks slippage)
• Pine Script v6 compatible
• Pyramiding disabled by default (1 position at a time)
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.