OPEN-SOURCE SCRIPT
Volume Spike Accumulation [forexobroker]

Volume Spike Accumulation [forexobroker] reads volume spikes through where the bar closed in its own range. A spike that closes in the upper part of the range is demand absorbing supply (accumulation); a spike closing in the lower part is supply (distribution). Accumulation arms a long bias and distribution a short bias, and entries time off an EMA reclaim in the bias direction so signals are frequent rather than one-per-spike.
🔶 ALGORITHM
1. Compute ATR and an SMA of volume over the volume-MA length as the baseline.
2. Flag a volume spike when volume >= k x its moving average.
3. Close-position classification: clsPos = (close - low) / (high - low). A spike with clsPos >= the close-position threshold is accumulation; clsPos <= 1 - threshold is distribution.
4. Relative volume = volume / volume-MA for the dashboard.
5. Accumulation arms a persistent long bias and distribution a persistent short bias, holding until the opposite classified spike fires.
6. Entry timing: an EMA reclaim (close crossing the entry-reclaim EMA in the bias direction), or strictly the classified spike bar in Spike-Only Mode.
🔶 SIGNAL LOGIC
- Buy: bias == long (last classified spike was accumulation) AND close crosses over the reclaim EMA (or an accumulation spike bar in Spike-Only Mode), in session, with no active long, cooldown elapsed, and barstate.isconfirmed; position locks long.
- Sell: bias == short (last classified spike was distribution) AND close crosses under the reclaim EMA (or a distribution spike bar in Spike-Only Mode), in session, with no active short, cooldown elapsed, and barstate.isconfirmed; position locks short.
Only fires while the persistent spike bias agrees with the entry direction.
🔶 INPUTS
- Volume group: volume MA length for the spike baseline (default 20).
- Volume group: spike multiple of the volume MA (default 1.8).
- Volume group: close-position threshold for accumulation vs distribution (default 0.66).
- Volume group: ATR length (default 14).
- Signal Logic group: entry reclaim EMA length (default 9).
- Signal Logic group: Spike-Only Mode toggle (default off) and cooldown bars (default 5).
- Filters group: restrict-to-session toggle and session window (default 0000-2400).
- Visual group: show dashboard, 3-layer glow, and reclaim EMA (all default on).
- Visual group: buy color, sell color, and dashboard background.
🔶 ALERTS
VSA Buy, VSA Sell, VSA Any Signal, VSA Accumulation, VSA Distribution, VSA Volume Spike, VSA Classified, VSA EMA Up, VSA EMA Down, VSA Bias Bull, VSA Bias Bear, VSA Spike Tick, VSA Webhook JSON.
🔶 LIMITATIONS
- Volume-based: needs a real volume feed; forex volume is tick-volume, which only approximates traded size.
- Needs warm-up bars for the volume MA and ATR before spikes are valid.
- The spike multiple default is tuned for liquid instruments; quiet or thin symbols may need it retuned.
- The persistent bias holds until an opposite classified spike fires, so it can stay stale through quiet periods.
- Signals confirm on bar close; close-position and bias can change intrabar before the bar finishes.
🔶 ALGORITHM
1. Compute ATR and an SMA of volume over the volume-MA length as the baseline.
2. Flag a volume spike when volume >= k x its moving average.
3. Close-position classification: clsPos = (close - low) / (high - low). A spike with clsPos >= the close-position threshold is accumulation; clsPos <= 1 - threshold is distribution.
4. Relative volume = volume / volume-MA for the dashboard.
5. Accumulation arms a persistent long bias and distribution a persistent short bias, holding until the opposite classified spike fires.
6. Entry timing: an EMA reclaim (close crossing the entry-reclaim EMA in the bias direction), or strictly the classified spike bar in Spike-Only Mode.
🔶 SIGNAL LOGIC
- Buy: bias == long (last classified spike was accumulation) AND close crosses over the reclaim EMA (or an accumulation spike bar in Spike-Only Mode), in session, with no active long, cooldown elapsed, and barstate.isconfirmed; position locks long.
- Sell: bias == short (last classified spike was distribution) AND close crosses under the reclaim EMA (or a distribution spike bar in Spike-Only Mode), in session, with no active short, cooldown elapsed, and barstate.isconfirmed; position locks short.
Only fires while the persistent spike bias agrees with the entry direction.
🔶 INPUTS
- Volume group: volume MA length for the spike baseline (default 20).
- Volume group: spike multiple of the volume MA (default 1.8).
- Volume group: close-position threshold for accumulation vs distribution (default 0.66).
- Volume group: ATR length (default 14).
- Signal Logic group: entry reclaim EMA length (default 9).
- Signal Logic group: Spike-Only Mode toggle (default off) and cooldown bars (default 5).
- Filters group: restrict-to-session toggle and session window (default 0000-2400).
- Visual group: show dashboard, 3-layer glow, and reclaim EMA (all default on).
- Visual group: buy color, sell color, and dashboard background.
🔶 ALERTS
VSA Buy, VSA Sell, VSA Any Signal, VSA Accumulation, VSA Distribution, VSA Volume Spike, VSA Classified, VSA EMA Up, VSA EMA Down, VSA Bias Bull, VSA Bias Bear, VSA Spike Tick, VSA Webhook JSON.
🔶 LIMITATIONS
- Volume-based: needs a real volume feed; forex volume is tick-volume, which only approximates traded size.
- Needs warm-up bars for the volume MA and ATR before spikes are valid.
- The spike multiple default is tuned for liquid instruments; quiet or thin symbols may need it retuned.
- The persistent bias holds until an opposite classified spike fires, so it can stay stale through quiet periods.
- Signals confirm on bar close; close-position and bias can change intrabar before the bar finishes.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.