StephXAGs

Z Score Enhanced Time Segmented Volume (Multi MA)

**THIS VERSION HAS BEEN STANDARDIZED WITH A Z SCORE CALCULATION AND ALLOWS THE USER TO SELECT WHICH MOVING AVERAGE THEY WOULD LIKE TO UTILIZE FOR THE SIGNAL LINE**
Chart shows the Non-Standardized Enhanced Time Segmented Volume (Multi MA) with default settings on top and the Standardized version with default settings on the bottom.

Time Segmented Volume was developed by Worden Brothers, Inc to be a leading indicator by comparing various time segments of both price and volume . Essentialy it is designed to measure the amount of money flowing in and out of an instrument.

Time Segmented Volume was originally ported to TradingView by user @liw0 and later corrected by user @vitelot. I never quite understood how to read Time Segmented Volume until I ran across a version by user @storma where they indicated when price would be long or short, but that code also utilized the incorrect calculation from user @liw0.

In an effort to make Time Segmented Volume more accessible and easier to read, I have re-coded it here. The calculations are based on the code from @vitelot and I have added direction indicators below the chart.

If the histogram (TSV) is greater than zero and greater than the moving average, price should be moving long and there will be a green box below the chart.
If TSV falls below the moving average while still being greater than zero, the trend may be exhausting and has been coded to read Price Action Long - FAILURE with a black x below the chart.

If the histogram (TSV) is less than zero and less than the moving average, price should be moving short and there will be a red box below the chart.
If TSV rises above the moving average while still being less than zero, the trend may be exhausting and has been coded to read Price Action Short - FAILURE with a black x below the chart.

At times, the moving average may be above zero while TSV is below zero or vice versa. In these situations the chart will indicate long or short based on whether or not TSV is greater or less than zero. It is possible a new trend may be forming as the moving average obviously lags, but also possible price is consolidating with little volume and causing TSV to oscillate close to zero.

**Z Score // Standardized Option **
Thist Standardized code implements all of the above but also allows the user to select a threshold level that should not need to be adjusted for each instrument (since the output is standardized).

If the TSV value meets the long and short signal requirements above and TSV is greater than the threshold values a green or red box will print ABOVE the oscillator. The histogram will also change color based on which threshold TSV has met.


This calculation allows us to compare current volatility to the mean (moving average) of the population (Z-Length). The closer the TSV Z-Score is to the mean, the closer it will be to the Zero Line and therefore price is likely consolidating and choppy. The farther TSV Z-Score is from the mean, the more likely price is trending.

The MA Mode determines the Moving Average used to calculate TSV itself. The Z-Score is ALWAYS calculated with a simple moving average (as that is the standard calculation for Z-Score).

The Threshold Levels are the levels at which TSV Z-Score will change from gray to yellow, orange, green ( bullish ), or red ( bearish ).

Statistically speaking, confidence levels in relation to Z-Score are noted below. The built in Threshold Levels are the positive and negative values for 90%, 95%, and 99%. This would indicate when volatility is greater than these values they are out of the ordinary from the standard range. You may wish to adjust these levels for TSV Z-Score to be more responsive to your trading needs
80% :: 1.28
85% :: 1.44
90% :: 1.64
95% :: 1.96
99% :: 2.58

The Z Length is the period for which the Z Score is calculated

More information regarding Time Segmented Volume can be found here: http://www.worden.com/TekeChartHelp/Cont...

Original code ported by @liw0
Corrected by @vitelot
Updated/Enhancements by @StephXAGs with inspiration from @storma
Multiple MA Options Credits to @Fractured and @lejmer
Bits and Pieces from @AlexGrover, @Montyjus, and @Jiehonglim

As always, trade at your own risk.
Skript med en öppen källkod

I sann TradingView-anda har författaren till detta skript publicerat det som öppen källkod, så att handlare kan förstå och verifiera det. Skål för författaren! Du kan använda den gratis men återanvändning av den här koden i en publikation regleras av våra Ordningsregler. Du kan göra den till favorit för att använda den i ett diagram.

Vill du använda det här skriptet i ett diagram?

Kommentarer

Thank you so much for your hard work!
The issue is that this indicator can take your trading to another level, the only problem is i cant good settings for the FX market, there is no doubt this indicator is amazing for the stock market but in the FX market due to crazy amounts of volume its not reacting well at all.

Open Tesla chart and than try use it on EU and you will see the difference...
+1 Svara
@Yafit369, Why not try seeing FX as a futures commodity. I think there is volume there, you just have to pay 5$ a year to TV for the data.
Svara
Yafit369 rafaelbrown40
@rafaelbrown40,

Yes bro Im using GP brokerage and they do have Volume, the issue is the volume in the FX market is much more volatile than the stock market, you can see it by yourself when you will add the TSV and then open a a few stock charts you will see the indicator reacting amazing, Then open a few currencies and you will see its not reacting well.

With stocks its like a black & white indicator with FX its not that clear
Svara
@Yafit369, I see what you are looking for. Volume can truly be tricky with FX. If you are a retail trader the best thing that can come to my mind is OANDA and FXCM which offer time&sales info derived directly from their retail customers. To see true volume info, you will have to enter the interbank exchange which costs a lost if you are a retail trader. There are numerous other tools you can use though in your favour with forex.
Svara
Yafit369 rafaelbrown40
@rafaelbrown40,

Thank you friend :)
Svara
very useful script, thanks a lot :)
+1 Svara
Hi thank you for this. Much appreciated. However, when I plot it is showing the following errors:
Processing script...
line 147: The function 'sma' should be called on each calculation for consistency. It is recommended to extract the call from the ternary operator or from the scope.
line 158: Shadowing variable 'beta' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?
line 220: The function '#f19' should be called on each calculation for consistency. It is recommended to extract the call from this scope.
line 220: The function 'calcWeight' should be called on each calculation for consistency. It is recommended to extract the call from this scope.
line 229: Shadowing variable 'z' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?
line 278: Shadowing variable 'd' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?
line 329: Shadowing variable 'd' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?
line 80: The function 'cross' should be called on each calculation for consistency. It is recommended to extract the call from the ternary operator or from the scope.
Svara
Thank you!
Svara
So what was the idea long or short. Im not really seeing a bias set or where you make money here?
Svara