PROTECTED SOURCE SCRIPT
Cập nhật DM Super Algo

Here’s what each row in the Summary Table means and how you’d use it:
Mode
Shows your selected trade style (Scalp / Day trade / Swing) plus the ATR settings tied to it.
Use it to remember what volatility context you set the algo to (it also informs some visuals/OB stats under the hood).
ADX
Current trend strength from the Wilder ADX. It also labels the regime: WEAK / MODERATE / STRONG / VERY STRONG.
When ADX is below your “ADX min” input, the algo treats trend as weak; unified signals only fire when trend is strong.
Vol >MA*x
Whether current volume is UNUSUAL (above SMA(volume, flowVolLen) × flowVolMult) or NORMAL.
UNUSUAL volume = better odds a move can follow through; it also contributes a “vote.”
RSI(len)
Shows RSI value or zone: Overbought / OB Zone / Oversold / OS Zone / number.
Above 50 adds a bull vote; below 50 adds a bear vote. OB/OS text just gives quick context.
ATR(len)
Shows the ATR and (optionally) the ATR % of price (e.g., “1.23 (0.65%)”).
Higher ATR = more noise/range; useful for setting stops/targets sized to current volatility.
DM Total BUY
Rolling total of estimated buy volume over your lookback window (formatted in K/M/B).
Bigger than SELL suggests net buying pressure recently.
DM Total SELL
Rolling total of estimated sell volume over the same window.
Bigger than BUY suggests net selling pressure recently.
DM Buy Dom%
The share of buy volume in total (BUY / (BUY+SELL)), as a percentage.
>50% favors bulls; <50% favors bears. It also feeds a vote.
Votes (B/Bear)
The bull vs bear tally from 5 components:
Price vs EMA(Trend)
RSI vs 50
DM dominance (>50%)
CVD slope (last 5 bars)
Volume condition
When trend is strong (ADX filter passes) and one side has ≥3 votes AND more than the other, the script plots its triangle marker.
How to use the table (quick workflow)
Check ADX: If not “STRONG/VERY STRONG,” be cautious—signals won’t print unless trend passes your ADX threshold.
Scan Votes: A clear majority (e.g., 4/1) is stronger than 3/2.
Confirm with Volume: “UNUSUAL” volume increases conviction.
Gauge Volatility: Use ATR (and ATR%) to size stops/targets.
Read DM & Dominance: BUY vs SELL totals and DM Buy Dom% tell you whether the recent flow supports the direction.
Mode
Shows your selected trade style (Scalp / Day trade / Swing) plus the ATR settings tied to it.
Use it to remember what volatility context you set the algo to (it also informs some visuals/OB stats under the hood).
ADX
Current trend strength from the Wilder ADX. It also labels the regime: WEAK / MODERATE / STRONG / VERY STRONG.
When ADX is below your “ADX min” input, the algo treats trend as weak; unified signals only fire when trend is strong.
Vol >MA*x
Whether current volume is UNUSUAL (above SMA(volume, flowVolLen) × flowVolMult) or NORMAL.
UNUSUAL volume = better odds a move can follow through; it also contributes a “vote.”
RSI(len)
Shows RSI value or zone: Overbought / OB Zone / Oversold / OS Zone / number.
Above 50 adds a bull vote; below 50 adds a bear vote. OB/OS text just gives quick context.
ATR(len)
Shows the ATR and (optionally) the ATR % of price (e.g., “1.23 (0.65%)”).
Higher ATR = more noise/range; useful for setting stops/targets sized to current volatility.
DM Total BUY
Rolling total of estimated buy volume over your lookback window (formatted in K/M/B).
Bigger than SELL suggests net buying pressure recently.
DM Total SELL
Rolling total of estimated sell volume over the same window.
Bigger than BUY suggests net selling pressure recently.
DM Buy Dom%
The share of buy volume in total (BUY / (BUY+SELL)), as a percentage.
>50% favors bulls; <50% favors bears. It also feeds a vote.
Votes (B/Bear)
The bull vs bear tally from 5 components:
Price vs EMA(Trend)
RSI vs 50
DM dominance (>50%)
CVD slope (last 5 bars)
Volume condition
When trend is strong (ADX filter passes) and one side has ≥3 votes AND more than the other, the script plots its triangle marker.
How to use the table (quick workflow)
Check ADX: If not “STRONG/VERY STRONG,” be cautious—signals won’t print unless trend passes your ADX threshold.
Scan Votes: A clear majority (e.g., 4/1) is stronger than 3/2.
Confirm with Volume: “UNUSUAL” volume increases conviction.
Gauge Volatility: Use ATR (and ATR%) to size stops/targets.
Read DM & Dominance: BUY vs SELL totals and DM Buy Dom% tell you whether the recent flow supports the direction.
Phát hành các Ghi chú
the highest-quality entries come when your Signal = BUY and Trend = Bullish at the same time, with strong context behind them. Here’s a tight checklist you can actually trade from:A+ Bullish Entry (my best setup)
Signal row: shows 𝐁𝐔𝐘.
Trend row: Bullish (price > Trend EMA).
ADX: category MODERATE or better (≥ your flowAdxMin, default 20).
Volume: UNUSUAL (volume > MA × multiplier).
RSI: crossing up through 50 (ideally coming from OS/neutral, not already >70).
DM Buy Dom%: > 55% (dominance clearly on the buy side).
CVD slope: positive (rising cumulative delta).
Entry timing: wait for a small pullback into EMA-9 or the mid-body of the signal candle, then enter on a higher low + bullish rejection (wick through EMA-9 that closes above it).
Risk & Targets
Stop: below EMA-9 or 1.0× ATR under the entry candle low (whichever is farther), or under PDL/PML if they’re nearby.
First target: PMH/PDH (pre-market/day high) or +1× ATR.
Runner: trail under EMA-9 (scalp/day) or EMA-20 (swing).
Invalidation: if Trend flips to Bearish or Signal flips to SELL before target 1, exit.
A+ Bearish Entry (mirror)
Signal = 𝐒𝐄𝐋𝐋, Trend = Bearish, ADX ≥ threshold, Volume UNUSUAL, RSI down through 50, DM Buy Dom% < 45%, CVD slope negative.
Entry: pop back to EMA-9 from below with bearish rejection.
Stop: above EMA-9 or +1× ATR over the entry bar high / above PDH/PMH.
Targets: PML/PDL or −1× ATR first; trail above EMA-9/EMA-20.
Style tweaks
Scalp: require ADX ≥ 25, use EMA-9 pullbacks, take 50–70% off at ±0.75–1.0× ATR.
Day trade: ADX ≥ 20–25, EMA-9 first touch after the BUY/SELL print; add on EMA-20 if context stays aligned.
Swing: wait for two closes above/below Trend EMA and RSI 50 cross; use ATR 1.5× stops; scale at prior day/week levels.
Avoid these
Signal prints without Trend agreement.
Weak ADX + UNUSUAL volume (news/whips).
RSI > 70 (late long) or < 30 (late short) at entry.
Entering directly into PDH/PDL/PMH/PML—use them as targets or breakout triggers, not blind entries.
Phát hành các Ghi chú
When to enterLong (BUY): Wait for the confirmed BUY signal at bar close. Under the hood that means: two consecutive green candles closing above EMA-9 and DM Buy > DM Sell.
Short (SELL): Take the confirmed SELL signal at bar close: two consecutive red candles closing below EMA-9 and DM Sell > DM Buy.
Signals are non-repainting and the Signal status stays on until the opposite side prints.
Context filters (optional but helpful)
Trend: Prefer longs when price is above EMA(Trend) and shorts when below (Trend row shows Bullish/Bearish).
Strength: ADX ≥ your threshold (e.g., 20+) = healthier trend.
Volume: “UNUSUAL” volume boosts conviction.
RSI: Longs work better above 50; shorts below 50.
Stops & targets
Use ATR to size stops (e.g., 1.0–1.5× ATR beyond the signal candle low/high).
Nearby structure helps: PDL/PDH, PML/PMH for logical stops/targets.
Trail with EMA-9 or shift to breakeven after +1× ATR.
Exits
Base exit on the opposite confirmed signal, or
Take partials at PDH/PDL / PMH/PML or after 1–2× ATR, or
Flatten on momentum fade (RSI crosses back to 50 against your position).
Timeframes / style
Use the Trade Style input to match your timeframe (Scalp/Day/Swing). The logic is the same; ATR and context help adjust risk.
Alerts
Turn on alerts— they fire only on confirmed signals at close.
Risk
Keep risk per trade small (e.g., 0.5–1%). Skip trades when ADX weak, volume dead, or price stuck between PDH/PDL.
That’s it: trade only confirmed signals, align with trend/strength, anchor risk to ATR and recent high/low levels, and let the opposite signal or your targets take you out.
Phát hành các Ghi chú
use it like a checklist:Trend & context
Trade with the trend: price above EMA50 (bull) or below (bear).
ADX ≥ 20 (avoid chop).
Prefer unusual volume and clear higher-highs/lowers-lows.
Level & trigger
Mark a nearby level (PDH/PDL, PMH/PML, swing high/low, or EMA9).
Long: wait for your script’s confirmed BUY (two green above EMA9 + Buy Dominant).
Short: confirmed SELL (two red below EMA9 + Sell Dominant).
Enter on a slight pullback to the trigger candle’s 50–62% or to EMA9, not at the candle top/bottom.
Risk first (always)
Put stop beyond structure (below last swing/ATR(14)×1 for longs; above for shorts).
Size the position so a stop-out risks ≤1–2% of account.
Set targets: TP1 at 1R, move stop to breakeven; TP2 at 2R–3R or trail with EMA9/ATR.
Only take A+ setups
Confluence = trend + level + trigger + volume/dominance.
Skip if ADX < 20, tiny ranges, or signal prints straight into resistance/support.
Execution rules
Use limit on pullback; avoid chasing breakouts after large candles.
Predefine entry, stop, targets; set alerts; don’t widen stops.
If you follow just one sentence: Trade in the direction of EMA50 with ADX ≥ 20, enter on a pullback to EMA9 right after your script’s confirmed signal, risk ≤2% with stop beyond structure, scale at 1R and trail.
Phát hành các Ghi chú
Practical way to trade the indicator. Pick the rule-set that fits your style (Scalp / Day trade / Swing).1) Baseline entries (use even if the scalping combo is OFF)
Long entry
Wait for a confirmed Buy (the green triangle after the bar closes).
Prefer entries when votes Bull ≥ 3 and ADX ≥ flow Adx Min (i.e., not “WEAK”).
Extra confirmation (optional but helpful):
vol Strong = true (volume > MA × multiplier), and
rsi Val > 50.
Short entry
Wait for a confirmed Sell (the red triangle after the bar closes).
Prefer when votes Bear ≥ 3 and ADX ≥ flow Adx Min.
Optional adds:
vol Strong = true,
rsi Val < 50.
Stop, target, and position sizing (mode-aware)
Use your mode’s ATR map as a volatility gate:
Scalp: ATR(len=7) × 0.5
Day trade: ATR(14) × 1.0
Swing: ATR(21) × 1.5
Initial stop: below (for longs) / above (for shorts) the signal bar’s wick by 0.8–1.2 × ATR(mode) or below/above a recent swing.
First target: 1.5–2.0 × risk (R).
Trail: once +1R hits, move stop to breakeven; then trail by ATR(mode) or last minor swing.
Stand down if ADX shows WEAK and there’s no vol Strong—chop risk is high.
2) “Conservative” filter (improves win rate, fewer trades)
Add BOTH:
trend filter: close > emaTrend for longs (or < emaTrend for shorts), and
dominance filter: domBuy > 0.5 for longs (domSell > 0.5 for shorts).
Then take only the matching confirmed signals.
3) “Aggressive” mode (more trades)
Take any confirmed signal if votes Bull − votes Bear ≥ 1 (or vice-versa),
But still demand vol Strong OR ADX ≥ flowAdxMin,
Keep stops tighter (0.6–0.8 × ATR(mode)) and scale out faster (1.2–1.5R).
4) Using the optional DM Scalping Combo (EMA9 • EMA20 • VWAP)
Turn it on when you want extra precision around breakouts/pullbacks.
Long entry (combo on)
Structure: all Above = true (price above EMA9, EMA20, and VWAP),
Color: combo line is lime,
Ideal trigger 1: a confirmed Buy forms while all Above.
Ideal trigger 2: Breakout from consolidation:
When in Consolidation = true and the shaded zone is visible, wait for a close above zone High while all Above → enter on that close or next bar’s small pullback.
Short entry (combo on)
allBelow = true, combo line red,
Take the confirmed Sell while all Below, or a close below zone Low out of consolidation.
Pullback entries with combo
In an uptrend (all Above): buy the first bull candle close back above EMA9 after a small dip that stays above EMA20/VWAP.
In a downtrend (all Below): short the first bear candle close back below EMA9 after a bounce that stays below EMA20/VWAP.
Stops/targets with combo
On breakouts from the zone: stop just inside the opposite side of the zone (or ATR(mode)), target 1 = zone height (measured move), target 2 = 1.5–2R.
On pullbacks: stop beyond EMA20 (trend-keeper) or ATR(mode); trail under/over EMA20 or by ATR.
5) Practical checklist (per trade)
Bar closed? (you use barstate.isconfirmed)
Signal triangle printed? (BUY/SELL)
Votes favor your direction? (≥3 is solid)
ADX at least flowAdxMin?
Volume unusual? (vol Strong)
For combo trades: all Above/all Below and (if used) in Consolidation breakout?
Place stop = ATR-based or structural (swing/zone).
Pre-define exits: scale at 1–1.5R, trail remainder.
6) Timeframe tips
Scalp: 1–5m (enable combo, use ATR×0.5).
Day trade: 5–15m (ATR×1.0).
Swing: 1h–4h (ATR×1.5), rely more on ema Trend and votes, less on combo.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.