Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Registered User Joined: 7/20/2010 Posts: 8
|
Thanks Bruce I see what you are saying ....
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |