Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Virtual executed order does not get correctly filled

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

    Virtual executed order does not get correctly filled

    When I execute, on market replay connection, a strategy that has virtual entry, next order which should close the position is not displayed in Trades tab when I select Real-time strategy performance.
    After that trades are out of phase even that in NT log I see that I have positions short trades windows is showing long.
    Please check attached document for deeper explanation and facts.
    Attached Files

    #2
    Hello,

    Thank you for your forum post and detailed bug submission.

    I am looking into this. However I am having somewhat of a hard time with what your showing me is wrong since there is so much information. Can you please let me know what lines in the trade tab you think is incorrect. Is it numbers 7, 8, and 9 in the Executions tab that all occur in the same minute?

    AKA what specificly your seeing as off so that we may further assist.

    Thank You.
    BrettNinjaTrader Product Management

    Comment


      #3
      Trades tab:
      trade #1: has virtual entry, but exit is: SE-2df75xxx-xxx which should be short entry (in my strategy)
      trade #2: states it's a long trade that enters with Buy to cover
      Executions tab:
      line #3: states exit SE-2df75xxx-xxx so it's in sync with trades tab
      line #4: states that I enter long position @ 6:23

      But, NT log states that short position was opened with that entry:
      17/6/2010 8:29:01 PM|1|32|Order='b56af25bc52c4eb29a068fdb559c2de5/Replay101' Name='SE-2df752b1-d0ac-48b4-be53-3fb4c60e3703' New state=Filled Instrument='$EURUSD' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=1.3206 Error=NoError Native error=''
      17/6/2010 8:29:01 PM|1|16|Execution='e5eb060bee4b4ddc8fd27724b1743c1 a' Instrument='$EURUSD' Account='Replay101' Exchange=Default Price=1.3206 Quantity=1 Market position=Short Operation=Insert Order='b56af25bc52c4eb29a068fdb559c2de5' Time='28/4/2010 6:22:00 AM' Multiplier=1E-05

      Aftar this, all trades are shifted which produces wrong calculations.
      On the other hand backtest used on market replay connection mathes perfectly.

      Comment


        #4
        One more thing to add:
        There's close long position (that can be only seen from my logging done in OnBarUpdate) that closed virtual long position opened @ 6:01. Order name is: LE-e3343761-2d24-48dd-9e0d-3a519617cece @ 6:22

        PS. My log is 1 minute ahead.

        Comment


          #5
          ivanjocic, thank you for all the information. We are currently reviewing your files and will get back to you as soon as we reach a conclusion.
          AustinNinjaTrader Customer Service

          Comment


            #6
            Originally posted by ivanjocic View Post
            Trades tab:
            trade #1: has virtual entry, but exit is: SE-2df75xxx-xxx which should be short entry (in my strategy)
            trade #2: states it's a long trade that enters with Buy to cover
            Executions tab:
            line #3: states exit SE-2df75xxx-xxx so it's in sync with trades tab
            line #4: states that I enter long position @ 6:23

            But, NT log states that short position was opened with that entry:
            17/6/2010 8:29:01 PM|1|32|Order='b56af25bc52c4eb29a068fdb559c2de5/Replay101' Name='SE-2df752b1-d0ac-48b4-be53-3fb4c60e3703' New state=Filled Instrument='$EURUSD' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=1.3206 Error=NoError Native error=''
            17/6/2010 8:29:01 PM|1|16|Execution='e5eb060bee4b4ddc8fd27724b1743c1 a' Instrument='$EURUSD' Account='Replay101' Exchange=Default Price=1.3206 Quantity=1 Market position=Short Operation=Insert Order='b56af25bc52c4eb29a068fdb559c2de5' Time='28/4/2010 6:22:00 AM' Multiplier=1E-05

            Aftar this, all trades are shifted which produces wrong calculations.
            On the other hand backtest used on market replay connection mathes perfectly.
            What the log (and executions tab) is saying is this: there was a sell (short) execution that flattened out the virtual entry, not that a short position was opened up.

            However, it does appear that the trades don't quite match up. In the .doc file it seems the strategy was intended to only take one trade per direction at a time, but the executions tab shows up to three contracts long at a time. Can you please clarify how this was achieved?

            Keep in mind that a backtest will produce different results than a Market Replay "real-time" test. The most accurate test is a real-time test on live data, followed by playing the strategy on Market Replay data, and backtesting is the least accurate.

            Could you please strip down your strategy as much as possible (while still retaining the issue you've reported here) and send us the code (and instrument, time frame, session template, etc) so we can take a look at exactly what is happening?
            AustinNinjaTrader Customer Service

            Comment


              #7
              Strategy is using EntriesPerDirection=1 and indeed is never holding more than 1 position opened, but on execution window I saw that there were more positions opened. So statistics are wrong.
              As I've explained you do not even see execution of order Buy to cover for signal LE-e3343761-2d24-48dd-9e0d-3a519617cece @ 6:22 (which is the closure for virtual long opened).
              I will try to create you a strategy that will produce the exact result and post it back here.

              Comment


                #8
                ivanjocic,

                I believe we have another tech already engaging you in this regard and will continue discussion over there instead of this forum thread. Thank you.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                626 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                359 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                562 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                567 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X