close_ = close //security(ticker, period, close, barmerge.gaps_off, barmerge.lookahead_on) open_ = open //security(ticker, period, open, barmerge.gaps_off, barmerge.lookahead_on) high_ = high //security(ticker, period, high, barmerge.gaps_off, barmerge.lookahead_on) low_ = low //security(ticker, period, low, barmerge.gaps_off, barmerge.lookahead_on) exitClose = close_ //UseHAexit ? security(heikinashi(tickerid), period, close) : close_ exitOpen = open_ //UseHAexit ? security(heikinashi(tickerid), period, open) : open_ isRegularFractal(mode) => ret = mode == 1 ? high_[5] < high_[4] and high_[4] < high_[3] and high_[3] > high_[2] and high_[2] > high_[1] : mode == -1 ? low_[5] > low_[4] and low_[4] > low_[3] and low_[3] < low_[2] and low_[2] < low_[1] : false
isBWFractal(mode) => ret = mode == 1 ? high_[5] < high_[3] and high_[4] < high_[3] and high_[3] > high_[2] and high_[3] > high_[1] : mode == -1 ? low_[5] > low_[3] and low_[4] > low_[3] and low_[3] < low_[2] and low_[3] < low_[1] : false // ||-----------------------------------------------------------------------------------------------------||
// MA Colour finder for EMA Ribbon plot. maColor(maBase, ma, maRef) => change(ma)>=0 and maBase>maRef ? teal :change(ma)<0 and maBase>maRef ? maroon :change(ma)<=0 and maBase<maRef ? red :change(ma)>=0 and maBase<maRef ? green :gray
// If selected show HH/LL on top/below candles. isup = exitClose>exitOpen and exitClose>pacU and exitClose[1]<pacU[1] and (not filterEMA200 or pacC>emaMedium) isdown = exitClose<exitOpen and exitClose<pacL and exitClose[1]>pacL[1] and (not filterEMA200 or pacC<emaMedium)
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.