Optimization, Trading Strategy, Fmz Quant, Cryptocurrency, Trends.
Tsf_Func2(src2, length2) getMA2(src2, length2) => ma = 0.0 if mav2 == 'SMA' ma := ta.sma(src2, length2) ma if mav2 == 'EMA' ma := ta.ema(src2, length2) ma if mav2 == 'WMA' ma := ta.wma(src2, length2) ma if mav2 == 'TMA' ma := ta.sma(ta.sma(src2, math.ceil(length2 / 2)), math.floor(length2 / 2) + 1)