Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Replay and Live Sim significantly different...

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

    Market Replay and Live Sim significantly different...

    I've been toying with Limit Orders for the past month or so, and one thing I'm noticing is that my results in market replay and in live sim are significantly different...

    I'm not using any indicators or what not... in fact my entries are as follows....

    Code:
                // BUY MODE
                if (longentryOrderA == null
                    && longentryOrderB == null
                    && longentryOrderC == null
                    && Position.MarketPosition == MarketPosition.Flat
                    && Low[1] > Low[2] 
                    && High[1] > High[2])
                {
                    longentryOrderA = EnterLongLimit(0, true, DefaultQuantity, GetCurrentBid() - 1 * TickSize, "LongA");
                    longentryOrderB = EnterLongLimit(0, true, DefaultQuantity, GetCurrentBid() - 2 * TickSize, "LongB");
                    longentryOrderC = EnterLongLimit(0, true, DefaultQuantity, GetCurrentBid() - 3 * TickSize, "LongC");
                }
    and....

    Code:
                // SELL MODE
                if (shortentryOrderA == null
                    && shortentryOrderB == null
                    && shortentryOrderC == null
                    && Position.MarketPosition == MarketPosition.Flat
                    && High[1] < High[2]
                    && Low[1] < Low[2])
                {
                    shortentryOrderA = EnterShortLimit(0, true, DefaultQuantity, GetCurrentAsk() + 1 * TickSize, "ShortA");
                    shortentryOrderB = EnterShortLimit(0, true, DefaultQuantity, GetCurrentAsk() + 2 * TickSize, "ShortB");
                    shortentryOrderC = EnterShortLimit(0, true, DefaultQuantity, GetCurrentAsk() + 3 * TickSize, "ShortC");
                }
    in Live sim i seem to be working 90% only long or short orders, where as market replay I seem to be working both....

    here's screenshots to illustrate my issue... the first one is live, the second one is the market replay
    Attached Files

    #2
    I know that replay and sim won't be exact matches... but to differ this significantly?

    this is where I'm thrown off.... because its the exact same code

    Comment


      #3
      BigDog008, which Market Replay speeds were you using? Are results more aligned if you 'enforce immediate fills'? - http://www.ninjatrader-support.com/H...ulatorTab.html

      Comment


        #4
        using replay of 500x, delays of 0, will try it right now with immediate fills

        Comment


          #5
          Bertrand,

          Nope... in sim I still see both Long and Short orders...

          in live I still see roughly 90% only longs, or only shorts

          (running two strategys in seperate sim accounts, one with CalcOnBarClose = True, the other False)

          Comment


            #6
            BigDog008, not sure what you mean by live and sim in your last post...did you a try a lower replay speed with the same setup?

            Comment


              #7
              sorry... by sim i ment market replay, by live i ment the live feed in simulation mode...


              the results are same whether i run in 500x or a lower speed in market replay

              Comment


                #8
                Ok thanks - it seems on one chart I also see a target executed, please strip the strategies down to one entry per side and compare the results then. Is the data from the same feed by the way?

                Comment


                  #9
                  would it be of any help if I email you the code Bertrand?

                  I'm just totally puzzled why it works fine in replay but not with the live feed

                  the data is from the same feed also

                  Comment


                    #10
                    Sure, please contact me at support at ninjatrader dot com Attn Bertrand with the code you used and I'll take a look.

                    Comment


                      #11
                      just sent it

                      Comment


                        #12
                        BigDog, we've recieved your email with the code and we will start reviewing it.
                        AustinNinjaTrader Customer Service

                        Comment


                          #13
                          Austin, and Bertrand

                          Thank you both

                          Comment


                            #14
                            BigDog008, the code is good from a glance, thanks for sending it in.

                            The differences you witness is probably due to the reasons listed here - http://www.ninjatrader-support.com/H...sBacktest.html

                            As you place only limit orders, fill assumptions can make a big difference in generated results.

                            You could try the same testing with the 'liberal' fill algorithm, although the 'default' one would be more realistic.

                            Comment


                              #15
                              so the only way to really get a realistic view of what the strategy can or can't do is to just simply do a live sim until enough data samples are collected?

                              it just doesn't seem right though that when I'm in live sim, and I clearly have the criteria met to go long, that the strategy is working short orders... and vice versa

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              649 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              370 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              574 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              576 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X