Registered User Joined: 3/19/2005 Posts: 47
|
In my study of technical analysis I have found that some technical analysts (J. M. Hurst) for example, claim that the proper way to plot a moving average is over the mid-point of the interval rather than at the end. So, for example, an eleven day moving average should be plotted over day five rather than day 11 which is usually done. I have seen this demonstrated on several charts, and it is surprising how much better it works at giving buy/sell signals. Can you confirm that TC2005 plots it over the last point rather than the middle and can you tell me if there is a way to shift it, or create a custom chart to do it?
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 4,308
|
When you plot a moving average in TeleChart, there is an optional check box for the shift left function. If plotting a 20 day moving average, by checking the shift left box, the average is shifted left half the value of the moving average period...in this case, starting back 10 days and going back 20 days from there.
- Doug Teaching Online!
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Thanks Doug,
is it possible to create a plot of the centered moving average subtracted from the price?
Bigger question, is there any documentation other than the Online Telechart Help. There are several charts I'd like to construct and I'd like a PDF version that I could print so I can mark it up. (I want to help the economy by killing another tree to print my manual)
Stephen
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
The shifted moving average does not exist for the most recent plots. Do you want the price X days ago less the shifted average?
- Craig Here to Help!
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Yes, that's exactly what I want. It is called an Inverse Moving Average graph, and plotted as vertical bars above and below a center point, it is helpful to see where price is going relative to the moving average even if it's trending up or down. I realize that since it is an average, there's no way to plot it for a point within half of the average period from today since those points are in the future.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Unless I missed something:
For Doug's example: C10-AVGC20
You can do this for any average. Make the number after the C half of what is after AVGC.
- Craig Here to Help!
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
Stephen,
The PCF for what I believe you described is:
C5-AVGC11
The center data point of AVGC11 is C5. TC2005 shifts AVGC11 left 5.5 bars rather than 5 bars for some reason.
Thanks, Jim Murphy
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Thanks for the info Craig and Jim. If you remember where I started this thread I wanted to make sure that the Moving average was plotted over the mid-point. It is not clear to me where AVGC11 will plot the data above the mid-point or at the end point of the period.
Craig: Why does TC2005 shift 5.5 bars as Jim suggests? If the period is odd (say 11), and we number the bar #1 through #11, then the centered moving average should be plotted at bar #6. Is the the case?
Also, it it possible to plot my data as vertical bars rather than a line?
Jim: Shouldn't the PCF be C6-AVGC11 since bar #6 is the center bar?
Thanks,
Stephen Smith
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
The end plot is, infact, on bar #6 when you shift an 11-day MA to the left.
Plot an 11-day MA on the chart and check the SHIFT LEFT option. I think it will answer many of your questions. It is easy to see, harder to explain.
Custom indicators can only be plotted as lines, not bars.
C6 is the bar 6 days ago. Bar #6 is C5, the close 5 days ago. Todays bar is C (or C0). Yesterday is C1. Make sense?
- Craig Here to Help!
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (Craig_S) The end plot is, infact, on bar #6 when you shift an 11-day MA to the left.
What actually happens when you check "Shift Left" is that the right endpoint of the SMA11 moves to the left 5.5 spaces when it should move only 5 spaces. This does not put it on a bar. If you are on "Bar", the endpoint will be to the right of the bar. If you are on "Bar/Open", the endpoint will be to the left of the bar. If you are on "Candle Stick", the endpoint will be to the left half a space. If you are on "Line", the endpoint will be to the left half a space.
If you hit the "." and move the vertical line, you will see how bars are plotted, and, consequently, why the above is true. Left-shifting an SMA11 5.5 spaces instead of 5 spaces is just a mistake.
Thanks, Jim Murphy
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I changed to an AVG10 and it did move half a bar. The value of the MA remains unchanged, the plot moves half a bar. I will send this to development.
Mr. Smith,
This has a minimum effect on what you are trying to do. C5-AVGC11 should still be used.
- Craig Here to Help!
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (macinsmith71) Jim: Shouldn't the PCF be C6-AVGC11 since bar #6 is the center bar?
The 11 bars are numbered 0 through 10 right-to-left, not 1 through 11 left-to-right. The PCF:
C5-AVGC11
is equivalent to:
C5-(C0+C1+C2+C3+C4+C5+C6+C7+C8+C9+C10)/11
This way you can see that C5 is in the center.
Thanks, Jim Murphy
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Craig,
Thanks for all the valuable information. Something is still unclear. You said "Plot an 11-day MA on the chart and check the SHIFT LEFT option. I think it will answer many of your questions. It is easy to see, harder to explain."
I understand how to do that when I'm using standard indicators, but when I create one using PCFs there I find no checkbox. So my question still stands. Some PCFs should be plotted at the end-point. Others like the moving average should be plotted at the midpoint. How do I specify where to plot the result of a PCF?
Stephen
PS - Jim, thanks for the clarification. I should have thought about the possibility that the bars were numbered starting with zero. thanks.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
the PCF I gave you above looks at the difference between price and the end of your shifted-left average.
That is what you are looking for, right?
- Craig Here to Help!
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Craig,
Please forgive me for beating this to death, but you confused me when you used the word "end" in your comment, when you said "difference between price and the end (emphasis mine) of your shifted-left average". Are you saying that if we take a 11 day moving average, and subtract it from the price and look at the value over the midpoint (bar 5 numbering 0-10 right to left), it would be equal to the average of bars 0-10 subtracted from the price at bar 5.
For example lets assume the values (bar 10 to bar 0) are 100, 100, 100, 50, 100, 150, 100, 50, 100, 100, 100 and that every bar before and after that interval is also 100. So if we subtracted the moving average from the price, the values plotted over bars 10 to 0 would be (0.0, 0.0, 4.55, -45.5, 4.55, 54.55, 4.55, -45.45, 4.55, 0.0, 0.0)
Here's whole table:
price 11 day ma price - ma bar # $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $95.45 $4.55 $100.00 $100.00 $0.00 10 $100.00 $100.00 $0.00 9 $100.00 $95.45 $4.55 8 $50.00 $95.45 -$45.45 7 $100.00 $95.45 $4.55 6 $150.00 $95.45 $54.55 5 $100.00 $95.45 $4.55 4 $50.00 $95.45 -$45.45 3 $100.00 $95.45 $4.55 2 $100.00 $100.00 $0.00 1 $100.00 $100.00 $0.00 0 $100.00 $95.45 $4.55 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 $100.00 Is this what TC2005 is doing?
Stephen Smith
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Stephen,
I'm regret I let this slip through the cracks. It will be the 1st post I answer in the morning - promise.
- Craig Here to Help!
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
This formula:
C5-AVGC11
Gives the closest measure of the price less the shifted-left averages last (most right) plot.
Bring up a chart with a 11-bar period moving average shifted left.
See the last plot of the average? See the point where the average ends and there is no more plots to its right? The formula for that last point is AVGC11
Right above it is the price 5-bars ago. The formula for this bar is C5. The distance from that bar to the average below it is:
C5-AVGC11
- Craig Here to Help!
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Thanks,
Stephen
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Craig & Jim,
Ok, now I'm confused. I was just ready try your suggestions. I created a new template and added the formula AVGC17. Next I closed that window and with my template selected I selected "Chart Template/Add Indicator/Moving Average" and based it on the price and used the same 17 day period. Since I had a "moveleft" checkbox I was able to check it and it came out centered properly, but the original was plotted over the end-point. When I looked at the documentation under moving average it said that AVGC was the formula. So how do I create a formula which gives me the same result as the menu selection?
Stephen Smith
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
Steven,
Please do the following setup:
Scale: Arithmetic
Top: ,,Prices - Line Chart ,,,,Moving Average - 17 bars - Simple (Check "Shift Left")
Middle: ,,Formula C8 1 Period (Check "Plot using price scale") ,,Formula AVGC17 1 Period (Check "Plot using price scale")
What you will see in the Top Window is the Centered SMA (shifted a half bar too far). What you will see in the Middle Window is the Centered SMA (without the half bar shift too far). The Middle Window is the same plot as the Top Window shifted 8 bars to the right (except for the half bar shift error).
Thanks, Jim Murphy
|
|
Registered User Joined: 3/19/2005 Posts: 47
|
Did it. See my post in under Centered Weighted Averages.
Thanks,
Stephen Smith
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
I do not see how this formula calculates a MVA with a shift left. What is the formula for a MVA with a shift left? How is it calculated? MVA of 10 periods is AVGC10; what is the formula with a shift left?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gwoods,
Welcome to the forums. A very good foundation for learning how to use TeleChart can be gained by reviewing the following:
If you are new to TeleChart READ THIS FIRST!
The formula for the most recent 10-Period Shifted Left Simple Moving Average is just AVGC10. It is calculated by adding the most recent 10 closing Prices and dividing by 10. The only difference is that it is Plotted on a past date instead of being Plotted on the current date.
There isn't a formula for a Shifted Left Moving Average that would line up with the current Price because that would require future data.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
I understand that would require future data; however, Avgc10 is not a Moving Average containing shift left. Avgc10 is moving average based on ten days encompassing the current close.
All I want to now is the formula that computes Avgc10 shifted left. That was it. If you can do it by selecting shift left in the moving average chart tool, how would you create the same graph line with a pfc? That is all I was asking.
Also, the answer is not c5 - avgc10.
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gwoods,
Of course the answer isn't C5 - AVGC10. That would be an attempt to plot the difference between the most recent Shifted Left Moving Average and Price at the point where the Shifted Left Moving Average is Plotted.
You can't create a Shifted Left Moving Average as a Personal Criteria Formula or Custom Indicator because neither can incorporate future data.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
I know. I don't need future data. I just want to know how we configure what is created with the charting tool when shift left is selected. There has to be some type of PCF.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (gwoods) I don't need future data.
Yes, you do. The syntax for TeleChart's Personal Criteria Formula Language uses offsets from the current data point to do its calculations. That means a Shifted Left Moving Average would need to have some sort of syntax for referencing negative offsets for its calculations and it doesn't. For example, you would need to be able to write:
AVGC10.-5
Or:
(C.-5 + C.-4 + C.-3 + C.-2 + C.-1 + C + C1 + C2 + C3 + C4) / 10
And such syntax is not valid.
QUOTE (gwoods) There has to be some type of PCF.
No, there isn't.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
Ok, that is fine. I just wanted to be sure. I thought it was being calculated 5 bars back (instead of starting at C0 you would start at c5 to calculate your shift left moving average.
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
Yes, that is what I was trying to do and could not.
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
Ok, is worden working on allowing AVGC10.-5 formulas in the future or no because there is not a lot of demand.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gwoods,
We do not normally discuss or comment on future features, services or products until they are actually released or officially announced. StockFinder's RealCode already has this feature. You may wish to make a suggestion to add it to TeleChart's Personal Criteria Formula Language in the Comments/Suggestions forum.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
Isn't stockfinder your Blocks program?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gwoods,
Yes, StockFinder is the new version of Blocks.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
Is it easier to use? The first version was like a new programing language.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gwoods,
I think it's easier to use that when it first came out. It has added a lot of Drag and Drop functionality. Then again, I might not be the best person to ask because I thought the first version of Blocks was easy to use. It's going to involve a learning curve of some sort if you aren't familiar with it (but I don't think the learning curve is steep at all).
A comparison of TeleChart to StockFinder is available in a Comparison Table.
There's a StockFinder Quick Start card with videos demonstrating some of its features.
The first 30 days are free if you want to download StockFinder to try it out.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/1/2006 Posts: 25
|
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
gwoods,
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |