Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 10/7/2004 Posts: 16
|
Hello ...
I wrote a custom indicator intended to provide me with a % of TODAY's PRICE vs. 50 day SMA.
(C-AVGC50) / AVGC50 ....
The value I get for AVGC50 (today's value for the 50 DAY SIMPLE MOVING AVERAGE) is not correct.
Please advise.
Thanks.
Gary
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Since you want a percentage, I would probably use:
100 * (C - AVGC50) / AVGC50
Or the slightly shorter:
100 * (C / AVGC50 - 1)
Can you give me some specific examples where AVGC50 is not returning the 50-Period Simple Moving Average?
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 10/7/2004 Posts: 16
|
Yes ... the 50 day SMA for ALXN is $68.09 per my TC2000 chart .... the value I receive in the AVGC50 calculation is $89.47
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The 50-Period Simple Moving Average of ALXN on a Daily Chart is currently $89.47.
My best guess would be that your charted 50-Period Simple Moving Average is of something other than Price History such as another Moving Average.
If you hover your mouse pointer over the Moving Average 50 on the chart (on the name of the indicator, not on the indicator itself), it should display its parent indicators. The only thing that should be listed there should be Price History.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 10/7/2004 Posts: 16
|
Yes .. that's what I'm doing ... I deleted the 50 day SMA line ... and (re)added it ... same thing .... ????
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
When you add a Moving Average to the chart, a window comes up which allows you to choose the target of the Moving Average. Make sure you are choosing Price History.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 10/7/2004 Posts: 16
|
I did .... the line is well below where it should be on the chart I'm guessing
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you hover your mouse pointer over the Moving Average 50 on the chart, a window will come up. What does it say in that window?
Is the Time Frame on the chart Daily?
I get a number very close to what you are reporting when using a Weekly Time Frame. If a Weekly Time Frame is selected, the charted Moving Average will be a 50-Week Moving Average instead of a 50-Day Moving Average.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 10/7/2004 Posts: 16
|
You are CORRECT .. I had it on a weekly chart .. VERY sorry for the inconvenience ... :-(
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I am happy we were able to figure out the issue.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |