Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wizard vs Code for indicator on indicator

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

    Wizard vs Code for indicator on indicator

    Can the Indicator wizard be used to do basic indicator on indicator set ups, such as a SMA of a WMA or similar without having to edit the code?
    ...for example is there a way to just identify the standard WMA (or a custom name) indicator with a click from the drop down list as the "input" to a new custom indicator?

    Since I can't find an example that does this, I suspect the answer is no.

    Thanks for your help.

    #2
    Unfortunately not. You would have to custom code any indicator logic.
    RayNinjaTrader Customer Service

    Comment


      #3
      Related question on code sysntax

      Thanks, Ray,

      On a related syntax/structure note, I created a custom indicator (Myindicator1) in which I create a custom DataSeries1 and plot the result ...it works great.

      Now I want to create a Myindicator2 (and Dataseries2) that operates on Myidicator1.
      What is the basic rule(s) for referring to Myindicator1 from within Myindicator2, as I keep getting various compiler errors.
      My brute force solution was to copy all the custom code from Myidicator1 into Myindicator2, and then append the Myindicator2 code. This works fine but seems to fly in the face of reusable objects. All of the documentation examples use a standard NT indicator(eg SMA) from within a new custom indicator. I'm hoping there are a few simple C# rules that apply to accomplish this, as I expect to do a lot of it.

      Thanks again.

      Comment


        #4
        As you create and compile MyIndicator2, NinjaTrader creates hidden wrapper methods for this indicator that makes it accesisible from any other NinjaScript object.

        Withing MyIndicator1, you can then reference:

        double myValue = MyIndicator2(your parameters)[0];
        RayNinjaTrader Customer Service

        Comment


          #5
          Ray,
          A clarification question:
          Do I need to change the original Indicator1 class to "public" from private for this to work? Are there any other changes I need to do to it so that future indicators can refer to it?

          Thanks so much for your help

          Comment


            #6
            Yes, it should be a public class. This is what is generated by default by the Indicator Wizard set up process.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X