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

Simulation Account, how can I ?

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

    Simulation Account, how can I ?

    Hi There

    I want a strategy to run, for demo purpose, on any Simualtion Account, but only simulation account.

    I didn't find a way to distinguish if the current account is a "simulation" account in the strategy code.
    Is there a way do do that ?

    eg. if (Account.IsSimulation == false)
    return;

    Thanks

    #2
    When you create a Sim account have you noticed that you
    are forced to use the 'Sim' prefix in the account name?

    Well, that's how you know.
    I think this code should do what you want,

    Code:
    if (Account.Name.StartsWith("Sim") || Account.Name == "Playback")
        Print("Account " + Account.Name + " is a simulation account");

    Comment


      #3
      Originally posted by bltdavid View Post
      When you create a Sim account have you noticed that you
      are forced to use the 'Sim' prefix in the account name?

      Well, that's how you know.
      I think this code should do what you want,

      Code:
      if (Account.Name.StartsWith("Sim") || Account.Name == "Playback")
      Print("Account " + Account.Name + " is a simulation account");
      So simple that I missed it !

      Great ! thank very much

      Comment


        #4
        Hello Philippe56140,

        bltdavid is providing good information. Unfortunately, the Account objects do not have a IsSimulation property.

        There is a way to check if Global Simulation Mode is enabled.

        But for account specific, I would agree with checking the account name.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Unfortunately, the Account objects do not have a IsSimulation property.
          One hesitates to say that would be a good idea and an "easy add" when there are so many feature requests, but...
          Bruce DeVault
          QuantKey Trading Vendor Services
          NinjaTrader Ecosystem Vendor - QuantKey

          Comment


            #6
            Hello Bruce,

            I will submit a feature request for you.

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

            Comment


              #7
              Hello Bruce,

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

              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

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by burtoninlondon, Today, 12:38 AM
              0 responses
              4 views
              0 likes
              Last Post burtoninlondon  
              Started by AaronKoRn, Yesterday, 09:49 PM
              0 responses
              12 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Yesterday, 08:42 PM
              0 responses
              11 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Yesterday, 07:51 PM
              0 responses
              13 views
              0 likes
              Last Post strategist007  
              Started by StockTrader88, 03-06-2021, 08:58 AM
              44 responses
              3,982 views
              3 likes
              Last Post jhudas88  
              Working...
              X