Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulate order delays

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

    Simulate order delays

    Hello,

    During Market Playback, is the simulation adding random delay to order fills?
    Or are they only for real-time data sim account?

    Is there a way to simulate longer delays during playback?

    Regards
    Ulises
    ulisesguerrero
    NinjaTrader Ecosystem Vendor - Thrifty Coders

    #2
    Hello ulisesguerrero,

    The simulation engine does add random delay to orders similar to a live market. Any realtime simulation mode would have that feature as part of the simulation fill engine. Historical bars would not have that feature.

    If you wanted to add other amounts of delay you would need to use a 1 tick series for the most frequent updates and for order submission. Then use time conditions to submit the order at a later time from when your entry condition was true. This would be a pretty large change from your base logic to submit orders so in realtime when you are actually trading you would need to remove that logic to have the script work normally again.

    Comment


      #3
      Hello Jesse,

      Thank you for the suggestion. Unfortunately delaying an order from being sent on a 1 tick series wouldn't reproduce the behavior of a live brokerage. The order is sent, but sometimes the broker delays way more than usual, or the delays are simply much more than the Sim delays.

      Is there a way I can make those delays longer on Playback or Sim?

      Regards
      Ulises
      ulisesguerrero
      NinjaTrader Ecosystem Vendor - Thrifty Coders

      Comment


        #4
        Hello ulisesguerrero,

        That would be the only way to simulate a delay, to literally add your own delay in by using time from when the condition became true. There are no other options to control that.
        Last edited by NinjaTrader_Jesse; 08-31-2022, 07:15 AM.

        Comment


          #5
          Hello Jesse,

          Is it possible to use the "External Connection" as a broker simulation, rather than just data?

          Regards
          Ulises
          ulisesguerrero
          NinjaTrader Ecosystem Vendor - Thrifty Coders

          Comment


            #6
            Hello ulisesguerrero,

            No the external connection does not allow for any other control over how orders fill on the simulation engine. The external connection could be used by tools which pass in market data but that would have no relevance over the actual fills on the sim account. The simulation engine adds random delay to orders but there are no controls over the amount of random delay that's added. If you wanted to increase the amount of delay from order submission to fill you would have to use a time condition and submit the order later than when the condition became true. The sim engine will add its random delay when the order is actually submitted and you would be adding additional time from when your condition actually happened to increase the delay before submission.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            66 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            141 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            75 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            46 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            51 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X