OPEN-SOURCE SCRIPT
D/K Strength + Smart Money Accumulation

A multi-component momentum and accumulation oscillator adapted from the Wenhua/TDX (Chinese trading platforms) community formula "多空力度 + 主力吸筹 文华专用 稳定版".
— LINES PLOTTED —
• Long Strength (green)
A double-smoothed stochastic momentum on a 27-bar window, using the formula 3*SMA(stoch,5,1) - 2*SMA(SMA(stoch,5,1),3,1). Rising from low levels signals strengthening demand. Readings above 90 indicate extended bullish momentum.
• Short Strength (red)
Distance of close from the 55-bar high, normalized to 0–100. Persistent readings above the 44 midline reflect bearish pressure; values near 100 mean price is at a 55-bar low.
• Smart Money Accumulation (yellow)
A volume-free proxy detecting potential accumulation at the 30-bar low. Spikes above zero — especially appearing after a downtrend — are interpreted as buying pressure from larger participants.
— REFERENCE LEVELS —
0 = zero axis
44 = mid-line (long/short pressure boundary)
90 = overbought / overextended threshold
— HIDDEN DEBUG OUTPUTS (toggle in Settings → Style) —
J — classic KDJ J line (3K - 2D)
A65 — KD crossover marker (60 on bullish cross, 0 otherwise)
A151/A152 — deep oversold / overbought flags
Anquan — safety zone value
— TECHNICAL NOTE —
The original formula uses a recursive weighted average:
SMA(X, N, M) = (M*X + (N-M)*prev) / N
which is NOT equivalent to Pine's ta.sma. This implementation faithfully replicates the recursive form via inline state variables, preserving the original signal shape. All divisions are guarded against zero denominators.
— SUGGESTED USE —
• Long bias: Long Strength crossing above Short Strength while Accumulation spikes above zero.
• Short bias: Long Strength rolling over from 90 with Short Strength rising through the midline.
• Works on equities, futures and crypto. Best results on daily and 4-hour timeframes; usable on intraday with parameter awareness.
• Pair with the companion "Protection Price" overlay indicator for entry and stop reference.
A faithful Pine v6 port of the original community formula. Author of the original formula unknown.
— LINES PLOTTED —
• Long Strength (green)
A double-smoothed stochastic momentum on a 27-bar window, using the formula 3*SMA(stoch,5,1) - 2*SMA(SMA(stoch,5,1),3,1). Rising from low levels signals strengthening demand. Readings above 90 indicate extended bullish momentum.
• Short Strength (red)
Distance of close from the 55-bar high, normalized to 0–100. Persistent readings above the 44 midline reflect bearish pressure; values near 100 mean price is at a 55-bar low.
• Smart Money Accumulation (yellow)
A volume-free proxy detecting potential accumulation at the 30-bar low. Spikes above zero — especially appearing after a downtrend — are interpreted as buying pressure from larger participants.
— REFERENCE LEVELS —
0 = zero axis
44 = mid-line (long/short pressure boundary)
90 = overbought / overextended threshold
— HIDDEN DEBUG OUTPUTS (toggle in Settings → Style) —
J — classic KDJ J line (3K - 2D)
A65 — KD crossover marker (60 on bullish cross, 0 otherwise)
A151/A152 — deep oversold / overbought flags
Anquan — safety zone value
— TECHNICAL NOTE —
The original formula uses a recursive weighted average:
SMA(X, N, M) = (M*X + (N-M)*prev) / N
which is NOT equivalent to Pine's ta.sma. This implementation faithfully replicates the recursive form via inline state variables, preserving the original signal shape. All divisions are guarded against zero denominators.
— SUGGESTED USE —
• Long bias: Long Strength crossing above Short Strength while Accumulation spikes above zero.
• Short bias: Long Strength rolling over from 90 with Short Strength rising through the midline.
• Works on equities, futures and crypto. Best results on daily and 4-hour timeframes; usable on intraday with parameter awareness.
• Pair with the companion "Protection Price" overlay indicator for entry and stop reference.
A faithful Pine v6 port of the original community formula. Author of the original formula unknown.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.