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

Stop order ignored - but why?

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

    Stop order ignored - but why?

    Dear Support:

    Getting the following error in my strategy:

    5/28/2011 10:20:15 PM Strategy A Sell stop order placed at '12/17/2010 11:00:00 AM' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.

    I've attached a photo of the spot on the chart where I'm trying to place a 35 pip SL and this error shows up. I've entered at the beginning of the bar, and CalculateOnBarClose = false in Initialize. Should be running through every tick, right? (it's tick data)

    So....how could NT possibly know what the bar close is when it opens the trade at the beginning of this long red bar? Bar has not formed!

    Would greatly appreciate any insight!

    Regards
    Attached Files

    #2
    entropy, in backtesting the CalculateOnBarClose setting would always be true - as the intrabar formation is not known unless you add more granularity - http://www.ninjatrader.com/support/f...ead.php?t=6652

    At the time you submit this order it's at an invalid price, since a SellStop order can't be placed above the close of the bar or higher - you would need to add checks to ensure the price you attempt to submit at is valid, for realtime trading checking agains the current bid / ask would be good.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,603 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    12 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X