Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sell Stop order been ignored

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

    Sell Stop order been ignored

    i am trying to place a sell stop order after open of the session if market opens above a certain level.

    i am getting a log error
    SellShort Stop order placed has been if\gnored since the stop price is greater than or equal to close of the current bar.

    Besides shortening the time frame of backtesting, is there another way i can avoid this error

    #2
    Hello fiddy,

    Thanks for your post.

    The error message is that your strategy is placing a sellstop at or above the current price. To prevent the error, depending on what you are trying to do, either place a sell limit above the current price or a sell stop below the current price.

    Comment


      #3
      thanks Paul.

      when the market opens for example (@90) i am trying to place a sellstop order order (@85)
      the issue is that on the 5 minute chart the close is for exampel (@83)

      when running the strategy in live this would not be an issue as as soon as mkt opens the order will be placed,
      how can you run the backtest the simulate this situation

      Comment


        #4
        Hello fiddy,

        Thanks for your reply.

        What happens in backtesting is that the strategy runs as if CalculateOnBarClose = true (regardless of your settings) because historical bars are made up of only the Open, High, low and Close of the finished bar. The historical bars do not provide the tick movement that occurred when they were originally formed in the live environment. This means that your strategy code is only executed once per bar, at the end of the bar.

        To work around the historical bars, you can modify your strategy to add a faster dataseries. Here is a working example: http://ninjatrader.com/support/forum...ead.php?t=6652

        Alternatively, you can use market replay without the need to change your strategy. While this is a much slower process it does offer the benefit of providing more realistic fills because all of the data of the market conditions are saved and because of the simulation engine. http://ninjatrader.com/support/helpG...ime_vs_bac.htm

        Comment


          #5
          thanks Paul

          How can i setup replay to be able to run strategies over market replay data.
          can i do this for any security?

          Comment


            #6
            Hello,

            Thanks for your reply.

            With market replay there are two ways to obtain Market replay data, one is to download from the NinjaTrader replay server, however this is limited to most common futures and forex instruments, the other is to record the market data on your PC which sounds like what you would need to do for stocks.

            Please see the helpguide here: http://ninjatrader.com/support/helpG...ket_replay.htm
            also, training recorded here: https://www.youtube.com/watch?v=cgB1...D7105&index=18

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            80 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            46 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            29 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            66 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X