TradingView
vitelot
21 дек 2018 г., 14:35

Time Segmented Volume 

Euro Fx/Swiss FrancFXCM

Описание

Corrected version of the Time Segmented Volume indicator (TSV).
The previous version contained a severe bug.
The due credits are in the comment section of the code.
Комментарии
mihaiv17
Is there a particular time frame this works best on? I scalp futures. Thanks!
olowshinenine
Can someone tell me how this works ? Do you use it to trade divergences?
vitelot
I'm noticing a rise in interest toward this indicator.
Therefore, I would like to highlight that:
1) I found its basic version on TV which was COMPLETELY wrong, so I corrected it according to the information that can be found on the internet
2) I had to copy/paste the header of the wrong version of the indicator, as kindly asked by its author
3) In doing so I copied his btc address which was part of the header; this means that btc account IS NOT mine; I'll never ask for any money at all, above all when the code is just one single line

I only ask for your appreciation. That's overly enough for me.
Take care
plutoman007
Great indicator, thank you
AnshuGarg
great work buddy :)
Chromeskull01
The calculation is correct, but the implementation looks unnecessarily complicated to me.
First, since the formular was fixed, the calculation for both rising and falling price is the same, volume * price change. So the if-else for rising and falling price can be resolved.
Second, there is no need for the else-then-zero case when price did not change, because this resolves by itself. Volume * price change in this case is volume * 0 which is 0.
To me it looks like line 22 can be simplified to:
```t = sum(volume*(close-close[1]),l)```
I'm not a pine script developer but a Java developer, so please correct me if I'm wrong.
vitelot
@Chromeskull01, you are right. Pls see my answer to Mr/Ms joshwerrmann below.
Chromeskull01
@vitelot, Oh, overlooked that, thx!
debt350k
Good day sir, Great work,
I am quite curious about how to calculate? There is no formular on google. The only thing i found is TSV is sum of last 18th volume*absolute price change. I guess this one is wrong cuz based on this there will be no negative value. I just wondering how it works much appreciate,
vitelot
@debt350k, you are right. The formula you found is the correct one. See my comment to Mr. joshwerrmann below.
Ещё