Copy+Pasted/edited the code from : Moku www.tradingview.com EMA www.tradingview.com Fractal www.tradingview.com