When I use ApplyStop() function with parameter
ExitAtStop = 1 (check High-Low prices and exit intraday on price equal to stop level on the same bar when stop was triggered), does it examine the bar where the position was opened?
My code is something like this:
SetTradeDelays( 1,0,1,0 ); setoption( "AllowSameBarExit", true ); Buy = [Condition here] BuyPrice = Open; BuyStop = BuyPrice - Ref( Low, -1 ); ApplyStop( stopTypeLoss, stopModePoint, BuyStop, 1, False );
If the stop condition is met in the same bar where the Buy order was entered, will the backtester consider the stop loss?