//@version=4 study("Condições Múltiplas") i_period = input(20) i_bullLevel = input(55) r = rsi(close, i_period) // Condição #1. rsiBull = r > i_bullLevel // Condição #2. hiChannel = highest(r, i_period * 2)[1] aboveHiChannel = r > hiChannel // Condição #3. channelIsOld = hiChannel >= hiChannel[i_period] // Condição #4. historyIsBull = sum(rsiBull ? 1 : -1, i_period * 3) > 0 // Condições Múltiplas. bull = rsiBull and aboveHiChannel and channelIsOld and historyIsBull hline(i_bullLevel) plot(r, "RSI", color.black) plot(hiChannel, "High Channel") plotchar(rsiBull ? i_bullLevel : na, "rIsBull", "1", location.absolute, color.green, size = size.tiny) plotchar(aboveHiChannel ? r : na, "aboveHiChannel", "2", location.absolute, size = size.tiny) plotchar(channelIsOld, "channelIsOld", "3", location.bottom, size = size.tiny) plotchar(historyIsBull, "historyIsBull", "4", location.top, size = size.tiny) bgcolor(bull ? not bull[1] ? color.new(color.green, 50) : color.green : na)