New AI Backtesting Assistant Launch!

Volume Delta Trailing Stop

Sep 5, 2023
Static chart image
Dynamic Overlays
Volume Based
Trailing-Stop

Works on the Following Platforms

tradingviewSymbolTradingView
For free use on the TradingView platform
ninjatraderNinjaTrader
For free use on the NinjaTrader platform
metatrader4MetaTrader 4
For free use on the MetaTrader 4 platform
metatrader5MetaTrader 5
For free use on the MetaTrader 5 platform
thinkorswimThinkorswim
For free use on the Thinkorswim platform

The 'Volume Delta Trailing Stop' indicator uses Lower Time Frame (LTF) volume delta data which can provide potential entries together with a Volume-Delta based Trailing Stop-line.

USAGE

Our 'Volume Delta Trailing Stop' script can show potential entries/Stop Loss lines indicator image indicator image

A trigger line needs to be broken before a position is taken, after which a Volume Delta-controlled Trailing Stop-line is created: indicator image indicator image

DETAILS

Volume rises when bought or sold

When the opening price appears on the chart, a buy/sell order has been executed.

If that order is less than the available supply of that particular price, volume will rise, without moving the price.

When the opening price is the same as the closing price, the volume of that bar can be seen as "neutral volume" (nV); nor "up", nor "down" volume.

[quote] Example

A buy order doesn't fill the first available supply in the order book. This price will be the opening price with a certain volume. When at closing time, price still hasn't moved (the first available supply in the order book isn't filled, or no movement downwards), the closing price will be equal to the opening price, but with volume. This can be seen as "neutral volume (nV)". [/quote]

Delta Volume (ΔV): this is "up volume" minus "down volume"

Standard volume is colored red when closing price is lower than opening price ( = "down volume").

Standard volume is colored green when closing price is higher OR equal (nV) than opening price ( = "up volume").

indicator image

Neutral Volume

The "Neutral-Volume" is considered "Up-Volume" - setting will dictate whether nV is considered as green 'buy' volume or not. indicator image indicator image

EXAMPLE

29 July 10:00 -> 10:05, chart timeframe 5 minutes, open 29311.28, close 29313.89

close > open, so the volume (39.55) is colored green ("up volume"). (The Volume script used in the following examples is the open-source publication Volume Columns w. Alerts (V) [LucF] from LucF) indicator image

Let's zoom to the 1-minute TF: The same period is now divided into more bars, volume direction (color) is dependable on the difference between open and close. Counting up and down volume gives a more detailed result, it remains in an upward direction though): indicator image (ΔV = +15.51)

Let's further zoom in to the 1-second TF: The same period is now divided into even more bars (more possibility for changing direction on each bar) Here we see several bars that haven't moved in price, but they have volume ("neutral" volume). (neutral volume is coloured light green here, while up volume is coloured darker green) When we count all green and red volume bars, the result is quite different: indicator image (ΔV = -0.35) In total more volume is found when price went downwards, yet price went up in these 5 minutes.

  - > This is the heart of our publication, when this divergence occurs, you can see a barcolor changement:

    • orange: when price went up, but LTF Volume was mainly in a downward direction.
    • blue: when price went down, but LTF Volume was mainly in an upwards direction.

When we split the green "up volume" into "up" and "neutral", the difference is even higher (here "neutral volume" is colored grey): indicator image (ΔV = -12.76; "up" - "down")

CONCEPTS

bullishBear = current bar is  red  but LTF volume is in  upward direction ->   blue bar
bearishBull = current bar is green but LTF volume is in downward direction -> orange bar

Potential positioning - forming of Trigger-line

When not in position, the script will wait for a divergence between price and volume direction. When found, a Trigger-line will appear:

• at high when a blue bar appears (bullishBear). • at  low when an orange bar appears (bearishBull).

Next step is when the Trigger-line is broken by close or high/low (settings: Trigger)

Here, the closing price went under the grey Trigger-line -> bearish position: indicator image

Trailing Stop-line

When the Trigger-line is broken, the Trailing Stop-line (TS-line) will start:

low when bullish position • high when bearish position

You can choose (settings -> Trigger -> Close or H/L) whether close price or high/low should break the Trigger-line

When alerts are enabled ("Any alert() function call"), you'll get the following message: • 'signal up'  when bullish position • 'signal down' when bearish position

After that, the TS-line will be adjusted when: • a    blue    bullishBear  bar appears when in bullish position  ->  lowest   of {low , previous blue bar's high or orange bar's low} • an orange bearishBull bar appears when in bearish position -> highest of {high, previous blue bar's high or orange bar's low}

indicator image indicator image

When alerts are enabled ("Any alert() function call"), and the TS-line is broken, you'll get the following message: • 'TS-line broken down'  when out bullish  position • 'TS-line broken up'       when out bearish position indicator image

Reference Point

Default the direction of price will be evaluated by comparing closing price with opening price. When open and close are the same, you'll get "neutral volume".

You can use "previous close" instead (as in built-in volume indicator) to include gaps. If close equals open, but close is lower than previous close, it will be regarded as "down volume", similar, when close is higher than previous close, it will be regarded as "up volume"

Note, the setting applies for the current timeframe AND Lower timeframe:

Based on: "open" (close - open) indicator image

Based on: "previous close" (close - previous close) indicator image

Adjustment

When the TS-line changes, this can be adjusted with a percentage of price, or a multiple of "True Range"

Default (Δ line -> Adjustment - 0) indicator image

Δ line -> Adjustment 0.03% (of price) indicator image

Δ line -> Mult of TR (10) indicator image

SETTINGS

LTF: choose your Lower TimeFrame: 1S (seconds), 5S, 10S, 15S, 30S, 1 minute)

Trigger: Choose the trigger for breaking the Trigger-line; close or H/L (high when bullish position, low when bearish position)

Δ line (Trailing Stop-line): add/subtract an adjustment when the TS-line changes (default: Adjustment):

[quote] • Adjustment (default: 0): add/subtract an extra % of price • Mult of TR                     : add/subtract a multiple of True Range [/quote]

Based on: compare closing price against:

[quote] • openprevious close [/quote]

"Neutral-Volume" is considered "Up-Volume": this setting will dictate whether nV is considered as green 'buy' volume or not.

CONSIDERATIONS

The lowest LTF (1S) will give you more detail and will get data close to tick data.

[quote]However, a maximum of 100,000 intrabars can be used in calculations. This means on the daily chart you won't see anything since 1 day ~ 86400 seconds. (just over 1 bar)

  • choose a lower chart timeframe, or choose a higher LTF (5S, 10S, ... 1 minute)[/quote]

Always choose a LTF lower than the current chart timeframe.

Pine Script™ code using this request.security_lower_tf() may calculate differently on historical and real-time bars, leading to repainting.

Trading is risky and many will lose money in connection with trading activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other markets involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools for charting platforms, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content or tool we provide.

Charts used on this site are by TradingView in which the majority of our tools are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com. TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2025 LuxAlgo Global, LLC.