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 tkaboris, Today, 08:01 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Lumbeezl, 01-11-2022, 06:50 PM
            31 responses
            817 views
            1 like
            Last Post NinjaTrader_Adrian  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            5 responses
            15 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by swestendorf, Today, 11:14 AM
            2 responses
            6 views
            0 likes
            Last Post NinjaTrader_Kimberly  
            Started by Mupulen, Today, 11:26 AM
            0 responses
            7 views
            0 likes
            Last Post Mupulen
            by Mupulen
             
            Working...
            X