NEWCard payments are live · from $18/month, USDT also acceptedSee plans
COINPRED / STRATEGY LIBRARY

BTC Volume fight: Enter when one side's volume takes a clear lead, then exit when the other side takes over

An open-source trend strategy by Shuttle_Club (MPL 2.0). By default it trades both ways: it goes long and covers a short when a bullish volume zone first appears, and goes short and exits a long when a bearish zone first appears. The author's chart is BINANCE:BTCUSDT.P on the daily timeframe. The rules follow the source; this page does not invent backtest figures.

Illustrated guidesPine Script®Included with monthly & annual plans
← All strategies
Shuttle_Club · 1.0 · 2026-11-30 · Trend following
BTC Volume fight: Enter when one side's volume takes a clear lead, then exit when the other side takes over

What the strategy is trying to do

This is an open-source script by Shuttle_Club. The script title is “Volume fight strategy”. It splits each bar's volume into a bullish piece and a bearish piece, takes a volume-weighted moving average of each, and treats one side as in control only when that lead is large enough; a narrower gap is marked as a flat zone. Direction defaults to ANY, so both sides can trade: the first bar of a bullish zone opens a long and closes a short, and the first bar of a bearish zone opens a short and closes a long. The author's chart is BINANCE:BTCUSDT.P on the daily timeframe. The rules follow the source; this page does not invent backtest figures.

The publication chart is BINANCE:BTCUSDT.P (BTCUSDT perpetual) on the daily timeframe, so this page files the script under BTC. The source does not hard-code a symbol, and the publication page says it can be used on other markets and timeframes, but the write-up and the image follow that chart. The script does not set overlay to true, so the volume plots appear in a separate pane.

Author chart of the Volume fight strategy on BINANCE:BTCUSDT.P, daily timeframe, showing price, the volume-difference area, and trade markers
Author chart: BINANCE:BTCUSDT.P (BTCUSDT perpetual), daily timeframe, from the author's publication page. Price, the volume-difference plot, and trade markers are visible; the image is only to show the layout, not performance.

How the indicators are calculated

  • On a bullish candle (open below close), bullish volume is the bar's full volume; on a bearish candle, bullish volume is volume times (high minus open) divided by (high minus low). Bearish volume is the mirror image: the full volume on a bearish candle, and the lower-wick share on a bullish candle. Only when open equals close do the two sides split the bar's volume exactly by the upper and lower wicks. The publication page describes this as dividing volume into two parts, but on up and down candles the two sides can add up to more than the bar's volume. That is how the source is written.
  • If high equals low, that division has no denominator, the split for that bar becomes na, and the averages can be pulled off course.
  • Each side is smoothed with a volume-weighted moving average (VWMA) of length Search_range (11 by default).
  • A bullish zone needs the bullish VWMA above the bearish VWMA, and “half the sum of the absolute VWMAs” divided by the bullish VWMA to be below 1 − (the smoothing percentage ÷ 100) (15% by default, so the ratio must be under 0.85). A bearish zone uses the same test with the bearish VWMA in the denominator. If the two sides are close, neither zone is active and the bar is treated as flat.
  • The Volume difference area in the pane is a simple moving average, of the same length, of the two VWMAs' difference relative to volume. It is for display only and does not fire orders.
  • Counters named up and dn record how many bars the current zone has lasted. When a bullish zone starts, up becomes 1 and then rises by one on each extra bar; a bearish zone does the same with dn and clears the other counter.

Entry rules

  • Long (order name Long): Direction is not SHORT (ANY, the default, allows longs), the bar is in a bullish zone, and up equals 1 — the first bar of that bullish zone.
  • Short (order name Short): Direction is not LONG, the bar is in a bearish zone, and dn equals 1.
  • Show each setup in zone is off by default. The counters are not reset in a flat zone, so if price leaves a bullish zone, goes flat, then returns to a bullish zone, up keeps incrementing from its previous value and does not go back to 1, so no second long is opened. A bearish zone has to clear up before the next first bar of a bullish zone can enter again. Turn the option on and a flat zone zeroes both counters, so the same direction can re-enter after a pause.
  • The script is not limited to one market, but this page describes it against the author's BTC perpetual chart.

