molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming
http://www.molanis.com/forum/

Shift paramater
http://www.molanis.com/forum/viewtopic.php?f=11&t=1660
Page 1 of 1

Author:  silverman [ Sat Jul 21, 2012 8:30 am ]
Post subject:  Shift paramater

HI
I would once and for all like to clarify the shift functions.
shift-Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

what does this mean in lay mans terms?
I am using it in context of bbands. If I want the trade to open on the close of the current bar as it closes below the lower bollinger.

There is also a bbands shift paramater, this is all a bit confusing today.

http://www.molanis.com/support/metatrad ... ence-guide:
double iBands( string symbol, int timeframe, int period, int deviation, int bands_shift, int applied_price, int mode, int shift)
Calculates the Bollinger bands indicator and returns its value.
Parameters:
symbol - Symbol the data of which should be used to calculate the indicator. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
period - Averaging period to calculate the main line.
deviation - Deviation from the main line.
bands_shift - The indicator shift relative to the chart.
applied_price - Applied price. It can be any of Applied price enumeration values.
mode - Indicator line index. It can be any of the Indicators line identifiers enumeration value.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Sample:
if(iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)>Low[0]) return(0);

Author:  admin [ Sat Jul 28, 2012 9:54 am ]
Post subject:  Re: Shift paramater

The shift of the indicator is used to select the bar to be used to get the indicator's value: shift 0 uses the current bar, shift 1 is the previous bar, etc
Some indicator have an extra shift, this is to move the indicator chart to the right or to the left. To get the concept add the indicator to chart and change bands_shift and see how the whole charts moves. This creates challenges if you use both shifts since people get confused. shift=0 and bands_shift=1 have a different signal than shift=0 and bands_shift=0. In my eas I never use the bands_shift to avoid confusion.

Author:  silverman [ Tue Jul 31, 2012 11:10 am ]
Post subject:  Re: Shift paramater

Thanks got it . One thing; I don't think it had the capability to do a shift -1 only positive shift.

Author:  RJo [ Thu Aug 02, 2012 10:12 am ]
Post subject:  Re: Shift paramater

silverman wrote:
I don't think it had the capability to do a shift -1 only positive shift.


http://www.molanis.com/forum/viewtopic.php?p=5050#p5050

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/