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.
    Paul H.NinjaTrader Customer Service

    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
        Paul H.NinjaTrader Customer Service

        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
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,966 views
            3 likes
            Last Post jhudas88  
            Started by rbeckmann05, Today, 06:48 PM
            0 responses
            4 views
            0 likes
            Last Post rbeckmann05  
            Started by rhyminkevin, Today, 04:58 PM
            4 responses
            55 views
            0 likes
            Last Post dp8282
            by dp8282
             
            Started by iceman2018, Today, 05:07 PM
            0 responses
            6 views
            0 likes
            Last Post iceman2018  
            Started by lightsun47, Today, 03:51 PM
            0 responses
            8 views
            0 likes
            Last Post lightsun47  
            Working...
            X