Exits and position size

  • A short exits when a bullish zone appears and up equals 1 (the Short order is closed).
  • A long exits when a bearish zone appears and dn equals 1 (the Long order is closed).
  • The source issues the closes first, then the entries, so a flip closes the old position before Direction decides whether a new one should open.
  • There is no separate take-profit, stop-loss, or trailing stop. Exits depend only on a change of zone.
  • Orders are a fixed 10,000 units of cash in USD, not a percentage of current equity. Initial capital is also 10,000, so the first fill uses the starting capital in full, and later fills are still 10,000 dollars. commission_value is 0.04; with no commission type set, Pine's default is a percentage, so that is 0.04%. calc_on_order_fills and calc_on_every_tick are both off.

Inputs (source defaults)

InputDefaultRole
DirectionANYANY trades both sides; LONG is long only; SHORT is short only. An opposite zone can still close an open position.
Search_range11Length of the bullish and bearish volume VWMAs, and of the simple average used for the volume-difference plot. The author notes that a smaller timeframe should use a longer range to filter false signals.
Smoothing_for_flat,%15Flat-zone threshold. A lead counts only if the ratio is below 1 − (this value ÷ 100); at 0, any VWMA lead becomes a zone and false signals increase.
Show background zonestrueTints the current zone. It does not change orders.
Show each setup in zonefalseWhen off, a flat zone does not reset up and dn; when on, a flat zone zeroes the counters and the same direction can enter again after the pause.

Things to know before using it

  • Each order is 10,000 dollars, commission is 0.04%, and initial capital is 10,000. Live fees, contract size, and quote currency often differ, so tester results are not a live forecast.
  • A bullish candle assigns the full volume to the bullish side, and a bearish candle assigns the full volume to the bearish side, while the other side can still receive a wick-based share. The two sides are not a clean, exclusive split.
  • By default the script will not re-enter after a same-direction pause through a flat zone. That changes if you turn on Show each setup in zone.
  • When high equals low, the split has no denominator. If volume or an average is zero, the flat-zone ratio can also be undefined.
  • The author's chart is daily. The publication page says shorter timeframes are possible, but Search_range defaults to 11, and the author already warns that a shorter timeframe should use a longer range.

Installing it on TradingView

  1. Download the .pine file from Coinpred (active membership required, see below), or check the original page for a newer version.
  2. Open the Pine Editor, create a blank script, paste the full source, and save.
  3. Click Add to chart. To match the author image, start with BINANCE:BTCUSDT.P on the daily timeframe. The volume-difference plot appears in a separate pane.
  4. Review Direction, Search_range, the flat-zone smoothing, order size, and commission in the strategy properties, then inspect fills in the Strategy Tester.
  5. Past tester results do not guarantee future returns.

About backtest figures

Source, license and version

  • Source: https://www.tradingview.com/script/alrI0TBw-volume-fight-strategy/
  • Author: Shuttle_Club. Source version 1.0 (Pine v5), scriptAccess=open_no_auth.
  • License: Mozilla Public License 2.0. Redistribution must keep the copyright and license notices; modified files must remain under MPL 2.0. Coinpred ships the unmodified full source.
  • Members can download the .pine file on this page to study the rules. Judge the risk yourself, and follow your venue's rules.

Source, license and version

Licensed under MPL 2.0 per the source header, © Shuttle_Club. Redistribution must keep the copyright and license notices; modified files must remain under MPL 2.0. Coinpred ships the unmodified source.

View original source ↗

Check the script license and your TradingView account features. Historical results do not guarantee future performance.

More strategies

All strategies →