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 Rogers101, 05-05-2024, 11:30 AM
            3 responses
            21 views
            0 likes
            Last Post Rogers101  
            Started by nightstalker, 05-04-2024, 02:05 PM
            5 responses
            53 views
            1 like
            Last Post nightstalker  
            Started by MSerag, Yesterday, 11:52 PM
            0 responses
            11 views
            0 likes
            Last Post MSerag
            by MSerag
             
            Started by DynamicTest, Yesterday, 11:18 PM
            0 responses
            3 views
            0 likes
            Last Post DynamicTest  
            Started by dcriador, Yesterday, 01:43 AM
            3 responses
            22 views
            0 likes
            Last Post dcriador  
            Working...
            X