Professional Documents
Culture Documents
#2962FF #787B86 #787B86 #787B86
#2962FF #787B86 #787B86 #787B86
red
bullColor = color.green
hiddenBullColor = color.new(color.green, 80)
hiddenBearColor = color.new(color.red, 80)
textColor = color.white
noneColor = color.new(color.white, 100)
osc = mfi(src, len)
//------------------------------------------------------------------------------
// Regular Bullish
// Osc: Higher Low
plot(
plFound ? osc[lbR] : na,
offset=-lbR,
title="Regular Bullish",
linewidth=2,
color=(bullCond ? bullColor : noneColor)
)
plotshape(
bullCond ? osc[lbR] : na,
offset=-lbR,
title="Regular Bullish Label",
text=" Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Hidden Bullish
// Osc: Lower Low
plot(
plFound ? osc[lbR] : na,
offset=-lbR,
title="Hidden Bullish",
linewidth=2,
color=(hiddenBullCond ? hiddenBullColor : noneColor)
)
plotshape(
hiddenBullCond ? osc[lbR] : na,
offset=-lbR,
title="Hidden Bullish Label",
text=" H Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Regular Bearish
// Osc: Lower High
oscLH = osc[lbR] < valuewhen(phFound, osc[lbR], 1) and _inRange(phFound[1])
plot(
phFound ? osc[lbR] : na,
offset=-lbR,
title="Regular Bearish",
linewidth=2,
color=(bearCond ? bearColor : noneColor)
)
plotshape(
bearCond ? osc[lbR] : na,
offset=-lbR,
title="Regular Bearish Label",
text=" Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Hidden Bearish
// Osc: Higher High
.price, size=size.small) :
divbullRSI := true
divbullRSI := true
pivothRSI ?
pivotlRSI ?
if (minRSI[1] < minRSI[2]) and (rsiRSI[1] > min_rsiRSI) and (rsiRSI >= rsiRSI[1])
Percentrank Bug
https://www.tradingview.com/script/GibJ8AAn-RESEARCH-Percentrank-
Bug/
// Plotting, overlay=false
rsiRSI = RSI_VWAP
// DIVS code
hbRSI = abs(highestbars(rsiRSI, xbarsRSI)) // Finds bar with highest value in last X bars
lbRSI = abs(lowestbars(rsiRSI, xbarsRSI)) // Finds bar with lowest value in last X bars
maxRSI = float(na)
max_rsiRSI = float(na)
minRSI = float(na)
min_rsiRSI = float(na)
pivothRSI = bool(na)
pivotlRSI = bool(na)
divbearRSI = bool(na)
divbullRSI = bool(na)
// If bar with lowest / highest is current bar, use it's value
// Compare high of current bar being examined with previous bar's high
// If curr bar high is higher than the max bar high in the lookback window range
maxRSI := close // change variable "max" to use current bar's high value
max_rsiRSI := rsiRSI // change variable "max_rsi" to use current bar's RSI value
minRSI := close // change variable "min" to use current bar's low value
min_rsiRSI := rsiRSI // change variable "min_rsi" to use current bar's RSI value
// Finds pivot point with at least 2 right candles with lower value
>= rsiRSI[1])
divbullRSI := true
// Alerts