In the indicator builder, use the indicator button and insert an ma then (-) then the second ma. When inserting the indicators use shift = 1 to get the amounts for the previous bar. For the rest of the formula use MathSqrt and MathPow double MathSqrt( double x) The MathSqrt function returns the square root of x. If x is negative, MathSqrt returns an indefinite (same as a quiet NaN). double MathPow( double base, double exponent) Returns the value of the base expression raised to the specified power (exponent value).
|