I need help with an indicator that meets the following conditions:
The indicator should display the sum of the volume for all up bars over the past 15 bars.
It should also display the sum of the volume for all down bars over the past 15 bars.
The results should be shown in a line chart.
Thankful for help
JSParticipant
Senior
Hereby the indicator:
Period = 15
UpVolume = 0
DownVolume = 0
For i = 0 to Period-1 do
If Close[i] > Open[i] then
UpVolume = UpVolume + Volume[i]
ElsIf Close[i] < Open[i] then
DownVolume = DownVolume + Volume[i]
EndIf
Next
RETURN UpVolume as "UpVolume" Coloured("Green"), DownVolume as "DownVolume" Coloured("Red")
Hello,
it seems interesting but I cannot understand its purpose.
Someone can tell me which is its practical use?
Thanks in advance
JSParticipant
Senior
For example, you can use this indicator as an extra confirmation when you want to open a position:
If myLongConditions and UpVolume>DownVolume then
…
If myLongConditions and UpVolume>AvgVolume then
…
If myShortConditions and DownVolume>10000 then
…