Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Real code indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
mrzee001
Posted : Saturday, February 7, 2015 12:55:10 AM
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
 
 
 
Bruce_L
Posted : Tuesday, February 10, 2015 1:27:53 PM


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
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.