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.


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


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

  Past performance is no guarantee of future performance.

You may also like
The Momentum Percent Diff is a momentum-based technical indicator. Unlike the regular Momentum ...
thinkScript®: Q&A
What is thinkScript®? thinkScript® is a built-in programming language that gives you the ...
The Slow Relative Strength Index is a version of the classic Relative Strength Index (RSI), ...