Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Plotting EMAs with different weights on NYSE Up/Down Volume Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tuckandturn
Posted : Wednesday, September 28, 2011 11:39:21 AM
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
Bruce_L
Posted : Wednesday, September 28, 2011 11:45:59 AM


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
tuckandturn
Posted : Wednesday, September 28, 2011 11:48:20 AM
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
Bruce_L
Posted : Wednesday, September 28, 2011 11:55:00 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-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.