Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 ETFVoyageur, Today, 02:10 AM
    0 responses
    8 views
    0 likes
    Last Post ETFVoyageur  
    Started by rayyyu12, Today, 12:47 AM
    0 responses
    8 views
    0 likes
    Last Post rayyyu12  
    Started by ETFVoyageur, 05-07-2024, 07:05 PM
    17 responses
    137 views
    0 likes
    Last Post ETFVoyageur  
    Started by ETFVoyageur, Yesterday, 10:13 PM
    1 response
    11 views
    0 likes
    Last Post ETFVoyageur  
    Started by somethingcomplex, Yesterday, 10:36 PM
    0 responses
    10 views
    0 likes
    Last Post somethingcomplex  
    Working...
    X