//@version=5 //Created By Profit Myntra //All rights reserved by Profit Myntra //XXXX-XXXX-XXXX indicator(title=" 3 Moving Average Exponential By PM", shorttitle="EMA", overlay=true, timeframe="", timeframe_gaps=true) len = input.int(20, minval=1, title="Length") len1 = input.int(50, minval=1, title="Length1") len2 = input.int(200, minval=1, title="Length2") src = input(close, title="Source") src1 = input(close, title="Source1") src2 = input(close, title="Source2") offset = input.int(title="Offset", defval=0, minval=-500, maxval=500) out = ta.ema(src, len) out1 = ta.ema(src1, len1) out2 = ta.ema(src2, len2) plot(out, title="EMA", color=color.green, offset=offset) plot(out1, title="EMA", color=color.red, offset=offset) plot(out2, title="EMA", color=color.black, offset=offset) ma(source, length, type) => switch type "SMA" => ta.sma(source, length) "EMA" => ta.ema(source, length) "SMMA (RMA)" => ta.rma(source, length) "WMA" => ta.wma(source, length) "VWMA" => ta.vwma(source, length) typeMA = input.string(title = "Method", defval = "SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Smoothing") smoothingLength = input.int(title = "Length", defval = 5, minval = 1, maxval = 100, group="Smoothing") smoothingLine = ma(out, smoothingLength, typeMA) plot(smoothingLine, title="Smoothing Line", color=#f37f20, offset=offset, display=display.none)