could not find method for method reference 'is bullishEC' for zen (I'm struggling on the first mastery video) thanks
Posted: Thu Nov 09, 2023 8:34 pm
//@version=5
indicator("rsi oscillator")
//import zen library
import ZenAndTheArtOfTrading/ZenLibrary/2 as zen
//get user input
lookback = input.int(title="lookback", defval=7)
rsilen = input.int(title="rsi leght", defval=7)
rsiob = input.float(title= "RSI overbought", defval=80.0)
rsios = input.float(title="rsi oversold", defval=20.0)
// get RSI value
rsi = ta.rsi(close,rsilen)
rsisell = rsi >rsiob
rsibuy = rsi <rsios
//detect candle patterns
bullEC = zen.isbullishEC()
bearEC = zen.isbearishEC()
// decect buy and sell signals
buysignal = bullEC and (rsibuy or rsibuy[1])
sellsignal = bearEC and (rsisell or rsisell[1])
// draw the data to the chart
plot(rsi, title = "rsi", color=rsibuy ? color.lime : rsisell ? color.red : color.black, linewidth=2)
plot(rsiob, title="rsi overbought", color=color.lime)
plot(rsios, title= "rsi oversold", color=color.lime)
bgcolor(buysignal ? color.lime : sellsignal ? color.red : na, title= "trade signal")
//trigger alerts
alertcondition(buysignal or sellsignal, title = "rsi signal", message= "rsi exhaustion setup for {{ticker}} rsi value = {{plot_0}}")
plot(na)
indicator("rsi oscillator")
//import zen library
import ZenAndTheArtOfTrading/ZenLibrary/2 as zen
//get user input
lookback = input.int(title="lookback", defval=7)
rsilen = input.int(title="rsi leght", defval=7)
rsiob = input.float(title= "RSI overbought", defval=80.0)
rsios = input.float(title="rsi oversold", defval=20.0)
// get RSI value
rsi = ta.rsi(close,rsilen)
rsisell = rsi >rsiob
rsibuy = rsi <rsios
//detect candle patterns
bullEC = zen.isbullishEC()
bearEC = zen.isbearishEC()
// decect buy and sell signals
buysignal = bullEC and (rsibuy or rsibuy[1])
sellsignal = bearEC and (rsisell or rsisell[1])
// draw the data to the chart
plot(rsi, title = "rsi", color=rsibuy ? color.lime : rsisell ? color.red : color.black, linewidth=2)
plot(rsiob, title="rsi overbought", color=color.lime)
plot(rsios, title= "rsi oversold", color=color.lime)
bgcolor(buysignal ? color.lime : sellsignal ? color.red : na, title= "trade signal")
//trigger alerts
alertcondition(buysignal or sellsignal, title = "rsi signal", message= "rsi exhaustion setup for {{ticker}} rsi value = {{plot_0}}")
plot(na)