study("Weekly & Daily RTM", overlay=true)
shortemadaily = ema(close,5)
longemadaily = ema(close,21)
RTMDaily = shortemadaily/longemadaily
shortemaw = ema(close,4)
longemaw = ema(close,12) 2/n
longemaweekly = security(syminfo.tickerid,"W",longemaw)
RTMweekly = shortemaweekly/longemaweekly
plot(RTMDaily,color=color.black)
plot(RTMweekly,color=color.red) 3/n