Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does Bar reference in OnExecution need a live tick data?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Does Bar reference in OnExecution need a live tick data?

    Hi NT experts,

    My stop order in OnExEcution has been working fine most of time. However, twice, the stop price submitted is 0.0001 for all orders in the strategy.
    stopOrder1 = ExitShortStop(0, true, execution.Order.Filled, High[1]+1*TiCkSize, "SL_S1", "S1");
    By checking the price movement at second level, there is gap in one case. For the other case I did not record price at second level so cannot tell. I could not figure out a reason other than specualting that referring bar price like High[1] in OnExecution needs an incoming live tick. If no live tick, the High[1] is zero and hence the stop price is 0.0001 (TickSize 0.00005 rounded to 0.0001 in Forex).
    It is hard to believe High[1] value will be lost when no tick coming. But that seems to be an explnation.
    Any comments are welcome so i can look to the right direction.

    #2
    If you have a previous bar High[1] will be the high of the prior bar. I suggest you print the values of each of your components individually right before you submit the order and see what they evaluate to.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sjsj2732, Yesterday, 04:31 AM
    0 responses
    38 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    287 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    289 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    134 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    95 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X