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 samish18, 04-17-2024, 08:57 AM
            16 responses
            55 views
            0 likes
            Last Post samish18  
            Started by arvidvanstaey, Today, 02:19 PM
            3 responses
            9 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by jordanq2, Today, 03:10 PM
            2 responses
            8 views
            0 likes
            Last Post jordanq2  
            Started by traderqz, Today, 12:06 AM
            10 responses
            18 views
            0 likes
            Last Post traderqz  
            Started by algospoke, 04-17-2024, 06:40 PM
            5 responses
            47 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X