Question about indicator shift -1

Post Reply
imamushroom
Posts: 6
Joined: Fri Oct 30, 2015 9:48 pm

Question about indicator shift -1

Post by imamushroom »

Hi,

I've been examining various indicators and EA's and came across an indicator with a shift of -1. I'm familiar with shifts from 0..x in the positive sense but not negative. What does this mean?

Looking at the documentation is doesn't give any clues and I quote:

"shift
[in] Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago)."

Is it a projection of the future price (Linear Regression?)?
How accurate is it?
How do you use it?

Thanks in advance for your help.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Question about indicator shift -1

Post by renexxxx »

imamushroom » Tue Mar 22, 2016 2:05 pm wrote: I've been examining various indicators and EA's and came across an indicator with a shift of -1. I'm familiar with shifts from 0..x in the positive sense but not negative. What does this mean?
I think that you mean that for calculating the indicator value for a shift=n, it uses the price feed values for shift=n-1. Is that right? This is obviously not possible when shift=0 (as I would mean peeking into the future, but for shift=1, it can refer to the price feed of the current candle (i.e. shift=0).

This means that the indicator would repaint. A classic example is TMA (triangular moving average) where the averaging is done using price values from the past and price values from the future. TMA is also a repainting indicator.

Hope this answers your question.
imamushroom
Posts: 6
Joined: Fri Oct 30, 2015 9:48 pm

Question about indicator shift -1

Post by imamushroom »

Thanks for the clarification.
JonCodesBad
Trader
Posts: 50
Joined: Mon Apr 13, 2015 7:58 pm
Location: SW England.

Question about indicator shift -1

Post by JonCodesBad »

Edit: Think I was wrong and may mislead, so better to remove.

Jon
Last edited by JonCodesBad on Sat Mar 26, 2016 8:28 am, edited 1 time in total.
imamushroom
Posts: 6
Joined: Fri Oct 30, 2015 9:48 pm

Question about indicator shift -1

Post by imamushroom »

Will do, thanks
User avatar
nanningbob
Trader
Posts: 4564
Joined: Sun Dec 04, 2011 1:23 pm

Question about indicator shift -1

Post by nanningbob »

Negative shift just moves the MA line back a candle. Positive shift moves the line forward a candle. The question is does moving it back a candle allow that price to project to the present candle and use it for trading or na indicator. ???
I trade http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3964,
I talk about my philosophy of trading here.
http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3627
"The key to converting something useful to others is simplicity. Complexity is the enemy to execution." Tony Robbins
Post Reply

Return to “Coders Hangout”