• 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

Templates for Indicators

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

    Templates for Indicators

    I'm very happy for xml templates for Strategies.
    Unfortunately for Indicators only Preset (ie: changing Defaults) is available which is surprising considering there is an Indicators folder in the templates folder.
    I understand the top priority is to release the NT8 but you should reconsider implementing templating interface for Indicators as well.

    This will greatly improve NinjaTrader.Custom project hygiene - at the moment users create multiple copies of indicators with different presets.

    I have personally created my custom SaveToXML solution for NT7 but would really love to abandon it - especially considering the fact you did a great job with Strategy templates!

    #2
    Hello,

    Thank you for your feedback. I have forwarded this request to our development team and this can be tracked using ID SFT-311.
    Last edited by NinjaTrader_ChristopherJ; 05-06-2015, 01:16 PM.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      If you hopefully decide on implementing templates for indicators as well, a new overloads would be neat:
      Code:
      Indicator(Template template);
      Indicator(ISeries<T> series, Template template);
      If it is possible to dynamically start strategy as well (on my list to test) then the equivalent overloads would be great:
      Code:
      Strategy(Template template);
      Strategy(ISeries<T> series, Template template);
      This would simplify changing parameters not in GridCategory (NT7) ie: not in the constructor.

      Most of all it would allow for easy parameters adjustment (eg. different template used depending on instrument, bar type, etc.).

      BTW, don't get discouraged by the number of suggestions me and other folks are throwing - it stems from noticing vastly greater capabilities of NT8!
      Last edited by gregid; 05-09-2015, 09:33 AM.

      Comment


        #4
        Gregid,

        Did you find a way to "hide" input parameters from needing to be pass via a Strategy for indicators?

        We could mess with the Properties in NT7 to hide some from being part of the initiation of the class.

        Comment


          #5
          Originally posted by NJA_MC View Post
          Gregid,

          Did you find a way to "hide" input parameters from needing to be pass via a Strategy for indicators?

          We could mess with the Properties in NT7 to hide some from being part of the initiation of the class.
          Haven't checked thorougly (converting first my utilities classes) but if you look at "Sample Custom Plot" indicator - it uses Category General that are not included in the constructor:
          Code:
          		[Range(0, 100)]
          		[Display(ResourceType = typeof(Custom.Resource), Name = "NinjaScriptDrawingToolAreaOpacity", GroupName = "NinjaScriptGeneral")]
          		public int AreaOpacity
          		{
          			get { return areaOpacity; }
          			set
          			{
          				areaOpacity = Math.Max(0, Math.Min(100, value));
          				if (areaBrush != null)
          				{
          					Brush newBrush		= areaBrush.Clone();
          					newBrush.Opacity	= areaOpacity / 100d;
          					newBrush.Freeze();
          					areaBrush			= newBrush;
          				}
          			}
          		}

          Comment


            #6
            Originally posted by NJA_MC View Post
            Gregid,

            Did you find a way to "hide" input parameters from needing to be pass via a Strategy for indicators?

            We could mess with the Properties in NT7 to hide some from being part of the initiation of the class.
            I'm only guessing here, but using and not using the [NinjaScriptProperty] seems to be the trick..

            Anyway of getting those that don't use the NSP to show up on the bottom or below all the rest of the properties?




            -=Edge=-
            NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

            Comment


              #7
              Yes, you are right [NinjaScriptProperty] does the trick. As to the order of groups - In my case it doesn't seem to follow any logic - In one of indicators I have groups in following order: N..., O..., Z..., P..., D..., S..., V...

              Comment


                #8
                Originally posted by gregid View Post
                Yes, you are right [NinjaScriptProperty] does the trick. As to the order of groups - In my case it doesn't seem to follow any logic - In one of indicators I have groups in following order: N..., O..., Z..., P..., D..., S..., V...
                Yep.. I end up with a V before the P (Properties).. would like that V group at the very bottom.. Still experimenting..

                -=Edge=-
                NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

                Comment


                  #9
                  Organizing parameter groups within the indicator dialogue box

                  I have a few NT7 indicators that have holiday schedules or sound files sitting at the bottom of the indicator dialogue box, below the other groups.

                  With NinjaTrader 7 I had used "GridCategory" to select the parameters that would go above the groups "Data" and "Visual". Then everything that was labeled "Category" would appear below the groups "Data and Visual".

                  As the "GridCategory" parameters were also those that were passed on to other indicators and strategies, this solution was acceptable.

                  I do understand that with NinjaTrader 8 it is possible to use "order" to organize parameters within the same group and that "NinjaScriptProperty" allows for selecting a parameter to be included with the parameter list, when the indicator is called.

                  However, what I am missing is the option to place an entire group (visuals, sound alerts, specific settings for instruments, holiday calendar) at the lower section of the indicator dialogue box. After all nobody likes to see secondary information which is rarely modified above the three set groups "DataSeries", "Setup" and "Visual".

                  How can I place a new group below those set groups?

                  Is there any way to decide in which order the groups are displayed?

                  Below is an example of the desired outcome.
                  Attached Files
                  Last edited by Harry; 12-06-2015, 04:51 PM.

                  Comment


                    #10
                    Originally posted by Harry View Post
                    Is there any way to decide in which order the groups are displayed?
                    I can't remember which thread this was talked about some time ago now.. but you can do it like this.. Insert just above your Indy's class..

                    Code:
                     namespaceNinjaTrader.NinjaScript.Indicators
                    {
                          [Gui.CategoryOrder("Parameters", 0)]
                          [Gui.CategoryOrder("Data Series", 10)]
                          [Gui.CategoryOrder("Set up", 20)]
                          [Gui.CategoryOrder("Visual", 30)]
                          [Gui.CategoryOrder("Plots", 40)]
                          [Gui.CategoryOrder("Whatever Settings", 100)]
                          public class YourIndyName : Indicator
                        {
                    -=Edge=-
                    NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

                    Comment


                      #11
                      Originally posted by -=Edge=- View Post
                      I can't remember which thread this was talked about some time ago now.. but you can do it like this.. Insert just above your Indy's class..

                      Code:
                       namespaceNinjaTrader.NinjaScript.Indicators
                      {
                            [Gui.CategoryOrder("Parameters", 0)]
                            [Gui.CategoryOrder("Data Series", 10)]
                            [Gui.CategoryOrder("Set up", 20)]
                            [Gui.CategoryOrder("Visual", 30)]
                            [Gui.CategoryOrder("Plots", 40)]
                            [Gui.CategoryOrder("Whatever Settings", 100)]
                            public class YourIndyName : Indicator
                          {
                      But that would affect all indicators at the same time? It might be better only to use high order numbers for specific categories. Otherwise different indicators might compete for the ideal order?

                      Comment


                        #12
                        Originally posted by Harry View Post
                        But that would affect all indicators at the same time? It might be better only to use high order numbers for specific categories. Otherwise different indicators might compete for the ideal order?
                        You would think so being outside the class yet inside the namespace.. But it doesn't seem too, or at least I don't see that happening globally, as I have to add that to every indy if I want it's GroupName's to be sorted a specific way.. But I've pretty much standardized on my sorting, and someone from NT might want to clarify..



                        -=Edge=-
                        NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

                        Comment


                          #13
                          Originally posted by -=Edge=- View Post
                          You would think so being outside the class yet inside the namespace.. But it doesn't seem too, or at least I don't see that happening globally, as I have to add that to every indy if I want it's GroupName's to be sorted a specific way.. But I've pretty much standardized on my sorting, and someone from NT might want to clarify..




                          I will test on my side.

                          At the same time I would appreciate, if NinjaTrader support would comment on the solution suggested.

                          Comment


                            #14
                            I can confirm on my end that this solution works as intended -- that was a good find. The single-instance behavior you are seeing would be expected, as we internally restrict these attributes to only apply to a single class, rather than an entire namespace.
                            Dave I.NinjaTrader Product Management

                            Comment


                              #15
                              Originally posted by Harry View Post
                              I will test on my side.

                              At the same time I would appreciate, if NinjaTrader support would comment on the solution suggested.
                              They are attributes applied to a class, so they apply only to the class. Attributes cannot stand alone in a namespace.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by sledge, Today, 06:11 PM
                              1 response
                              8 views
                              0 likes
                              Last Post sledge
                              by sledge
                               
                              Started by Bionian, Today, 02:46 PM
                              2 responses
                              9 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by rwilliam, Today, 01:54 PM
                              1 response
                              19 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by franco12364, Today, 11:27 AM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by YevhenShynkarenko, Today, 11:48 AM
                              4 responses
                              27 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Working...
                              X