OPEN-SOURCE SCRIPT

MA with options

Updated
5 Types of Moving Averages have been combined into the script. The user has the liberty to select the length of the MA and the MA type (SMA, EMA, WMA, VWMA, RMA) of his/her choice.
Release Notes
I have just updated my first practice code by adding MA crossover for MA2 and MA3 with buy and sell signals.
Release Notes
The Default value for the first three moving averages have been modified into EMA. Since EMA provides the recent data and updates faster as compared to the SMA it can be used to identify trends better.
The EMA crossover is between EMA 21 (MA2_type) and EMA 34 (MA3_type). The values can be modified and backtested according to the users wish.
The Sell Signal triangle down arrow was green in color and it has been modified to red by default.
emacrossoverMoving Averagesmovingaveragetype

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer