eykpunter

REVE Markers

eykpunter Updated   
REVE stands for ‘Range Extensions Volume Expansions’. It seeks to report the same as the REVE which I published before. However the code uses a different algorithm to find the ‘usual range’ or ‘usual volume’ to which the current range and volume is compared. In the old REVE a function is coded which mimics a median() function..
In this code the median() function provided in pinescript is used, which makes the code of the actual algorithm nice and short in lines 21 through 27
For example line 23: “morevol=ta.median(curvol, usual)*eventnorm” in which
‘morevol ‘ is the calculated level above which the volume is deemed considerable,
‘curvol’ is the current volume (see line 21); curvol the volume of the previous period.
‘usual’ is the lookback period (see line 8)
‘ta.median(curvol, usual)’ is therfore the median volume in the lookback period
‘eventnorm’ is the percent which sets when “normal” becomes “considerable” (see line 6)
In line 26 the same is done for range.
The code in lines 30 to 92, concern logic manipulations to arrive at choosing the appropriate marker, which are plotted in lines 95 through 136.

Using the shapes as provided by Pinescript offers the possibility to give a much better and more meaningful visualization of volume and range events than different colored columns and histograms in the ‘old’ REVE in the below panel (see example chart).
Using the Pinescript function to find the median opens the possibility of letting the user play in the inputs with the lookback period and the norms for considerable and excessive to find a setting he or she likes most.
Using median in stead of average is necessary in volume and range analysis because these are so volatile. E.g. range or volume can be 10 times larger in the next period! If you have a few excessive volumes or ranges in the lookback period the ‘average volume or range’ is much higher than the ‘usual volume or range’ In statistics this is referred to as the outlier problem.

The markers are located on the bottom of the instrument pane. Those indicating volume events (with ‘event’ I mean a considerable or excessive expansion or extension) are colored triangles or squares, triangles indicate direction, squares that the price stays the same. those indicating range events with ‘normal’ volume are crosses, plus-cross means considerable range event and x-cross is excessive event.
The red, fuchsia and maroon triangles and squares indicate a combination of volume and range events. I call this ‘effective volume’ because more trade leads to shifting prices. The green and blue triangles and squares indicate a volume event with ‘normal’ ranges. I call this ‘ineffective volume’ because more volume does not lead to price shits. Effective volume can be attributed to occasional traders, because these do not care much for the price effect of their orders. The ineffective volume is attributable to institutional traders, because these go to great length to hide the size of their selling or buying objective by trading many small amounts in a day. Therefore one can theorize that ‘smart money’ is active when green and blue markers show up.

There is an option in the inputs to show markers around the candles (or bars). Those above indicate volume events, plus-cross for considerable and x-cross for excessive volume.
Those below the candles (or bars) indicate range events, triangles for direction or a plus-cross when the price stays the same. The small ones indicate considerable range events and the big ones excessive range events. This option can be used for better understanding of the colors of the bottom markers or to check which marker applies to which candle or bar.

If the instrument is without volume, the indicator will show only range markers.

Have fun and take care.
Release Notes:
The bottom crosses for range extensions with normal or unknown volume have now directional colors. Blue is up, red is down and dark purple is no price change.
Release Notes:
As I wasn’t happy with the cross markers for Range Extensions while normal Volume, I searched for other markers. I discovered that Pinescript also allows the use of Unicode Characters. My Windows computer provides a nice app in the Accessories folder called Character Map in which all the possible Unicode characters can be viewed, selected and copied, which you can then paste in the script code.

The following is a list of the shapes used as markers at the bottom position:

Large Range extensions while Volume expansion is normal: “normal volume effective”
Interpretation: high emotions in trading by occasional traders.
Blue arrow up: ↑ Considerable Range extension while normal Volume leading to higher price
Red arrow down: ↓ Considerable Range extension while normal Volume leading to lower price
Blue V up: Ʌ Excessive Range extension while normal Volume leading to higher price
Red V down: V Excessive Range extension while normal Volume leading to lower price
Dark plus cross: + Considerable Range extension while normal Volume not leading to a clearly different price
Dark xcross: x Excessive Range extension while normal Volume not leading to a clearly different price

High Volume expansions while Range remains normal, “ineffective volumes”
Interpretation: low emotions in trading by institutional traders (smart money)
Green triangles: ▲▼Considerable Volume expansion while normal Range leading to either a higher or a lower price
Aqua triangles: ▲▼Excessive Volume expansion while normal Range leading to either a higher or a lower price
Green Square: ■ Considerable Volume expansion while normal Range not leading to a clearly different price
Aqua Square: ■ Excessive Volume expansion while normal Range not leading to a clearly different price

High Volume expansions in combination with large Range extensions, “effective volumes”
Interpretation: high emotions in trading by all types of traders (market mood swings)
Red triangles: ▲▼Considerable Volume expansion and considerable Range extension leading to either a higher or a lower price
Fuchsia triangles: ▲▼Combination of Volume expansion and Range extension in which one considerable and one is excessive leading to either a higher or a lower price
Maroon triangles: ▲▼ Excessive Volume expansion and Excessive Range extension leading to either a higher or a lower price (climactic)
Red squares: ■ Considerable Volume expansion and considerable Range extension not leading to a clearly different price
Fuchsia Squares: ■ Combination of Volume expansion and Range extension in which one considerable and one is excessive not leading to a clearly different price
Maroon squares: ■ Excessive Volume expansion and Excessive Range extension not leading to a clearly different price (climactic)

Enjoy
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?