• 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

Indicator with large parameter sets being called from a strategy

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

    Indicator with large parameter sets being called from a strategy

    I have an indicator that has 15 parameters. When I try to use the indicator inside a strategy, I have to enter all the parameters. Is there a way to call the indicator from a strategy without entering all the parameters?

    #2
    Originally posted by afshinmoshrefi View Post
    I have an indicator that has 15 parameters. When I try to use the indicator inside a strategy, I have to enter all the parameters. Is there a way to call the indicator from a strategy without entering all the parameters?
    Not really, but you can always use a named instance of the indicator class, which means that you will have to write out the parameters only once, when you initialize the instance.

    Comment


      #3
      afshinmoshrefi,

      To call the intialization of the class -

      private SMA sma1;

      In the OnStartUp() -
      sma1 = SMA(14);
      Cal H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by xasser, Today, 02:17 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by ttodua, Today, 01:54 PM
      3 responses
      11 views
      0 likes
      Last Post ttodua
      by ttodua
       
      Started by horace chow, 05-27-2020, 04:00 PM
      8 responses
      31 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by dvcpro4, Today, 01:54 PM
      3 responses
      13 views
      0 likes
      Last Post dvcpro4
      by dvcpro4
       
      Started by iq200, Today, 01:33 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_PatrickG  
      Working...
      X