PDA

View Full Version : Setting up a new indicator


maggiej12
02-22-2011, 08:09 PM
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!

koganam
02-22-2011, 08:40 PM
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!

Value.Set(SMA(ADL(), 3)[0]);

maggiej12
02-22-2011, 09:10 PM
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....

koganam
02-22-2011, 10:23 PM
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.

maggiej12
02-22-2011, 10:39 PM
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

koganam
02-22-2011, 10:54 PM
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:

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

Value.Set is a method. You want the DataSeries, as an input to the SMA indicator.