Trend BUY Signal for stocks based on 10 / 30 EMA Crossover, Close above 200 EMA and Close above 3.5 percent of last 100 days' low
study("Trend BUY Signal") ma1 = 10, ma2 = 30, ma3 = 200, lval = 100, pc = 3.5 MvgAvg1 = ema(close, ma1) MvgAvg2 = ema(close, ma2) MvgAvg3 = ema(close, ma3) LowVal = lowest(lval) pcChange = (1+(pc/100))*LowVal signal = iff(((MvgAvg1 > MvgAvg2) and (close > MvgAvg3) and (close > pcChange)),1,0) plot(signal)