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

Moving avg question Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
traderald
Posted : Wednesday, December 15, 2010 11:11:24 AM
Registered User
Joined: 7/20/2010
Posts: 8
Is there a way to make an indicator that has 2 moving averages that one avg is on the current candle ( up to date ) and the other one is ,say, 2 candles back.. I can do it in stockfinder
by offsetting one of the moving avgs.....Example 26 E with 0 offset and 12 E with -2 offset but that doesn't work for what I am doing becuz if I were to do a difference of the two
and make it one  line crossing 0 it makes the indicator change three candles back at a time making the indicator cross 0 and then maybe a few candles later it change the history...
so what I am looking for is .... the difference between 26E 0 offset on current candle and  12E 0 offset two candles back... I would like to be able to us it in Stockfinder and TeleChart if   possible
thanks al
Bruce_L
Posted : Wednesday, December 15, 2010 11:14:13 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
In TeleChart, the formula would look like:

XAVGC26 - XAVGC12.2

In StockFinder it would be something like:

Plot = Price.XAVGC(26) - Price.XAVGC(12, 2)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderald
Posted : Wednesday, December 15, 2010 11:57:16 PM
Registered User
Joined: 7/20/2010
Posts: 8
Thanks Bruce......I have played with it for hours and problem is that the only way it works is if you use a minus 2 instead of a positive 2 for the indication       price.xavgc(12,-2)  but then it shortens the moving avg  line by 2 candles and doesnt give the indication until it's two candles behind....any ideas? thanks for your  held
al
Bruce_L
Posted : Thursday, December 16, 2010 8:51:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
A -2 for the Offset is getting data from the future not the past. I can assure you that if you want a past value of the Moving Average, you need to use a 2 and not a -2 for the Offset.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderald
Posted : Thursday, December 16, 2010 12:33:58 PM
Registered User
Joined: 7/20/2010
Posts: 8
ok I guess I m not saying it right....when I use a -2  it is like making a moving average with an offset of -2 and that moves the avg line back 2 candles and when that line crosses  another line it triggers a signal  that I use, however, it is always late....let me ask you this.....if I used the line that is 2 candles late as a signal can I paint the latest  candle. 2 candles to the right  ?     this hard for me to explain but if I make an offset of -2 it shortens the line 2 candles and therefore it paints the candle where it crossed not the candle that is the latest.....sorry about this and thanks
al
Bruce_L
Posted : Thursday, December 16, 2010 12:45:10 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You could shift the 26-Period Moving Average back by 2 instead of the 12-Period Moving Average:

In TeleChart, the formula would look like:

XAVGC26.2 - XAVGC12

In StockFinder it would be something like:

Plot = Price.XAVGC(26, 2) - Price.XAVGC(12)

But you generally don't want to shift either of the Moving Averages 2-Bars to the left using an Offset of -2. Seriously, it is cheating. It relies on future data and ends up being psychic or magical as a result because it knows what will happen instead of just relying on what has happened.

It ends two Bars from the end because you would need to know the Prices for tomorrow and the day after that to be able to calculate a value for today.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
traderald
Posted : Thursday, December 16, 2010 12:59:56 PM
Registered User
Joined: 7/20/2010
Posts: 8
Thanks Bruce I see what you are saying ....
Bruce_L
Posted : Thursday, December 16, 2010 1:02:00 PM


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.