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

Build a custom moving average histogram Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jting
Posted : Tuesday, February 26, 2008 10:45:58 AM
Registered User
Joined: 7/1/2005
Posts: 20
Hi,

I would like to build a index based on simple average of 50%( daily High - daily Low)

Index formula:
simple moving average of past 30 days of daily (H-L)/2
minus
simple moving average of latest 10 days of daily (H-L)/2 

then
display the calculated value in histogram
and
in a line format

Any easy ways to do this?
Bruce_L
Posted : Tuesday, February 26, 2008 10:58:36 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following:

Select Chart Template | Add Indicator | Indicator.
- Visible: Checked
- Center Zero Line: Checked
- Plot using price scale: Unchecked
- Smoothing Average: 1
- Average Type: Doesn't matter (because the Smoothing Average is 1).
- Indicator Formula: (AVGH30 - AVGL30 - AVGH10 + AVGL10) / 2

It will outline exactly what would be plotted by a Histogram subtracting SMA10 from SMA30 (with both of (H-L)/2). It will be plotted as a Line Plot and not a Bar Plot however. You may wish to review the following:

Plotting Custom Indicators with Examples
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jting
Posted : Tuesday, February 26, 2008 11:15:13 AM
Registered User
Joined: 7/1/2005
Posts: 20
Hi Bruce,

It's very nice to see it showed up ... Kudo!!

Can I display the calculated bar vaule like a histogram (like MACD) in the middle section of the chart with positive Green and negative RED?

I need the dail histogram to match/look for patterns 

Thanks,
Craig_S
Posted : Tuesday, February 26, 2008 11:22:59 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
The data displayed by a line chart is identical as the data displayed as a histogram (it is only a plot style).

That said, no, you cannot change the style in TeleChart.

In Blocks, you could and you can color it any way you like.

- Craig
Here to Help!
jting
Posted : Tuesday, February 26, 2008 12:05:17 PM
Registered User
Joined: 7/1/2005
Posts: 20
Hi Craig,

Yes.  I put the custom indicator in the middle section and add centered it on zero line.  It will LOOK much better in bar format with two colors (like MACD histogram)) than a wave line. 

What does it mean if I change the timefram scale to weekly price?  Are the values calculated on the basis of "weekly price bar"  now than daily?  

Please clarify this!

Thanks for you "Make My Day" ...
Bruce_L
Posted : Tuesday, February 26, 2008 12:12:12 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jting,
Custom Indicators are always plotted as lines in TeleChart. If you change the Time Frame to Weekly, the Custom Indicator will be calculated based on Weekly Bars instead of Daily Bars.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jting
Posted : Tuesday, February 26, 2008 1:03:25 PM
Registered User
Joined: 7/1/2005
Posts: 20
Hi Bruce,

Thanks ...  for the clarification ... 

Bruce_L
Posted : Tuesday, February 26, 2008 1:06:19 PM


Worden Trainer

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

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