Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug When stop lost are hitted on historical data

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

    Bug When stop lost are hitted on historical data

    When i'm running my strategy on historical datas and stop lost are hitted, the report say the stop lost are filled at 0.0 price !

    When i'm use Liberal Fill Type, i'm don't have this error, so it seem default fill type have problem in this case on Historical.

    #2
    Hello,
    This would be unexepected.
    To investigate further I will need to review your strategy.
    Please either post your strategy here or send us an email to platformsupport[AT]ninjatrader[DOT]com with Attn: Cody http://ninjatrader.com/support/forum...802#post463802 in the body of the email.
    You can attach your Strategy to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your Strategy> select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      Sorry my bad,

      i'm creating my stop order with this code:

      _StopOrder = SubmitOrder(0, _Order.OrderAction == OrderAction.Buy ? OrderAction.Sell : OrderAction.BuyToCover, OrderType.StopLimit, _Order.Filled, 0.0, newStopValue, "Stop" + CurrentBar, "StopLost" + CurrentBar);

      and when i'm changed it by:

      _StopOrder = SubmitOrder(0, _Order.OrderAction == OrderAction.Buy ? OrderAction.Sell : OrderAction.BuyToCover, OrderType.StopLimit, _Order.Filled, newStopValue, newStopValue, "Stop" + CurrentBar, "StopLost" + CurrentBar);

      it's working with default filling too.


      I'm not understand before i'm need set stop lost value and limit value for having the stop order working, and with limit price set to 0.0, the default filling use it as stop price, it's why a have a a stop at 0.0.

      Comment


        #4
        Hello,
        Can you send us a screenshot of the strategy performance or of the chart showing the fills at 0.0?
        To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

        Click here for instructions

        Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

        Click here for detailed instruction

        I look forward to your reply.
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          Hello:

          Follow 3 screenshots for show the problems, with graphic and plot execution, historical perf and code inspector when i'm submit this stop order.

          When i'm set Limit price instead of left it at 0.0, the bug gone.
          When i'm use liberal filling type instead of default, the bug gone too.

          Regards
          Attached Files

          Comment


            #6
            Hello,
            Upon review it appears you are submitting the limit price for the stop order to 0.0. The stop order would be expected to be filled at 0.0 with testing replay. It would be recommend to set the limit price to another value such as keeping it at the stop price if you are wanting a 0 limit offset.
            Cody B.NinjaTrader Customer Service

            Comment


              #7
              ok, thanks for the reply.

              Comment

              Latest Posts

              Collapse

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