Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Live Strategy enters one trade on one computer, and two on the other

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

    Live Strategy enters one trade on one computer, and two on the other

    Hello, Me and my friend have been building a strategy to invest in live futures.

    I ran the strategy on my PC, and he ran it on an AWS VM.

    we ran the strategy on the 21st on April.

    On my PC, the strategy entered two trades, one on 14:25, and the other on 14:45.

    On his VM, the strategy entered one trade, on 14:25.

    At the time he was using Ninjatrader v 8.0.0.27, and i was using the latest version.

    At the time I was using a live Ninjatrader account, while he was using a live Ninjatrader continuum account.

    When running a back test on both of our machines, the results show only one trade entered at 14:25 for both of us.

    I use CME_TOP Top of Book (Level 1) as my market data.

    He uses CMEGROUP_TOP Top of Book (Level 1) as his market data.

    I have downloaded market replay data for NQ06-23 21/04/2023, and went over the same hours with the strategy, and it only entered the trade at 14:25.

    What can be the cause of this difference in behavior? what should we check? do you need anything else to investigate further? let me know.

    This is my chart:
    Click image for larger version

Name:	aviram.jpg
Views:	213
Size:	75.5 KB
ID:	1247671


    This is my friends chart:
    Click image for larger version

Name:	shlomi.jpg
Views:	186
Size:	51.2 KB
ID:	1247672

    Thanks for the continued support!

    Aviram Y​​
    Aviram Y
    NinjaTrader Ecosystem Vendor - Aviram Y

    #2
    Your live data feed might not be Continuum data (as the replay data is) so there could be subtle differences in the realtime vs historical bar data.

    You'll probably want to read this: https://ninjatrader.com/support/help...ime_vs_bac.htm
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Same strategy, two different data feeds, right?

      Maybe, perhaps, hmm, it's quite likely,
      the explanation is real-time data feed inconsistencies?
      ... you both used identical charts, right?
      ... you both used identical strategy settings, right?
      ... did one of you trade the NQ and the other the MNQ?
      ... did your friend's strategy use some kind of 'one trade per session' setting?

      -=o=-

      Ok, so now, after the fact, both machines are
      back in sync when back-testing, right?

      Maybe, perhaps, hmm, it's quite likely,
      the explanation is both your systems downloaded
      the exact same historical data from NT's historical
      data servers? Same issue regarding Market Replay
      data, this downloaded data will probably be exact
      for both of you -- so you would both see exactly
      same results in Strategy Analyzer window and/or
      with Playback connection -- because in those two
      cases, the data should be, by definition, identical
      for the both of you.

      -=o=-

      To continue to rule everything out, you and your friend
      should be on exact same version of NinjaTrader, and
      using exact same data feed providers, using exact same
      market data settings, using exact same NinjaTrader
      configuration/option settings.

      As well as: exact same strategy code with exact
      same strategy settings running on exact same charts,
      running with exact same number of accounts, using
      exact same trade copier configuration (or none).

      Until everything is exactly the same, hiccups will
      happen, and will probably be best explained by
      whatever differences you have failed to address.

      -=o=-

      Last thought: if your strategy uses Limit orders for
      entering your position, getting filled in a live market
      is not guaranteed to occur for both strategies. Your
      strategy might get filled, but your friend's strategy
      doesn't. If identical live markets results is important,
      this is probably best achieved by the strategy using
      Market orders for entry.

      Just my 2˘


      Last edited by bltdavid; 04-22-2023, 06:08 AM.

      Comment


        #4
        bltdavid Has some great thoughts here - on top of all that - even if you are connected to the same feed, you could be connected to different servers behind the scenes, and sometimes there is a data problem only on one server so it might have only affected one of you. But, the low-hanging fruit is you're on different feeds or some settings difference that hasn't yet been identified/disclosed as bltdavid said, or that you're entering with a limit order where a few milliseconds difference in timing could mean one of you is ahead of the other in the queue and got a fill while the other got no fill because price moved on.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          First of all thank you both! huge help!

          We both used identical charts, strategy settings, same instrument and time frame (NQ 5 minute), there is not limits on the amount of trades per day, there is a limit for the amount of open positions which is 1 at all times.

          My friends strategy is identical to mine, we both use one account each for live trading, and our entry orders are market orders, we do not use a copier configuration.​

          To address the main differences between us both after all of the above has been said:

          1. might be obsolete because we use market entry orders, we are both from Israel but my friend uses AWS VM that is located in the USA, while I use my internet provided as Is, so an initial ping difference from Israel to the USA and then to the main server responsible for the transaction data is possibly a bit higher than mine ( as far as i know the median ping from Israel to the us is around 150-200)​, so 150-200ms delay and above that from the AWS server to the "main server" is another 10-50ms delay.
          maybe the routing is different? and my data feed comes from a server in Europe? but still i have no clue..

          2. My friend had an issue with his lifetime account, he could not log into it and trade live while using Ninjatrader v 8.0.0.27, and so he tried using a continuum account from the website and it worked for him ( as a solution until the problem will be solved by the technical support team ) but he stayed on v 8.0.0.27 when he was live.

          He did change his Ninjatrader version to the latest afterwards, and he can now login to his lifetime account.

          3. The last thing I missed for now at least Is that the strategy uses OnBarClose calculation mode.

          that's basically everything covered at least from what you guys have mentioned above
          Aviram Y
          NinjaTrader Ecosystem Vendor - Aviram Y

          Comment


            #6
            Hello Aviram,

            Thanks for your notes.

            QuantKey_Bruce and bltdavid are correct. This could be due to a difference in realtime data since you and your friend are using different data feeds.

            As a general rule, Same exact input data + Same exact strategy code and parameters + Same exact settings = Same results.

            You could be seeing the same results when backtesting on historical data or when using Market Replay data because the same exact historical data and Market Replay data were downloaded from the NinjaTrader historical data servers by each of you. Since the same exact data was downloaded by each of you then the results would likely be the same.

            See this help guide document on the differences in real-time vs backtest (historical).
            http://ninjatrader.com/support/helpG...ime_vs_bac.htm

            You should also both be using the same version of NinjaTrader when comparing results. If you are running NinjaTrader 8.1.1.3 then your friend should also use NinjaTrader 8.1.1.3 when comparing results.

            There could be slight discrepancies in results if you are not using the same exact data, same exact strategy code and parameters, same exact chart settings, same exact platform settings, et cetra.

            Debugging prints could be added to the scripts to see exactly how the logic in your strategies are evaluating to see if there are any differences there. Below is a link to a forum post that demonstrates how to use prints to understand behavior.
            https://ninjatrader.com/support/foru...121#post791121

            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            80 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            46 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            29 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            66 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X