OPEN-SOURCE SCRIPT
Telah dikemas kini Trend Hunter v1.5

Trend Hunter
A multi-timeframe WaveTrend momentum system with an integrated dashboard, Cipher B-style Money Flow, and instrument-specific entry alerts.
What it does
Trend Hunter calculates WaveTrend oscillators across six timeframes (4H, 1H, 30m, 15m, 5m, 1m) simultaneously and displays their state, value, and Money Flow direction in a compact overlay dashboard. It identifies pullback entries within established higher-timeframe trends by detecting fresh WaveTrend crossovers on lower timeframes while higher timeframes confirm directional bias.
How WaveTrend works
WaveTrend (originally by LazyBear) is a normalized momentum oscillator. It measures how far price deviates from its exponential moving average, normalizes that deviation, then smooths the result. Two lines are produced: WT1 (the main signal, EMA of the normalized channel index) and WT2 (a simple moving average of WT1). When WT1 crosses above WT2, a bullish dot appears. When it crosses below, a bearish dot appears. Overbought is above +53/+60, oversold below -53/-60.
The key insight this indicator exploits: when higher timeframes are trending (WT1 > WT2) and a lower timeframe pulls back below the zero line and then crosses bullish again, that pullback entry has a statistical edge over random entries. Backtesting across 6-17 months of data confirmed this for Gold (PF 1.51), Bitcoin (PF 1.17), and Ethereum (PF 1.12).
Money Flow (Cipher B method)
Instead of traditional volume-based MFI (which is unreliable on CFD instruments where broker volume is tick count, not real volume), this indicator uses the Cipher B approach: the ratio of candle body size to total candle range, smoothed over 60 periods. This produces a volume-independent momentum wave that oscillates around zero. Green = buying pressure dominant, red = selling pressure dominant. This works identically on forex, CFDs, crypto, and futures.
The formula: SMA((close - open) / (high - low) * 150, 60) - 2.5
Multi-timeframe dashboard
The overlay table shows each enabled timeframe's trend state (BULL/BEAR), WT1 value, Money Flow direction, and whether a fresh crossover dot just appeared (NEW). This eliminates the need to flip between timeframes manually. Timeframes are individually toggleable.
Instrument-specific alerts
Three backtested entry configurations are built in, each symbol-locked so they only fire on the correct instrument:
Gold/Silver (XAUUSD/XAGUSD): 4H and 1H both bullish, 1H WT still below zero, 5m green dot with WT2 below -10. This configuration produced the strongest backtest results (Profit Factor 1.51 across 350 trades). Recommended exit: fixed 1:3 risk-reward.
Bitcoin (BTCUSDT): 1H bullish, 1H WT still below zero, 5m green dot with WT2 below -20. Marginal edge (PF 1.17). Recommended exit: WT overbought (+53).
Ethereum (ETHUSDT): 1H bullish, 1H WT still below zero, 5m green dot with WT2 at or below zero. Marginal edge (PF 1.12). Recommended exit: WT overbought (+53).
All instrument alerts fire once per cycle. A cycle resets only when the 1H WaveTrend crosses back through the zero line in the setup direction, ensuring the alert cannot re-fire on brief oscillations near the crossover point.
Short-side alerts use the inverse logic with flipped thresholds.
Additional alerts
Generic green/red dot alerts on the current chart timeframe, filtered dot alerts (oversold/overbought only), generic HTF pullback alerts (4H+1H bias with LTF dot below zero), full alignment alerts (all enabled timeframes agree), and Money Flow zero-cross alerts.
How to use
Add the indicator to a 5m chart of your instrument. Enable the "Any alert() function call" alert to receive all relevant signals. The dashboard provides at-a-glance multi-timeframe context. Use the instrument alerts as entry candidates and confirm with price action, support/resistance levels, and risk management before entering.
This indicator does not generate buy/sell orders. It identifies statistical pullback setups within established trends. Not every alert is a trade.
Settings
WaveTrend parameters default to 9/12/3 (matching Cipher B). Money Flow defaults to period 60, multiplier 150. All inputs are accessible in settings but hidden from the status line by default to keep the chart clean. Dashboard position and size are configurable.
Credits
WaveTrend calculation based on LazyBear's WaveTrend with Crosses. Money Flow concept inspired by Cipher B's volume-independent approach. Multi-timeframe architecture and instrument-specific alert system are original.
A multi-timeframe WaveTrend momentum system with an integrated dashboard, Cipher B-style Money Flow, and instrument-specific entry alerts.
What it does
Trend Hunter calculates WaveTrend oscillators across six timeframes (4H, 1H, 30m, 15m, 5m, 1m) simultaneously and displays their state, value, and Money Flow direction in a compact overlay dashboard. It identifies pullback entries within established higher-timeframe trends by detecting fresh WaveTrend crossovers on lower timeframes while higher timeframes confirm directional bias.
How WaveTrend works
WaveTrend (originally by LazyBear) is a normalized momentum oscillator. It measures how far price deviates from its exponential moving average, normalizes that deviation, then smooths the result. Two lines are produced: WT1 (the main signal, EMA of the normalized channel index) and WT2 (a simple moving average of WT1). When WT1 crosses above WT2, a bullish dot appears. When it crosses below, a bearish dot appears. Overbought is above +53/+60, oversold below -53/-60.
The key insight this indicator exploits: when higher timeframes are trending (WT1 > WT2) and a lower timeframe pulls back below the zero line and then crosses bullish again, that pullback entry has a statistical edge over random entries. Backtesting across 6-17 months of data confirmed this for Gold (PF 1.51), Bitcoin (PF 1.17), and Ethereum (PF 1.12).
Money Flow (Cipher B method)
Instead of traditional volume-based MFI (which is unreliable on CFD instruments where broker volume is tick count, not real volume), this indicator uses the Cipher B approach: the ratio of candle body size to total candle range, smoothed over 60 periods. This produces a volume-independent momentum wave that oscillates around zero. Green = buying pressure dominant, red = selling pressure dominant. This works identically on forex, CFDs, crypto, and futures.
The formula: SMA((close - open) / (high - low) * 150, 60) - 2.5
Multi-timeframe dashboard
The overlay table shows each enabled timeframe's trend state (BULL/BEAR), WT1 value, Money Flow direction, and whether a fresh crossover dot just appeared (NEW). This eliminates the need to flip between timeframes manually. Timeframes are individually toggleable.
Instrument-specific alerts
Three backtested entry configurations are built in, each symbol-locked so they only fire on the correct instrument:
Gold/Silver (XAUUSD/XAGUSD): 4H and 1H both bullish, 1H WT still below zero, 5m green dot with WT2 below -10. This configuration produced the strongest backtest results (Profit Factor 1.51 across 350 trades). Recommended exit: fixed 1:3 risk-reward.
Bitcoin (BTCUSDT): 1H bullish, 1H WT still below zero, 5m green dot with WT2 below -20. Marginal edge (PF 1.17). Recommended exit: WT overbought (+53).
Ethereum (ETHUSDT): 1H bullish, 1H WT still below zero, 5m green dot with WT2 at or below zero. Marginal edge (PF 1.12). Recommended exit: WT overbought (+53).
All instrument alerts fire once per cycle. A cycle resets only when the 1H WaveTrend crosses back through the zero line in the setup direction, ensuring the alert cannot re-fire on brief oscillations near the crossover point.
Short-side alerts use the inverse logic with flipped thresholds.
Additional alerts
Generic green/red dot alerts on the current chart timeframe, filtered dot alerts (oversold/overbought only), generic HTF pullback alerts (4H+1H bias with LTF dot below zero), full alignment alerts (all enabled timeframes agree), and Money Flow zero-cross alerts.
How to use
Add the indicator to a 5m chart of your instrument. Enable the "Any alert() function call" alert to receive all relevant signals. The dashboard provides at-a-glance multi-timeframe context. Use the instrument alerts as entry candidates and confirm with price action, support/resistance levels, and risk management before entering.
This indicator does not generate buy/sell orders. It identifies statistical pullback setups within established trends. Not every alert is a trade.
Settings
WaveTrend parameters default to 9/12/3 (matching Cipher B). Money Flow defaults to period 60, multiplier 150. All inputs are accessible in settings but hidden from the status line by default to keep the chart clean. Dashboard position and size are configurable.
Credits
WaveTrend calculation based on LazyBear's WaveTrend with Crosses. Money Flow concept inspired by Cipher B's volume-independent approach. Multi-timeframe architecture and instrument-specific alert system are original.
Nota Keluaran
v1.8 — Nuclear Alert (Multi-TF Extreme Reversal)Adds a rare, high-conviction counter-trend signal that fires when all enabled timeframes are simultaneously at WaveTrend extreme and a reversal dot appears on the chart timeframe.
How it works
For each enabled timeframe (4H, 1H, 30m, 15m, chart TF), the indicator checks whether WT2 has exceeded a configurable threshold. When all of them are beyond that threshold simultaneously — meaning the entire timeframe stack from 5-minute to 4-hour is at extreme overbought or oversold — and a WaveTrend crossover dot fires on the chart timeframe, the Nuclear signal triggers.
This is a counter-trend reversal play. The logic: when every timeframe is stretched past the same extreme at once, the probability of a snapback increases significantly. The reversal dot provides the timing.
Backtested results (Gold, 5m chart, 17 months)
The only profitable configuration found during backtesting was ±60 threshold with all 5 timeframes required. At these settings: Profit Factor 2.27, win rate 53%, approximately 2 trades per month, 32 total trades. Both long and short directions were profitable.
Relaxing to ±50 or requiring only 4 of 5 timeframes produced 309 trades over the same period with no edge. The signal degrades rapidly when the criteria are loosened because it starts capturing normal trending conditions rather than genuine multi-timeframe exhaustion events.
The defaults are set to the backtested optimum (threshold 60, minimum 5 TFs). The inputs remain adjustable for users who want to test on other instruments.
New visuals
A subtle background tint appears when the extreme zone is active (before the dot fires): green for oversold, red for overbought. Small diamond markers appear at the bottom of the indicator pane when the nuclear signal fires — green for long, red for short.
A new row in the dashboard table shows the nuclear status: the count of timeframes currently at extreme (e.g. "4/5 OB") and whether the zone is active.
New alerts (4)
Nuclear Long and Nuclear Short fire on the actual entry signal. Nuclear Zone Active (Oversold) and Nuclear Zone Active (Overbought) fire when the extreme count first reaches the threshold — these are early warnings before the reversal dot appears.
Also in this update
High Confidence signals (v1.6): when an instrument-specific alert (ETH/BTC/XAU) fires simultaneously with RSI divergence on the chart timeframe, a High Confidence alert fires. These are alert-only with no chart markers (pane indicator, so overlay markers would distort the scale).
Fire-once reset fix (v1.5): instrument alert flags now reset only when the 1H WaveTrend crosses through zero, not on every bias flip. This prevents re-firing when the 1H oscillates near its crossover point.
Settings
Under "Nuclear Alert (Multi-TF Extreme)": enable toggle, WT2 threshold (default 60), minimum TFs required (default 5), background tint toggle. All inputs are hidden from the status line.
No existing functionality was changed. All previous alerts remain intact.
Nota Keluaran
v2.0 — Cascade Scalp (1-Minute BTC Multi-TF Dot Cascade)Adds a scalping system for BTC that uses three timeframes in sequence: 30m sets the trend, 5m provides the pullback window, and 1m delivers the precision entry with quality filters.
How it works
The cascade fires in two stages. First, on a 5m chart, a CASCADE READY signal appears when the 30m WaveTrend is trending and a 5m dot fires in pullback territory (WT2 below zero for longs). This is an early warning to switch to the 1m chart.
On the 1m chart, the CASCADE ENTRY fires when all five conditions align simultaneously: 30m trend confirmed, a fresh 5m dot within the last 75 chart bars, a 1m dot with WT2 below -20 (deep pullback), a candle that closes in the upper 60% of its range (strong close), and the current UTC hour falls within validated session windows.
The deep pullback threshold (-20 instead of 0) was the key finding during backtesting. Dots between 0 and -20 had significantly worse win rates. The -20 level ensures the entry occurs during genuine fear rather than a shallow dip.
The close strength filter checks the candle body position relative to the bar range. A dot candle that closes near its low despite crossing bullish indicates wick rejection and weak buying. The 0.6 threshold requires the close to be in the upper 60% for longs, filtering out these weak entries.
Best hours filter
Not all hours produce the same results. The system defaults to UTC hours 7, 8, 13, 14, 17, 20, 21, and 22, corresponding to London open, New York cash open, and late New York sessions. Without this filter, the profit factor drops from 2.38 to 1.61 because overnight signals lack the institutional order flow that drives directional moves.
The filter is toggleable for users who want to test on all hours.
Exit logic
Three exits run simultaneously: opposite 1m dot (primary), trail stop (after +0.5R profit, trail at 0.3R distance from high watermark), and 60-bar time stop. The stop loss is placed at the dot candle low minus 0.3 times ATR(10).
Backtested results (BTC, 1m chart, 15 months)
With all filters active during best hours: Profit Factor 2.38, win rate 61.5%, 109 trades, approximately 7 per month. Average winner +1.18R, average loser -0.79R.
Without best hours filter: PF 1.61, 275 trades. Without deep pullback filter (threshold 0): PF approximately 1.6. Gold was tested over 40 months and is not viable on 1m (PF below 0.84).
New visuals
Green circle on 5m chart for CASCADE READY long, red circle for short. Green arrow with "CL" label on 1m chart for CASCADE ENTRY long, red arrow with "CS" for short.
A new dashboard row shows cascade status: WT2 value and close strength on 1m charts, 5m dot freshness on 5m charts, and trade direction when active.
New alerts (3 alertconditions + 4 rich alerts)
CASCADE READY fires on the 5m chart as an early warning. CASCADE ENTRY Long and Short fire on 1m with the full signal. Rich alert messages include 5m dot age, WT2 value, close strength, and MFI state.
New settings
Under "Cascade Scalp (1m BTC)": enable toggle, 5m dot freshness (default 15 bars), pullback thresholds (5m: 0, 1m: -20), close strength (0.6), best hours toggle, trail parameters (0.5R start, 0.3R distance), max 60 bars, max 5 trades per day, signal visibility toggle. All inputs hidden from status line.
Also in v1.9
MFI bar: Cipher B-style red/green filled bar at the bottom of the pane showing money flow direction. Toggle in Money Flow settings. Off by default.
WT divergence lines: visual divergence detection on the WaveTrend wave using the Cipher B 2-bar fractal method. Faster than RSI pivot-based divergence (2-bar confirmation delay instead of 5). Draws colored lines connecting WT2 divergence points with dot markers. Toggle in WT Divergence settings. Off by default.
Implementation notes
No new request.security calls were added. Cascade reuses existing 30m WT data (bull_30m) and 5m dot data (bullDot_5m, wt2_5m). The 1m logic uses the chart timeframe WT which is already computed. The cascade system includes a timeframe guard: entry signals only fire on charts with timeframe of 1 minute or less.
Cascade and Nuclear are independent features that coexist. Nuclear detects multi-TF extreme reversals (rare, counter-trend). Cascade detects multi-TF dot alignment for trend-following scalps (frequent, with-trend). Different edges, different trade profiles, same indicator.
No existing functionality was changed. All previous alerts remain intact.
Nota Keluaran
UPDATE v2.2 ... Wave Gradient Fill + ADX Dashboard + Auto WT2 SmoothingTwo updates since v2.0 (Cascade Scalp).
v2.2 ... Wave Gradient Fill + ADX
Visual upgrade to the WaveTrend pane. The wave area between WT1 and the zero line now shows a gradient fill that intensifies as the wave approaches the threshold lines.
- RED gradient appears between +30 and +53 ... the closer to overbought, the stronger the red tint. Signals "overheated, be cautious."
- GREEN gradient appears between -30 and -53 ... the closer to oversold, the stronger the green tint. Signals "buy opportunity zone."
- Between ±30 and zero ... fully transparent. Money Flow wave stays clearly visible in the neutral zone.
This is a pure visual enhancement. No logic changes. Gives you an instant read on how close the wave is to extreme territory without checking numbers.
ADX(14) added to the dashboard in the Nuclear row. Shows chart-timeframe trend strength at a glance.
- Green (≥25) ... confirmed trend, WT dots are higher probability
- Yellow (17-25) ... trend developing
- White (<17) ... ranging/choppy, treat WT signals with caution
Especially useful on Daily and 8H timeframes where ADX filtering was validated in backtesting (XAUUSD Daily with ADX ≥20 ... PF 9.25).
v2.1 ... Auto WT2 Smoothing
WT2 signal line now adapts automatically based on chart timeframe.
- Low TF (5m to 4H): SMA(wt1, 3) ... Cipher B style, faster dots for scalping and intraday
- High TF (8H and above): SMA(SMA(wt1, 4), 3) ... double smoothed, reduces noise for swing trading
This matches the exact smoothing used in backtested Swing Trader configurations on 8H/12H/Daily. Previously you had to manually adjust the WT2 SMA length when switching between scalping and swing timeframes. Now it handles itself.
Toggle: "Auto WT2 Smoothing (8H+ TFs)" ... ON by default. Turn OFF to use the base WT2 SMA Length on all timeframes.
MTF dashboard data is not affected ... always uses the base calculation regardless of this setting.
Nota Keluaran
Updated Dashboardincluding ADX number
Nota Keluaran
updated the alert filters for the Cascade filterSkrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.