Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Account as a Parameter

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

    Account as a Parameter

    Hi, I was trying to use a TypConverter to let the user select between the available account
    Tried this but doesnt looks to work
    Anyone can help ?

    [NinjaScriptProperty]
    [TypeConverter(typeof(NinjaTrader.Gui.Tools.Account Selector))]
    [Display( Name = "Account", GroupName = "Parameters", Order = 1)]
    public Account My_Account
    { get; set; }
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Hello pmaglio,

    Currently, using TypeConverters is not fully supported by NinjaTrader Support.


    Would you like to submit a feature request to allow an Account selector input be added to an indicator (or strategies) NinjaScript properties?

    This thread will also remain open for any community members that may know of a way to add an account selector as a NinjaScript property.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      yes, please...
      That would be of great help
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Hello pmaglio,

        I've submitted a feature request on your behalf to allow ninjaScript properties of account with a type converter.

        It is up to development to decide if an when a feature request will be implemented.

        We appreciate you taking the time to provide feedback. Please let me know of any other requests or suggestions you may have.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Another way to retrieve the same info would be knowing if the user has an account selected on Chart Trader ; is that possible ?
          pmaglio
          NinjaTrader Ecosystem Vendor - The Indicator Store

          Comment


            #6
            Hello pmaglio,

            It would be possible to create an account selector in custom area on the chart, or in a custom addon window. This would not be the same as a NinjaScript property that would appear in the Indicator parameters.


            Below is a link to an example script that uses an AccountSelector.
            http://ninjatrader.com/support/forum...555#post515555

            And a link to the AddOn Development Overview page of the help guide where you can download the AddOn Framework NinjaScript Basic file which also includes an example of an AccountSelector.



            This same AccountSelector type that would be used in the Addon is what is being used in ChartTrader.

            For example:
            Code:
            NinjaTrader.Gui.Tools.AccountSelector chartTraderAccountSelector = Window.GetWindow(ChartControl.Parent).FindFirst("ChartTraderControlAccountSelector") as NinjaTrader.Gui.Tools.AccountSelector;
            
            if (chartTraderAccountSelector != null && chartTraderAccountSelector.SelectedAccount != null)
            	Print(string.Format("{0} | Selected account | DisplayName: {1}, Name: {2}", DateTime.Now, chartTraderAccountSelector.SelectedAccount.DisplayName, chartTraderAccountSelector.SelectedAccount.Name));
            else
            	Print(string.Format("{0} | account selector or selected account null", DateTime.Now));
            Last edited by NinjaTrader_ChelseaB; 08-07-2017, 07:57 AM.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            10 views
            0 likes
            Last Post burtoninlondon  
            Started by AaronKoRn, Yesterday, 09:49 PM
            0 responses
            14 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
            14 views
            0 likes
            Last Post strategist007  
            Started by StockTrader88, 03-06-2021, 08:58 AM
            44 responses
            3,983 views
            3 likes
            Last Post jhudas88  
            Working...
            X