Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Distinguishing between Simulation, Demo and Live Accounts

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

    Distinguishing between Simulation, Demo and Live Accounts

    The three generic Account types NinjaTrader supports are Simulation, Demo and Live. Simulation Accounts can be determined to be such by their naming convention. (I include the Playback and Simulated Data Feed Connections in these.) It is not so simple with Demo and Live.

    (Although obviously different, the distinction between "Account" and "Connection" can largely be "put to one side" for the purposes of discussion here unless otherwise emphasised.)

    When Configuring Connections, the different Available Connection Types sometimes have an option to specify Demo, and sometimes not. If the Connection Type is for a Data Provider Only, it makes sense if the Demo option is not there, since these are not Accounts in the true sense. For broker Connections, however, given they most likely connect an Account, one would expect it to be there for all brokers, not just some. For example, NinjaTrader FXCM Connections can have Demo specified, but FOREX.com Connections cannot, even though FOREX.com also offers Demo accounts.

    There are various Connection.Options that are useful in trying to determine the type of Account to which a Connection connects: CanManageOrders, IsDataProviderOnly, Mode. If IsDataProviderOnly is true, one might presume the Connection is not for a Demo or Live Account. Nevertheless, that does not mean that if IsDataProviderOnly is false the Connection is for a broker Account. The Free NinjaTrader Forex Data connection (It's fantastic. Thanks, NinjaTrader!) has IsDataProviderOnly set to false, but does not act as a broker Account; it only provides data to facilitate Simulation Accounts. Mode can be either Live or Simulated, but that does not provide the differentiation required to distinguish between the three possibilities. For example, the Free NinjaTrader Forex Data connection is Mode.Live, whereas an FXCM Demo Account is Mode.Simulation.

    Questions:
    1. Why are some broker Connections able to have Demo specified, whilst others are not?
    2. Can all broker Connections have this option made available?
    3. If the option is available, how can the state of the option for the Connection be queried from an AddOn?
    4. Whether or not the Demo option is available in any Connection Type, how can one unequivocally determine if any Connection is Simulation, Demo or Live by reference to a "direct" state (e.g. bool), rather than having to intuit that from a name or a mix of other (potential inaccurate) set states (e.g. Connection.Options).
    It seems that of the various ways in which one could define and differentiate the three generic Account types, there is some attempt in the platform to do some characterisation of an Account/Connection. But there seems to be no well-defined, unambiguous set of characteristics for these things that can simply and unequivocally be queried for a definitive answer. Worse, the things that are there are not always applied consistently or accurately.

    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    [... heavily weighted towards futures trading accounts ...]

    Back in NT7 days, my code recognized two kinds of accounts, live and sim.

    Anything with an exclamation point '!' was a live account, all others were sim accounts.

    Interestingly, NT7 actually disallowed the exclamation point when specifying the
    name of a new sim account -- this was a huge deal and seemed like the only
    way to know for sure.

    -=o=-

    Now NT8 comes along and forces the prefix string 'Sim' for all sim account names,
    (and it now allows the '!' character in the sim account name, which is unfortunate,
    but probably not a big deal anymore).

    I never cared about recognizing demo accounts. I rationalized that by saying if
    the account comes from a broker (aka, if it contained a '!' character) it was, for
    all intents and purposes, to be treated the same as a 'live' account -- since the
    whole idea is that a demo acct was a 'temporary' live account -- ie, to my way
    of thinking, it was close enough.

    I mean, consider the eval accts for Apex and Leeloo, the NT8 software considers
    these as live accounts, even though we all know they are treated as sim accounts
    from the broker point of view.

    So, a demo account should be the same way, it is 'close enough' to just consider it
    a live account (as far a NinjaTrader.exe software is concerned), even though we
    all know they are treated as sim accounts from the broker point of view.

    IMHO, recognizing just two kinds of account, live vs sim, will probably make your
    coding life much easier.

    In other words, why not treat a demo account as a live account? The demo
    acct is usually quite temporary and will expire/go away soon enough anyways.

    Just my 2˘.

    Last edited by bltdavid; 01-13-2023, 08:08 PM.

    Comment


      #3
      If you really need to know, me thinks the best way is to inspect the
      Config.xml via C# code and find the 'ConnectOptions' tree, look for the
      specific connection you want, then check the 'Mode' tag id.

      All my Mode tags say 'Live',

      <Mode>Live</Mode>

      But but but ...
      I bet if you experiment with clicking the Demo checkbox when creating
      a new connection, then save it, you might find,

      <Mode>Demo</Mode>

      and, wa-lah, that's how you know.

      -=o=-

      As far as accessing the Config.xml from code, some ideas can
      be gleaned here and here, even though those are NT7 threads.

      Good luck!
      Last edited by bltdavid; 01-13-2023, 08:07 PM.

      Comment


        #4
        As always, bltdavid, your comments are useful. Coming from NT7 days and knowing the things you speak of, I consider the NT8 approach to be a "missed opportunity", with scope for improvement.

        As I mentioned above, the currently available ways to try to determine Simulation/Demo/Live do not provide unambiguous answers to the question. You'll see I quote various examples where a Demo account is flagged as Live and another Demo account is flagged as Simulation. Given that Mode is an enum with only two values (Live and Simulation), it cannot meet the need. If it were to have Demo added as a value, and if it were to be used accurately, it might come close. But that and consistency would be required. One should not have to revert to config files (in any manner) to determine (or affect) something.

        As to distinguishing the three types rather than just two, the difference between them is significant and highly relevant:
        • Simulation accounts are entirely "synthetic" and Orders never leave the platform -- without the use of Risk templates, a Simulation account will not come close to real-world risk conditions for trading. That's fine if just doing conceptual testing, but not fine if preparing to enter the real world. This varies by Instrument type, of course, but for Forex in particular, this is very important. For many users, Risk templates will just be too hard, and even if used, they only approximate the real-world accounts -- better than nothing, but not always accurate.
        • Demo accounts add the reality of network and broker interactions in a "safe" environment -- now all the real-world risk elements come into play, and one can anticipate margin and other "unexpected" events more realistically. It also exposes individual broker "idiosyncrasies", wherein one might see a "strange" message for the very first time and be able to improve code to cater for it, where otherwise one would be on the wrong side of PnL when it happened for the first time in a live trade. All the "risk" but without the "RISK".
        • Live accounts have all the RISKs that one would expect.
        All of that is true, whether or not one distinguishes the difference in code. However, for a commercial AddOn, making it crystal clear that an account is LIVE (not just a broker account) is extremely important. Traders need confidence in accurately knowing the type of account they're using. I cannot agree that "near enough is close enough" in this. Are there ways that traders can name things to make it obvious? Of course. But do mistakes happen when trading? Of course! I know professional traders who want to know for certain what type of account is selected, to reinforce their own due diligence on every trade. Knowing this, an AddOn can make it visually unambiguous. Safety is critical in a good commercial product, and so making it unambiguous in its knowledge of Account type is very important, making sure one caters to all traders from novice to professional. NinjaTrader can and should improve this substantially.

        Thanks.
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        Comment


          #5
          Hello jeronymite,

          Unfortunately, there is not a supported / documented property for demo vs funded brokerage accounts.

          I will submit a feature request for the development team consider this.

          Once I have a tracking ID for this request I will post in this thread for future reference.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Thanks, NinjaTrader_ChelseaB. Much appreciated.

            Thanks.
            Multi-Dimensional Managed Trading
            jeronymite
            NinjaTrader Ecosystem Vendor - Mizpah Software

            Comment


              #7
              Hello jeronymite,

              This request is being tracked with ID# SFT-5732.

              Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

              When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

              Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Add my vote please.
                zacwhitesi
                NinjaTrader Ecosystem Vendor - Shark Indicators

                Comment


                  #9
                  Hello zacwhitesi,

                  I've added your vote to SFT-5732.

                  Thank you for your vote.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Yes, adding this property would be useful.
                    Bruce DeVault
                    QuantKey Trading Vendor Services
                    NinjaTrader Ecosystem Vendor - QuantKey

                    Comment


                      #11
                      Hello Bruce,

                      I've added your vote to SFT-5732.

                      Thank you for your vote.
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by algospoke, Yesterday, 06:40 PM
                      2 responses
                      19 views
                      0 likes
                      Last Post algospoke  
                      Started by ghoul, Today, 06:02 PM
                      3 responses
                      14 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      45 views
                      0 likes
                      Last Post jeronymite  
                      Started by Barry Milan, Yesterday, 10:35 PM
                      7 responses
                      20 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      10 responses
                      181 views
                      0 likes
                      Last Post jeronymite  
                      Working...
                      X