EMA 2
Summary
Source Data and Length
src02 = close
len02 = input.int(21, minval=1, title='EMA 2')Calculating the Second EMA
ema02 = ta.ema(src02, len02)Determining Trend Direction for EMA 2
falling_2 = ta.falling(ema02, 2)
direction2 = ta.rising(ema02, 2)? +1 : falling_2? -1 : 0Setting Plot Color Based on Trend Direction for EMA 2
Plotting the Second EMA
Last updated