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

Order filled outside of range

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

    Order filled outside of range

    Here is some debugging output... basically at the end it fills a market order at 3430.5 (ES ##-##) at 10/21 02:45:30. (30 second bar chart)

    I don't know how this is possible as the bar at 10/21 02:45:30 is: O: 3440.50 H: 3440.75 L: 3439.00 C: 3439.25

    Any thoughts?

    - Brian

    Note: these are Unmanaged Orders.

    47591/0 10/21 02:24:30.000 CrossBelow: VWMA=3432.79115867224 HMA=3435.32525669771

    47592/0 10/21 02:25:00.000 Submit Entry (Submit: Sell Rule3-2 @10/21 02:24) SellShort 1 [email protected]
    47612/0 10/21 02:35:00.000 Filled @3430.75 (Filled: Sell Rule3-2 @10/21 02:24) SellShort 1 [email protected]

    47612/0 10/21 02:35:00.000 Submit ExitProfit (Submit: Exit Rule3-2 @10/21 02:24_profit) BuyToCover 1 Limit@3422
    47612/0 10/21 02:35:00.000 Submit ExitLoss (Submit: Exit Rule3-2 @10/21 02:24_loss) BuyToCover 1 [email protected]

    47633/0 10/21 02:45:30.000 CrossAbove: VWMA=3430.07159235669 HMA=3429.22729153888

    47633/0 10/21 02:45:30.000 CancelOnCross (Cancel: Exit Rule3-2 @10/21 02:24_profit) BuyToCover 1 Limit@3422
    47633/0 10/21 02:45:30.000 CancelOnCross (Cancel: Exit Rule3-2 @10/21 02:24_loss) BuyToCover 1 [email protected]

    47633/0 10/21 02:45:30.000 ExitOnCross (Submit: Sell Rule3-2 @10/21 02:24_exitOnCross) BuyToCover 1 Market

    47633/0 10/21 02:45:30.000 Filled @3430.5 (Filled: Sell Rule3-2 @10/21 02:24_exitOnCross) BuyToCover 1 Market


    Click image for larger version

Name:	Untitled.jpeg
Views:	218
Size:	92.0 KB
ID:	1123960

    #2
    Hello Brian, thanks for posting.

    Please check a Bid and Ask series to check for out of range fill for a realtime order.

    From the help guide page on real time vs historical differences you can see:
    During simulation using real-time market data or Playback, the fill price is based on incoming market data and volume, you may receive better or worse fill prices depending on where the bid or ask price is and what volume is available at this market prices.

    In the data series menu, change "Price based on" to Bid or Ask and see if the price falls in line with the market order you submitted.

    I look forward to hearing from you .
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      This was on historical data... wouldn't the fill at least be between the high and the low for the bar?

      Comment


        #4
        Hello Brian, thanks for your reply.

        Please set a higher resolution fill series for the historical data. In the Strategies settings, set Order Fill Resolution to High, then select a 1 tick series. This will make the orders fill upon the 1 tick series for better order fill estimations.

        If this does not resolve the issue, I will need from you a test strategy that can re-create the problem to move forward.

        ​​​​​​​Best regards.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          That seems strange... I literally don't care if I get the exact fill on the exact tick... I just want a fill that's between the High and the Low of that 30 second bar... it doesn't make sense that the fill is actually below the Low for that bar... and even below the Low for the next bar.

          Note: we want to go pretty far back with our back testing and tick data is ridiculously slow over a big time period... so that is not going to work for us.

          But, the real question is how is Ninja giving me back a fill that is so far off from the actual 30 second bar values.

          Comment


            #6
            Hello BrianARice, thanks for your reply.

            The reason why you are getting a fill outside of the bar is what we are still troubleshooting. I believe your cached data might need to be reset, please try this and test the strategy again:
            • Shut down NinjaTrader.
            • Open the Documents > NinjaTrader 8 > db folder.
            • Delete the sub-folder named 'cache'.
            • Restart NinjaTrader and test.
            Do you see this happening on the SampleMACrossover strategy as well?

            I look forward to assisting.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Aviram Y, Today, 05:29 AM
            0 responses
            1 view
            0 likes
            Last Post Aviram Y  
            Started by quantismo, 04-17-2024, 05:13 PM
            3 responses
            25 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by ScottWalsh, 04-16-2024, 04:29 PM
            7 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cls71, Today, 04:45 AM
            0 responses
            6 views
            0 likes
            Last Post cls71
            by cls71
             
            Started by mjairg, 07-20-2023, 11:57 PM
            3 responses
            216 views
            1 like
            Last Post PaulMohn  
            Working...
            X