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, 02: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, 10: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, 05: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:
                     [COLOR=#0000ff]namespace[/COLOR][COLOR=#080808]NinjaTrader[/COLOR][COLOR=#000000].[/COLOR][COLOR=#080808]NinjaScript[/COLOR][COLOR=#000000].[/COLOR][COLOR=#080808]Indicators
                    [/COLOR]{
                          [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Parameters"[/COLOR], [COLOR=#ff8c00]0[/COLOR])]
                          [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Data Series"[/COLOR], [COLOR=#ff8c00]10[/COLOR])]
                          [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Set up"[/COLOR], [COLOR=#ff8c00]20[/COLOR])]
                          [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Visual"[/COLOR], [COLOR=#ff8c00]30[/COLOR])]
                          [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Plots"[/COLOR], [COLOR=#ff8c00]40[/COLOR])]
                          [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Whatever Settings"[/COLOR], [COLOR=#ff8c00]100[/COLOR])]
                     [COLOR=#0000ff]     public[/COLOR] [COLOR=#0000ff]class[/COLOR] YourIndyName : [COLOR=#080808]Indicator
                    [/COLOR]    {
                    -=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:
                       [COLOR=#0000ff]namespace[/COLOR][COLOR=#080808]NinjaTrader[/COLOR][COLOR=#000000].[/COLOR][COLOR=#080808]NinjaScript[/COLOR][COLOR=#000000].[/COLOR][COLOR=#080808]Indicators
                      [/COLOR]{
                            [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Parameters"[/COLOR], [COLOR=#ff8c00]0[/COLOR])]
                            [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Data Series"[/COLOR], [COLOR=#ff8c00]10[/COLOR])]
                            [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Set up"[/COLOR], [COLOR=#ff8c00]20[/COLOR])]
                            [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Visual"[/COLOR], [COLOR=#ff8c00]30[/COLOR])]
                            [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Plots"[/COLOR], [COLOR=#ff8c00]40[/COLOR])]
                            [[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]CategoryOrder[/COLOR]([COLOR=#b22222]"Whatever Settings"[/COLOR], [COLOR=#ff8c00]100[/COLOR])]
                       [COLOR=#0000ff]     public[/COLOR] [COLOR=#0000ff]class[/COLOR] YourIndyName : [COLOR=#080808]Indicator
                      [/COLOR]    {
                      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 WeyldFalcon, 08-07-2020, 06:13 AM
                              11 responses
                              1,422 views
                              0 likes
                              Last Post jculp
                              by jculp
                               
                              Started by RubenCazorla, Today, 09:07 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post RubenCazorla  
                              Started by BarzTrading, Today, 07:25 AM
                              2 responses
                              29 views
                              1 like
                              Last Post BarzTrading  
                              Started by devatechnologies, 04-14-2024, 02:58 PM
                              3 responses
                              21 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by tkaboris, Today, 08:01 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post tkaboris  
                              Working...
                              X