MovAvgTwoLines

Description

The Moving Average Two Lines study plots two moving averages of the same type but with different lengths. Any of the following types can be used: simple, exponential, weighted, Wilder's, or Hull.

The short-term average going above the long-term average is a signal to buy, while the opposite situation is a signal to sell.

Input Parameters

Parameter Description
price The price used to calculate the moving averages.
fast length The number of bars used to calculate the fast moving average.
slow length The number of bars used to calculate the slow moving average.
displace The displacement of the moving averages, in bars. Positive values signify displacement to the past.
average type

The type of moving average to be used in calculations: simple, exponential, weighted, Wilder's, or Hull.

Plots

Plot Description
fastAvg The fast moving average.
slowAvg The slow moving average.

Example*

*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.