OPEN-SOURCE SCRIPT

5 Moving Average (Simple / Exponential)

Updated
Defaults to 1 SMA with 4 EMA bands. 200 SMA is intended to show the trend; 20,40 and 55 EMA show entries; 81 EMA is used as stop/take profit. Defaults are inspired by 'Eric Choe' but you can switch between EMA and SMA as per your own preference. Philakone uses all 5 as EMA 8, 13, 21, 55, 200
Release Notes
Updated Inputs to allow more customization but still trying to keep it simple.

Moving Average Types
Before: MA 1-4 were tied to each other with a single checkbox to select EMA/SMA (MA5 had a separate checkbox)
Now: There is one drop down to select how many MAs are EMA vs SMA

Moving Average Source
Before: Moving averages were fixed with close as the source
Now: Moving averages default to use close as the source but there is a checkbox to enable custom options and a drop down selector for each Moving average.

The example is following a basic MA strategy suggested by Eric Choe. It can produce decent results but should really be paired with oscillators to anticipate some of these moves. Check out my Multiple Oscillator script
3 Oscillator (RSI + Stochastics + MFI) with over bought/sold


Feel free to comment with any suggestions or requests.
Exponential Moving Average (EMA)exponentialMoving AveragessimpleSimple Moving Average (SMA)sma

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?

Disclaimer