// Conditions for Buy and Sell buyCondition = ta.crossover(shortEMA, mediumEMA) and close > longEMA and rsi > 50 and macdLine > signalLine sellCondition = ta.crossunder(shortEMA, mediumEMA) and close < longEMA and rsi < 50 and macdLine < signalLine
// Plotting EMAs plot(shortEMA, color=color.new(color.blue, 0), title="Short EMA (9)") plot(mediumEMA, color=color.new(color.orange, 0), title="Medium EMA (21)") plot(longEMA, color=color.new(color.red, 0), title="Long EMA (50)")