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

Changing historical bar values, Median?

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

    Changing historical bar values, Median?

    Hi there,

    This is a little bit hard to describe.. hard to replicate. But in my code, I've seen my real-time trading results differ from historical execution... there are trades *not* executing real-time that, according to my historical execution, should have executed.

    Now, I understand that can often happen. But I thought I was careful to stay away from anything that would make that possible... I'm primarily working in 10m-30m bars. I'm only using OHLC bars, nothing else that should be very tricky.

    The only thing I can come up with is maybe my use of Median. Median doesn't come from the broker, right? NinjaTrader calculates it off of OHLC? Is it possible that Median could change substantially from time to time...? (I've also seen, I believe, even historical executions change... which really baffles my mind.)

    #2
    Median does not change provided your data stays the same. Historical executions will show up as it is calculated out by the data presented on the chart. Real-time trades will never be the identical to historical trades. Historical trades are done against OHLC. Real-time trades are always run through the simulator fill algorithm.

    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by heech View Post
      Hi there,

      This is a little bit hard to describe.. hard to replicate. But in my code, I've seen my real-time trading results differ from historical execution... there are trades *not* executing real-time that, according to my historical execution, should have executed.

      Now, I understand that can often happen. But I thought I was careful to stay away from anything that would make that possible... I'm primarily working in 10m-30m bars. I'm only using OHLC bars, nothing else that should be very tricky.

      The only thing I can come up with is maybe my use of Median. Median doesn't come from the broker, right? NinjaTrader calculates it off of OHLC? Is it possible that Median could change substantially from time to time...? (I've also seen, I believe, even historical executions change... which really baffles my mind.)

      heech,

      Median is defined as the following for each bar, ( H + L / 2 ).

      Open and close are not part of the equation.

      RJay
      RJay
      NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

      Comment


        #4
        Okay, back to the drawing board. I'll double check my parameters to make sure they haven't changed.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ZenCortexCLICK, Today, 04:58 AM
        0 responses
        2 views
        0 likes
        Last Post ZenCortexCLICK  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        172 responses
        2,280 views
        0 likes
        Last Post sidlercom80  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        17 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        4 views
        0 likes
        Last Post adeelshahzad  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X