stopLoss = 30 ticks
TickSize = 0.25 (es)
Playback example
Position.AveragePrice + stopLoss * TickSize = 4128.25
Tradovate data/live
Position.AveragePrice + stopLoss * TickSize = 7.5
Snippit from NS Output with TraceOrders on:
Breakeven Enabled - Setting Stop to StopLoss - stopSet is False Position.AveragePrice + stopLoss * TickSize = stopLoss = 7.5
2/6/2023 12:15:05 PM Strategy '': Entered internal SubmitOrderManaged() method at 2/6/2023 12:15:05 PM: BarsInProgress=0 Action=BuyToCover OrderType=StopMarket Quantity=4 LimitPrice=0 StopPrice=7.50 SignalName='TradeEntry' FromEntrySignal='TradeEntry'
2/6/2023 12:15:05 PM Strategy '': Ignored SubmitOrderManaged() method at 2/6/2023 12:15:05 PM: BarsInProgress=0 Action=BuyToCover OrderType=StopMarket Quantity=4 LimitPrice=0 StopPrice=7.50 SignalName='TradeEntry' FromEntrySignal='TradeEntry' Reason='This was an exit order but no position exists to exit'
Disabling NinjaScript strategy ''
Enabling NinjaScript strategy '' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On each tick IsUnmanaged=False MaxRestarts=4 in 5 minutes
2/6/2023 12:15:06 PM Strategy '': Entered internal SubmitOrderManaged() method at 2/6/2023 12:15:06 PM: BarsInProgress=0 Action=SellShort OrderType=Market Quantity=4 LimitPrice=0 StopPrice=0 SignalName='TradeEntry' FromEntrySignal=''
This is how it appears in Playback:
Breakeven Enabled - Setting Stop to StopLoss - stopSet is False Position.AveragePrice + stopLoss * TickSize = stopLoss = 4128.25
2/6/2023 12:15:06 PM Strategy '': Entered internal SubmitOrderManaged() method at 2/6/2023 12:15:06 PM: BarsInProgress=0 Action=BuyToCover OrderType=StopMarket Quantity=4 LimitPrice=0 StopPrice=4128.25 SignalName='TradeEntry' FromEntrySignal='TradeEntry'

Comment