Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Account and Instrument Selectors in Property Grids

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

    Account and Instrument Selectors in Property Grids

    How would one incorporate Account and Instrument Selectors in Property Grids? The intention is to allow an Account or Instrument to be selected from the relevant selector as a property of an AddOn.

    EDIT Update:

    I've found this for Instruments and it works well enough:
    Code:
    [PropertyEditor("NinjaTrader.Gui.Tools.InstrumentPicker")]
    public Instrument MyInstrument{ get; set; }
    However, it displays Instruments in the selector with "Default" or an Exchange; e.g. "EURAUD Default" or "BTCGBP Gdax".

    How does one display just the Instrument name alone?

    ... and Accounts?

    Thanks.
    Last edited by jeronymite; 07-18-2021, 12:08 AM.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hello jeronymite,

    Code:
    [TypeConverter(typeof(NinjaTrader.NinjaScript.AccountNameConverter))]
    public string AccountName { get; set; }
    Code:
    [NinjaScriptProperty]
    [TypeConverter(typeof(NinjaTrader.Gui.Tools.InstrumentSelector))]
    [Display(Name="Select Instrument", GroupName = "Parameters", Order = 0)]
    public NinjaTrader.Cbi.Instrument InstrumentInput
    { get; set; }
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Chelsea.

      The Accounts example works well.

      The Instrument example still displays the Instrument name with "Default" or an Exchange name. How can one eliminate the display of "Default" or an Exchange name? In other words, only the Instrument name alone.

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

      Comment


        #4
        Hello jeronymite,

        I'm not seeing a way to do that. It might be necessary to create a custom List<string> input of the instrument names and make a property of this.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks, Chelsea.

          The custom List is not suitable, sadly, since any Instrument is possible in this AddOn, which is for commercial use.

          The InstrumentSelector does not display the extra information when added to an AddOn window, so it is "interesting" that it does so here in a Property Grid.

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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          344 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          557 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X