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, 12:52 AM
    1 response
    9 views
    0 likes
    Last Post Leeroy_Jenkins  
    Started by Tin34, Today, 03:30 AM
    0 responses
    4 views
    0 likes
    Last Post Tin34
    by Tin34
     
    Started by lollers, Today, 03:26 AM
    0 responses
    6 views
    0 likes
    Last Post lollers
    by lollers
     
    Started by aliyahany, Today, 03:16 AM
    0 responses
    1 view
    0 likes
    Last Post aliyahany  
    Started by mariajvillarrealr, Today, 02:57 AM
    0 responses
    1 view
    0 likes
    Last Post mariajvillarrealr  
    Working...
    X