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 feature in TA
http://www.molanis.com/forum/viewtopic.php?f=6&t=268
Page 1 of 1

Author:  mhaqmd [ Mon Mar 07, 2011 9:46 am ]
Post subject:  Shift feature in TA

I understand that 0 means current bar. I am using completed bar as execution mode under Home Icon. Does it mean that if I use shift value of zero in my TA it will wait for the current bar to close before it will decide if my conditions are met and to place an order??? or it will place an order even before the current bar is closed???

Thanks for your help.

Author:  molanisfx [ Mon Mar 07, 2011 10:05 am ]
Post subject:  Re: Shift feature in TA

Trade using ticks means that the ea is executed every time you get a new tick
Trade using bars means that the ea is executed every time you get the first tick of a new bar. It is equivalent to say when there is a new bar, or at the open of the new bar. This is why when using shift 0 for your indicators, you should use the open price as the indicator input if possible. The first tick of the new bar is the open price, the current bar is forming, it does not have a close price because it's still forming, thus when receiving the first tick open = close = high = low
When trading bars, We advise people to use shift 1 and the close price for your indicators (this decision really depends on your strategy though). Using shift 1 and close calculates the indicator value using the previous tick. i.e The last tick of the bar is received. This is a real close price. A new tick is received, it is the first tick of the new bar, then the ea is executed looking at the indicator value obtained one tick ago.

Author:  mhaqmd [ Mon Mar 07, 2011 10:18 am ]
Post subject:  Re: Shift feature in TA

Thank you very much for quick and detailed explanation. It helped me greatly to get a better idea of these numbers and what they actually do.

You people are awesome. :D :D :D :D

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