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 algospoke, Yesterday, 06:40 PM
            2 responses
            23 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            45 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            22 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            181 views
            0 likes
            Last Post jeronymite  
            Working...
            X