greetings,
I am trying to create an indicater which displays the percentage difference between current intraday volume and the same time stamp average volume for the past n days.
however Instead of a plot, I'm getting a single numerical value at the buttom of the scale section. what am I doing wrong ?
My code:
'# Length = userinput.integer = 5
' length is the number of days i want to look back
Dim PV As Single
Dim V As Single
Dim Counter As Long
Dim lastBar As Integer = price.Bar.count - 1
' to display (for example) the indicator for the last 10 days on a 30 minutes chart:
For I As Integer = lastBar - 130 To lastBar
V = Volume.Value(I): Counter = Nothing
For J As Integer = 1 To Length
Counter = I - (J * 13)
V = V + Volume.Value(Counter)
Next J
PV = V / Length
Plot = counter' 100 * (Volume.value / PV)
Next
|
Is it possible to write an indicator to display A Standard Deviation channel on a price plot to reference it later in a condition overbought,oversold,..
|