Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default Fill Algorithm used when in replay ...

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

    Default Fill Algorithm used when in replay ...

    I reviewed the code for the default fill type and it seems to fill limit orders when the symbol traded through the limit price, not to the limit price.

    With this context, here is my question:

    When a strategy is being run in Replay mode using the default fill option, it seems to sometimes fill when prices trade through the limit order and sometimes when prices trade at the limit order...

    I am trying to understand how the default fill algorithm is applied to Bid/Ask when in replay mode. When I looked at it, it did not seem to reference Bid price / volume or Ask Price / volume ... Am I right in this impression or are there 2 fill types -one for replay and one for backtest (And I was only looking at the backtest fill type code)?

    Thanks for your help,

    Learning1

    #2
    When a strategy runs in real-time, the fill algorithm used is our simulation engine --> Not the same as on historical bars.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks. Just for my clarity then ...

      1) When a strategy runs on backtest or optimization in the strategy analyzer, the code contained in either the default fill type or the liberal fill type drives the fill behavior of the test / optimization.

      2) When a strategy runs live in the simulation account the fill algorithm used is the NinjaTrader simulation engine. Am I right in assuming that the algorithm used in this engine triggers fills from the Bid / Ask price and volume rather than the traded prices? Does it also consider the length of time an order has "been in the que"? (I assume it also considers the exchange data delay settings in the Simulator options tab.)

      3) When the simulator engine fill algorithms are running with live data in the simulation account the Liberal vs. Default Historical option in Historical Fill processing (When the strategy is being set up) has no effect on the behavior of the simulation fill algorithms. Is this the case?

      4) When a Strategy is run in REPLAY, am I also right in assuming that it is the simulator algorithm that drives the fills and the Historical Fills Processing option of Liberal vs. Default has no effect on the fills when running in replay?

      Thanks in advance for helping me increase my clarity in interpreting test results.

      Gratefully,

      Learning1

      Comment


        #4
        One more thing to increase my understanding ...

        When running in Live simulation account or in replay, The "Enforce Immediate Fills" option in the simulator tab of options changes the Fill algorithm used in the simulator so that fills are not based on Bid / Ask and they simply occur if the price of a limit order is touched by the price action of the instrument. Is this the case?

        If so, the most realistic way to get an understanding of the performance of a strategy is by running in live / replay with the Enforce Immediate Fills option unchecked.

        Do I have this all straight in my head?

        Thanks

        Comment


          #5
          1) yes
          2) Unfortunately we can no disclose the fill logic of the realtime/replay simulator since this is one of our competitive advantages
          3) yes
          4) yes

          "enforce partial fills" has no effect on backtesting

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Perr0Grande, Yesterday, 08:16 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by f.saeidi, Yesterday, 08:12 AM
          3 responses
          24 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by algospoke, Yesterday, 06:40 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by quantismo, Yesterday, 05:13 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, 04-16-2024, 02:29 PM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_ChristopherS  
          Working...
          X