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 doesn't fill real time in simulation even filled historically

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

    Order doesn't fill real time in simulation even filled historically

    Hey fellas,

    I'm likely missing out on a concept here but I'm trying to debug a strategy since some entries aren't being made.

    I'm testing in Market Replay so please help me understand something. Let's say that my Playback control is at 10:00AM. While on the chart, I enable the strategy. After enabling it, I can see the orders that it's placed prior to the 10:00AM counter. If I want to replay one of those entries, I Go To that prior trade time with the strategy running.
    Shouldn't the entry occur? I'm not seeing it.

    You can see examples with Stoch1-Fill showing the Fill and Stoch1-NoFill showing the same time frame with no fill/order.
    What's happening here?
    Attached Files

    #2
    Hello PN720,
    Thanks for your post.

    Can you confirm that the strategy is enabled on your Control Centers 'Strategies' tab while this is occurring?

    Do you receive an error on screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Ah, ok, guys. The Strategy is enabled but I do see an error in the Log file about the stop price being greater than or equal to close of current bar. It looks like the strategy is immediately disabled after that.

      I'll see if I can find the error in the script. Thanks.

      Comment


        #4
        Just to give a little insight as to what is occurring...

        Historical data consists of OHLCV values of each bar in a data series. When a strategy is run with real-time data(or Market Replay in this case), it first processes the historical data to create trade history and then it proceeds to processing real-time data. Real time data develops on a tick by tick basis as the data comes in and then creates bars with this data.

        So, when you start Market Replay and see an execution occurred, it MUST have occurred within the OHLC of that bar. Once you rewind Market Replay it is playing back as if it is live, and thus you can get these scenarios that would not occur on a historical bar.

        I suggest reviewing both of the following links for an in-depth explanation on the differences between real-time and historical fills.

        Help Guide - Discrepancies: Real-Time vs Backtest
        Forum Post - Comparing real-time, historical, and replay performance

        Let me know if you have questions.
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sidlercom80, 10-28-2023, 08:49 AM
        166 responses
        2,234 views
        0 likes
        Last Post sidlercom80  
        Started by thread, Yesterday, 11:58 PM
        0 responses
        1 view
        0 likes
        Last Post thread
        by thread
         
        Started by jclose, Yesterday, 09:37 PM
        0 responses
        6 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,414 views
        0 likes
        Last Post Traderontheroad  
        Started by firefoxforum12, Yesterday, 08:53 PM
        0 responses
        11 views
        0 likes
        Last Post firefoxforum12  
        Working...
        X