Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Platinum Customer
Joined: 10/7/2004 Posts: 42
|
I would like to plot to showcumulative volume for days that are up and cumulative volume for days that are downexamplestock up day 1 vol= 1m, plot = 1mday 2 stock up again vol = 800k, plot = 1.8m etc untilday 6 stock down vol = 500k, plot = 500kday 7 stock down vol = 300k, plot = 800k etc.I will then use paint for the colorsthanksMark
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Cumulative Directional Volume
'|******************************************************************
Static Sum As Single
If isFirstBar Then
Sum = 0
Else
Dim NewVal As Single = System.Math.Sign(Price.NetChange) * Volume.Value
If System.Math.Sign(NewVal) = System.Math.Sign(Sum) Then
Sum += NewVal
Else
Sum = NewVal
End If
End If
Plot = Sum
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 10/7/2004 Posts: 42
|
Bruce,That is what I am looking for but, is there a way to have the plot show only positive values and then I can color it to see the up vs down action?ThanksMark
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Absolute Cumulative Directional Volume
'|******************************************************************
Static Sum As Single
If isFirstBar Then
Sum = 0
Else
Dim NewVal As Single = System.Math.Sign(Price.NetChange) * Volume.Value
If System.Math.Sign(NewVal) = System.Math.Sign(Sum) Then
Sum += NewVal
Else
Sum = NewVal
End If
End If
Plot = System.Math.Abs(Sum)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 10/7/2004 Posts: 42
|
PerfectThanks againMark
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |