Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Additional Instrument Selector... can I add as a Strategy/Indicator grid parameter?

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

    Additional Instrument Selector... can I add as a Strategy/Indicator grid parameter?

    Hi,
    I've looked at this page on Instrument Selectors: ... but I don't want to create an addon or do the stuff re linking to other windows ... I just want a control in my indicator/strategy grid to select a secondary instrument.

    Is this possible?

    Regards,

    #2
    Hello tgn55,

    Thank you for the post.

    You can do this however keep in mind the passed in instrument should not be used for AddDataSeries purposes, that is not reliable and is a known failure point. This is documented in the help guide in the AddDataSeries page, other uses should be fine only AddDataSeries has the stipulation that variables cannot be used. If that was the intention let me know so I can add a vote for the feature request for that.

    Code:
    [NinjaScriptProperty]
    [XmlIgnore]
    [TypeConverter(typeof(NinjaTrader.Gui.Tools.InstrumentSelector))]
    [Display(Name="Select Instrument", GroupName = "Parameters", Order = 0)]
    public NinjaTrader.Cbi.Instrument InstrumentInput
    { get; set; }

    I look forward to being of further assistance.
    Last edited by NinjaTrader_ChelseaB; 10-10-2022, 10:04 AM.

    Comment


      #3
      Thanks Jesse... that is great. But... as you guessed, I really did plan to use it in AddDataSeries ;-( I had read the caveat in the documentation...tried it anyway, it seemed to work.
      Are you able to elaborate on how it fails when it fails? Is it obvious? Or subtle... as in data is incorrect, but not really apparent that something went pear-shaped?

      I can probably handle a spectacular failure... it's the other kind that is probably more risky !

      Cheers,
      T.

      Comment


        #4
        Hello tgn55,

        There is not a list of areas where this can fail it is just not expected to always work so that note is added. I have in the past seen some strangeness surrounding data loading incorrectly after making changes to the input series. There are also specific cases which the analyzer will detect to prevent you from using that type of syntax which is the error mentioned in the help guide. The best I can suggest here is to avoid this type of use until a supported solution is available for that use case.

        If you are checking the accuracy in some way and making sure it is running right while you use it you can certainly explore using this for the input series we just can't advise it based on the expectation. I will add a vote for the feature request SFT-882 to hopefully see this as a feature in the future.


        I look forward to being of further assistance.







        Comment


          #5
          Sweet ... thanks Jesse.

          Comment


            #6
            How to set default value or clear the field ? it always show last selected instrument ?

            Comment


              #7
              Hello Lyubomir Kratinov,

              You can set a default instrument in State.SetDefaults.

              InstrumentInput = Instrument.GetInstrument("ES 06-23");

              Yes, the instrument selector will always show the last selected instrument as the selected instrument.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                SFT-882 vote request.

                Comment


                  #9
                  Hello PaulMohn,

                  Thank you for your vote.

                  I have added this to SFT-882.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  52 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  130 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  70 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  44 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  49 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X