OPEN-SOURCE SCRIPT
Updated

Delta Agression

192
DELTA AGRESSION

Delta Agression is designed to highlight moments when buying or selling pressure becomes unusually strong.

The indicator estimates Delta from each candle's volume and where the candle closes inside its range. It then compares current activity with recent activity to find spikes, rising aggression, sudden shocks, and flips in control.
==================
● AGGRESSION SPIKE

Delta is unusually large.

Think:
Big aggression.


◆ EXTREME AGGRESSION

Delta is extremely large.

Think:
Very big aggression.


▲ / ▼ RISING AGGRESSION

Aggression has increased for 3 candles in a row.

Think:
Aggression is building.


■ AGGRESSION SHOCK

Delta suddenly changed much harder than normal.

Think:
Aggression suddenly accelerated.


✕ AGGRESSION FLIP

Delta suddenly changed hard AND control switched sides.

Think:
One side aggressively took control from the other side.
===============================================

SIMPLE SUMMARY

Spike = big aggression.

Extreme = very big aggression.

Rising = aggression is building.

Shock = aggression suddenly accelerates.

Flip = one side aggressively takes control from the other side.

IMPORTANT:
The Delta used by this indicator is an estimate based on candle price and volume. It is not true exchange Bid/Ask order-flow Delta.


SETTINGS & SIGNALS


DELTA LOOKBACK
Default: 20

Determines how many recent candles are used to calculate what a normal Delta size looks like.

20 means the current Delta is compared with roughly the last 20 candles.

Higher setting = smoother and harder to trigger.
Lower setting = more sensitive.


AGGRESSION SPIKE
Default: 2.0

Controls the ● Aggression Spike signal.

It looks for Delta that is unusually large compared with normal Delta.

2.0 means the current Delta must be about 2x normal.

Green ● below candle = bullish aggression.
Red ● above candle = bearish aggression.


EXTREME AGGRESSION
Default: 3.5

Controls the ◆ Extreme Aggression signal.

This looks for extremely large Delta readings.

3.5 means Delta must be about 3.5x normal.

Green ◆ below candle = extreme buying aggression.
Red ◆ above candle = extreme selling aggression.


3-BAR RISING AGGRESSION
Marker: ▲ / ▼

Looks for aggression increasing for 3 candles in a row.

Bullish example:

+500
+1,000
+2,000

Buying aggression is getting stronger each candle.

Bearish example:

-500
-1,000
-2,000

Selling aggression is getting stronger each candle.

Green ▲ below candle = buying aggression is building.
Red ▼ above candle = selling aggression is building.


SHOCK LOOKBACK
Default: 20

Determines what a normal change in Delta looks like.

The indicator compares the change in Delta from one candle to the next over the recent lookback period.

20 means it uses roughly the last 20 candles to determine what a normal Delta change looks like.


SHOCK THRESHOLD
Default: 2.0

Controls the ■ Aggression Shock signal.

A Shock happens when Delta suddenly changes much more than normal.

Example:

Previous Delta: +300
Current Delta: +3,500

That is a large sudden increase toward buyers.

2.0 means the Delta change must be about 2x larger than normal.

Green ■ below candle = bullish shock.
Red ■ above candle = bearish shock.

IMPORTANT:
A Shock does NOT have to cross from negative Delta to positive Delta.

Example:

+300 → +3,500

This can still be a Bull Shock because buying aggression suddenly became much stronger.


FLIP THRESHOLD
Default: 2.5

Controls the ✕ Aggression Flip signal.

A Flip happens when Delta changes sides AND the change is unusually powerful.

Bull Flip example:

Previous Delta: -2,000
Current Delta: +1,500

Sellers were in control.
Then buyers aggressively took control.

Green ✕ below candle = bullish flip.

Bear Flip example:

Previous Delta: +2,000
Current Delta: -1,500

Buyers were in control.
Then sellers aggressively took control.

Red ✕ above candle = bearish flip.

2.5 means the takeover must be about 2.5x stronger than a normal Delta change.


USE VOLUME FILTER

When ON, a signal must also have enough total candle volume to qualify.

This helps remove signals that happen during very low-volume candles.

ON = volume requirement is used.
OFF = volume does not affect whether the signal appears.


VOLUME AVERAGE LENGTH
Default: 20

Determines how many candles are used to calculate normal volume.

20 means the indicator uses roughly the last 20 candles to calculate average volume.


MINIMUM VOLUME VS AVERAGE
Default: 1.0

Determines how much volume the current candle needs before a signal is allowed.

1.0 = at least average volume.
1.5 = at least 1.5x average volume.
2.0 = at least 2x average volume.

Higher settings create fewer signals and require stronger volume.






Release Notes
AGRESSION BY SETTINGS

1. Extreme
2. Shock
3. Spike
4. Flip

So Extreme is the strongest setting, then Shock, then Spike, then Flip.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.