Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 6/30/2009 Posts: 57
|
I would like to be able to plot the following in Telechart (ver 12), but I'm not sure if it can be done.
On a daily basis
a) Take the NYSE up volume
b) Take the NYSE down volume
Calculate the net of a - b above and call it NetVol
Calculate an 18 day EMA of NetVol with a .90 front load: call it EMA18
Calculate a 36 day EMA of NetVol with a .95 front load: call it EMA36
Plot = EMA18 - EMA36
I was able to do this in StockFinder using the RealCode provided below, but would like to able to migrate over to Telechart.
'##################################
' variable for UpVol
'# PfS = chart.PriceforSymbol.3
' variable for DownVol
'# PfS1 = chart.PriceforSymbol.2
Dim NetVol As Single
Static weight18Day As Single
Static weight36Day As Single
Static EMA18Day As Single
Static EMA36Day As Single
weight18Day = 0.90
weight36Day = 0.95
NetVol = (PfS.value / 10) - (PfS1.value / 10)
If Me.isFirstBar Then
EMA18Day = NetVol
EMA36Day = NetVol
Else
EMA18Day = (EMA18Day * .9) + (NetVol * .10)
EMA36Day = (EMA36Day * Weight36Day) + ((1 - Weight36Day) * NetVol)
Plot = EMA18Day - EMA36Day
End If
'#######################################
Any help would be greatly appreciated.
Doug
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I cannot think of a way to do so in either TeleChart 2007 or TC2000 version 12.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2009 Posts: 57
|
I was really hoping there was a way to do it, but was too much an idiot to see it.
Thanks for such a quick response Bruce.
Guess I will stick to the StockFinder version for now.
Doug
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |