# Return Formula R(n) = (CP(n) - OP(n)) / OP(n) Where: - R(n) = Return in period n - CP(n) = Close price - OP(n) = Open price # Rainbow logic uptrend = 8 EMA(exponential ma) > 21 EMA > 34 EMA > 50 SMA(simple ma) > 100 SMA > 200 SMA downtrend = 8 EMA < 21 EMA < 34 EMA < 50 SMA < 100 SMA < 200 SMA red, orange ,yellow, green, blue, mauve Sahm Rule = looking at the slope of an average