• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

account live or sim

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

    account live or sim

    Hello, i am not sure if this belongs here or in the addon section. I have a question regarding the accounts that are available similar to the drop down in chart trader and when using the account addon. Is there a way to know whether an account is a SIM account or live account. Chart trader has a sim mode color that can be changed. Is the means to know this available as a variable or function or method on the account ie this is live or sim. I have some aspects i would like to code based on whether the account is live or a sim one (knowing there can be multiple sim accounts created).
    thanks

    #2
    Hi soulfx, thanks for your question.

    I'm not aware of any undocumented properties. You could look at the account name for a "Sim" prefix and that would be effective in separating simulation accounts from real accounts.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      thanks i did think on that and perhaps that is all the chart trader does internally to change the color of the background ; i just wondered if there was some other property available

      Comment


        #4
        Following from the above i will parse the account name to check. Can you share or tell me which skin property ninja uses to set the background color of the chart trader panel for a live account vs a SIM account - where are the colors derived from. I have another panel i create which has background black ... presuming it gets this from one of the Skin XAML files and what attribute it uses for this for each. In order to stay in synch with the skins i want to get the correct colors to change the background depending on if SIM or live account (for my own separate panel) so that the colors are aligned with chart trader
        thanks

        EDIT - update ok i see the Simulation Color is set in trading properties in the options. Is this accessible as a property to ninjascript.
        So i know what the simulation color is - can you map that to the correct attribute in the skins XAML file (whether blueprint or .......?)
        thanks
        Last edited by soulfx; 07-08-2020, 11:21 AM.

        Comment


          #5
          Hello soulfx, thanks for your reply.

          That property is not documented in our NinjaScript help guide, but It might be findable through the NinjaScript editor using IntelliSense. Unfortunately, I can not do any further digging than this.
          Chris L.NinjaTrader Customer Service

          Comment


            #6
            To be honest that is disappointing to hear. Deferring something to being undocumented as a way to not answer a question is not good support. This is a reply in Addon development yesterday i just happened to notice that is a good example of Chelsea taking the time to resolve the question at hand. Perhaps you can assign this to him if you do not know. Because something is not in ninjatrader Help 8 - does that now mean it is undocumented. Ninja elected to provide and design skins in the way they have. There have been numerous requests for more documentation on this and even an editor to manage the properties and create new skins. I am not asking for that but merely the property of the scenario above. Please advise or pass to someone who will know this
            thank you

            Hello Waldo,

            With your custom controls the color is whatever you choose.

            Are you wanting to get a color from the skin?

            System.Windows.Application.Current.TryFindResource ()

            The FontButtonBrush from blueprint.xaml might be what you are after..

            Comment


              #7
              Hello soulfx, thanks for your reply.

              I was able to find the simulation color by using the IntelliSense in the NinjaScript editor. The NinjaTrader.Core.Globals.TradingOptions.Simulation Color property holds the simulation color. Another technique you could use to look for colors in the blueprint.xaml is using this tool: http://www.iconico.com/colorpic/ Using that you can pull hex codes out of NinjaTrader and then search the skin files.

              Please let me know if I can assist any further.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                thanks appreciate the response. i will have a look through the blueprint and see what i can find and then perhaps check back with you to confirm the resource/property is the one i need

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by WHICKED, Today, 01:01 PM
                0 responses
                3 views
                0 likes
                Last Post WHICKED
                by WHICKED
                 
                Started by polo0202, Today, 12:15 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_BrendanC  
                Started by GARZONJ, Today, 11:27 AM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by NtFan, Today, 11:08 AM
                0 responses
                8 views
                0 likes
                Last Post NtFan
                by NtFan
                 
                Started by anamaria0589, Today, 09:39 AM
                1 response
                13 views
                0 likes
                Last Post NinjaTrader_Jermaine  
                Working...
                X