So, let me try to clarify things. Lets use this example:
#Variables BuyPrice = 0; ShortPrice = 0; OnBarUpdate() if (close[0] > open[0]) { BuyPrice = Open[0]; EnterLongLimit( 1, BuyPrice, "LimitBuy") }
And my question is: when you backtest this code, which of the two actions will be the right:
1 - At the close of Bar[0], the backtester will place a LimitOrder to be processed in the NEXT bar? I mean, lets say it is in the default mode (expires in every bar), if the next bar touchs the LimitPrice, will it trigger?
2 - At the close of Bar[0], the backtester will place a LimitOrder and calculates if it is achieved at this same bar and, since it is, go long?
In other words: the settings you set when a condition is true are used in the bar that met the conditions or only start to work only in the next bar?
I hope I made my doubts clear. Sorry for the bad english, it is not my mother language.
Thanks in advance!
Comment