Registered User Joined: 5/7/2012 Posts: 3
|
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
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The Above Average Volume topic has both an Intraday Volume Surge Indicator and an Intraday Volume Surge Condition that can be used to compare the current Volume up until that point in the day to the Average Volume up until that point of the day on an Intraday Chart in StockFinder Platinum.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|