Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting up a new indicator

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

    Setting up a new indicator

    Hi -
    I am trying to construct a new indicator in Ninja. Below is the formula i want to do:

    SMA (ADL, 3)


    I am able to construct a moving average formula using the example in the Help Guide (without the Accumulation/Distribution (ADL) added into the equation). Can you tell me how i would add in ADL to the formula?

    Basically i want to construct a line that is the MovingAverage of the last 3 days of AccumulationDistribution (SMA (ADL, 3))

    Thanks! Any feedback will help!

    #2
    Originally posted by maggiej12 View Post
    Hi -
    I am trying to construct a new indicator in Ninja. Below is the formula i want to do:

    SMA (ADL, 3)


    I am able to construct a moving average formula using the example in the Help Guide (without the Accumulation/Distribution (ADL) added into the equation). Can you tell me how i would add in ADL to the formula?

    Basically i want to construct a line that is the MovingAverage of the last 3 days of AccumulationDistribution (SMA (ADL, 3))

    Thanks! Any feedback will help!
    Code:
    Value.Set(SMA(ADL(), 3)[0]);

    Comment


      #3
      Thank you so much!
      Is there a value that needs to go in the parentheses after ADL or should it be left blank?
      I dont think there are any input values needed for the ADL indicator....

      Comment


        #4
        Originally posted by maggiej12 View Post
        Thank you so much!
        Is there a value that needs to go in the parentheses after ADL or should it be left blank?
        I dont think there are any input values needed for the ADL indicator....
        ADL has no input parameters, so you would leave that blank, just as I wrote it.

        Comment


          #5
          Great thanks,

          Finally i just want to make another plot to take the Moving Average of 15 days of this output.

          Here is what i came up with but it isn't accepting it...

          MovAvg.Set(SMA(Value.Set, 15) [0]) ;

          Thanks

          Comment


            #6
            Originally posted by maggiej12 View Post
            Great thanks,

            Finally i just want to make another plot to take the Moving Average of 15 days of this output.

            Here is what i came up with but it isn't accepting it...

            MovAvg.Set(SMA(Value.Set, 15) [0]) ;

            Thanks
            Should be:

            Code:
            MovAvg.Set(SMA(Value, 15) [0]) ;
            Value.Set is a method. You want the DataSeries, as an input to the SMA indicator.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by benmarkal, Yesterday, 12:52 PM
            3 responses
            22 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by helpwanted, Today, 03:06 AM
            1 response
            18 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            11 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            6 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            244 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Working...
            X