I have tested the ApplyStop with and without Volatile parameter. The backtest results are doubted with Volatile is True. The Trailing Stop was triggered correctly, but the exit was not delayed to next bar Open.
It was sold on Open on the same stop date.
My code is as below.
SetBacktestMode ( backtestRegular ) ; SetOption ( "ActivateStopsImmediately", False) ; SetTradeDelays ( 1, 1, 1, 1 ) ; BuyPrice = Close ; SellPrice = Open ; ExitAtStop = 2; Volatile = True; SETUP = C > MA ( C, 200 ) AND RSI(2) < 5 AND C < MA ( C, 13 ) ; BUY = Hold ( SETUP, 40 ) AND C > Ref ( HHV ( High, 21 ), -1 ) ; SELL = Cross ( MA ( C, 13 ), C ) ; ApplyStop ( stopTypeTrailing, stopModePoint, BuyPrice - Ref ( LLV ( Low, 5 ), ExitAtStop, Volatile ) ;
Please advise on any false.