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 cmoran13, Yesterday, 01:02 PM
    0 responses
    30 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    22 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    160 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    95 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    148 views
    2 likes
    Last Post CaptainJack  
    Working...
    X