0% found this document useful (0 votes)
411 views

Oscillator Matrix With Alerts

oscillator matrix

Uploaded by

zwartissima
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
411 views

Oscillator Matrix With Alerts

oscillator matrix

Uploaded by

zwartissima
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 14

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.

0
at https://mozilla.org/MPL/2.0/

//@version=5
indicator("[StratifyTrade] Oscillator Matrix (TNR and Punkchainer Adjusted) ",
shorttitle = "Oscillator Matrix", max_lines_count = 500)

var maxval = 0.
var minval = 1000.
dwTL = "Length of the hyper wave"
smTL = "[SMA] Smooth signal with a simple moving average\n[EMA] Smooth signal with
an exponential moving average\n[Input] Length of the smooth"
dvTL = "Sensibility of the real time divergence : less sensibility = more short
term divs; more sensibility = more long term divs"

cmTL = "Show confluence meter at the side of the oscillator"


caTL = "Show confluence area at the bottom/top of the oscillator"

rfTL = "More factor will return in less signals but in a stronger way, less factor
will return more signal with less strength"

simple bool dW = input.bool (true , "Main Length


", inline = "1 ", group = "HYPER WAVE" , tooltip =
dwTL)
simple int mL = input.int (7 , "
", inline = "1 ", group = "HYPER WAVE", minval = 5, maxval = 21)
simple string sT = input.string("SMA" , "Signal
", inline = "s ", group = "HYPER WAVE", options = ["SMA", "EMA"], tooltip =
smTL)
simple int sL = input.int (3 , "
", inline = "s ", group = "HYPER WAVE", minval = 2, maxval = 10)
simple color fCSS = input.color (#51B155 , "Colors
", inline = "css ", group = "HYPER WAVE")
simple color sCSS = input.color (#80828D , "
", inline = "css ", group = "HYPER WAVE")
simple int tCSS = input.int (80 , "
", inline = "css ", group = "HYPER WAVE", minval = 0, maxval = 100)
simple int dvT = input.int (20 , "Divergence
Sensibility ", inline = "x ", group = "HYPER WAVE", minval = 20, maxval = 40 ,
tooltip = dvTL)
simple bool sDiv = input.bool (true , "Show Divergences
", inline = "div ", group = "HYPER WAVE")
simple color blDv = input.color (color.new(#2962ff, 20), "
", inline = "div ", group = "HYPER WAVE")
simple color brDv = input.color (color.new(#f23645, 20), "
", inline = "div ", group = "HYPER WAVE")

simple bool Smf = input.bool (true , "Money Flow Length


", inline = "mfi ", group = "SMART MONEY FLOW")
simple int mfL = input.int (35 , "
", inline = "mfi ", group = "SMART MONEY FLOW", minval = 10, maxval = 55)
simple int mfS = input.int (6 , "Smooth
", inline = "mfx ", group = "SMART MONEY FLOW", minval = 2 , maxval = 10)
simple color mfBL = input.color (#089981 , "Money Flow
Colors ", inline = "mfiC", group = "SMART MONEY FLOW")
simple color mfBR = input.color (#e93543 , "
", inline = "mfiC", group = "SMART MONEY FLOW")
simple color cnBL = input.color (#089981 , "Confluence
Colors ", inline = "cf ", group = "CONFLUENCE")
simple color cnBR = input.color (#e93543 , "
", inline = "cf ", group = "CONFLUENCE")
simple bool sCNF = input.bool (true , "Show Confluence
Meter ", inline = "zf ", group = "CONFLUENCE", tooltip = cmTL)
simple bool sCNB = input.bool (true , "Show Confluence
Areas ", inline = "zx ", group = "CONFLUENCE", tooltip = caTL)

simple bool rsS = input.bool (true , "Reversal Factor


", inline = "rv ", group = "REVERSAL")
simple int rsF = input.int (4 , "
", inline = "rv ", group = "REVERSAL", options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
tooltip = rfTL)
simple color rsBL = input.color (#089981 , "Reversal
Colors ", inline = "rc ", group = "REVERSAL")
simple color rsBR = input.color (#e93543 , "
", inline = "rc ", group = "REVERSAL")

type oL
float sig
float sgD
color cO

type dP
int n
float src
float p

type smf
float mfi
color mfc
float blMFI
float brMFI

type cnf
color up
color dn
float[] blT
float[] brT

var oL osc = oL.new (na, na, na )


var dP div = dP.new (na, na, na )
var smf mf = smf.new(na, na, na, na)

var cnf cf = cnf.new(


color.rgb(54, 58, 69, 60)
, color.rgb(54, 58, 69, 60)
, array.new<float>(1, na)
, array.new<float>(1, na)
)

//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
type = "TEMA"
len = rsF*10
count = 20
colUp = #2962ff
colDn = #f23645
colMa = #787b86

//-----------------------------------------------------------------------------}
//Method MA
//-----------------------------------------------------------------------------{
method ma(string type, int length) =>
//
ema1 = ta.ema(close, length)
ema2 = ta.ema(ema1 , length)
ema3 = ta.ema(ema2 , length)
//
switch type
"SMA" => ta.sma (close, length)
"EMA" => ema1
"SMMA (RMA)" => ta.rma (close, length)
"HullMA" => ta.hma (close, length)
"WMA" => ta.wma (close, length)
"VWMA" => ta.vwma(close, length)
"DEMA" => 2 * ema1 - ema2
"TEMA" => (3 * ema1) - (3 * ema2) + ema3
=> na

//-----------------------------------------------------------------------------}
//Calculations
//-----------------------------------------------------------------------------{
ma = type.ma(len)
fl = ta.falling(ma , count)
rs = ta.rising (ma , count)
up = fl[1] and ma > ma[1]
dn = rs[1] and ma < ma[1]
atr = ta.atr(14)
n = bar_index

//-----------------------------------------------------------------------------}
//Execution
//----------------

//-----------------------------------------------------------------------------}
//Plots
//-----------------------------------------------------------------------------{

bigRev = 0
if (up)
bigRev := 1
if (dn)
bigRev := -1

//-----------------------------------------------------------------------------}
length = 2+rsF

mult = rsF < 3 ? 0. : rsF < 6 ? 1. : 2.

src = close

//Style
bull_css_0 = color.black

bull_css_1 = color.black
bear_css_0 = color.black
bear_css_1 = color.black

//-----------------------------------------------------------------------------}
//Normalization variables
//-----------------------------------------------------------------------------{
var short_len = int(length / 2)
var hull_len = int(math.sqrt(length))

var den1 = short_len * (short_len + 1) / 2


var den2 = length * (length + 1) / 2
var den3 = hull_len * (hull_len + 1) / 2

//-----------------------------------------------------------------------------}
//Hull coefficients
//-----------------------------------------------------------------------------{
var lcwa_coeffs = array.new_float(hull_len, 0)
var hull_coeffs = array.new_float(0)

if barstate.isfirst
//Linearly combined WMA coeffs
for i = 0 to length-1
sum1 = math.max(short_len - i, 0)
sum2 = length - i

array.unshift(lcwa_coeffs, 2 * (sum1 / den1) - (sum2 / den2))

//Zero padding of linearly combined WMA coeffs


for i = 0 to hull_len-2
array.unshift(lcwa_coeffs, 0)

//WMA convolution of linearly combined WMA coeffs


for i = hull_len to array.size(lcwa_coeffs)-1
sum3 = 0.
for j = i-hull_len to i-1
sum3 += array.get(lcwa_coeffs, j) * (i - j)

array.unshift(hull_coeffs, sum3 / den3)

//-----------------------------------------------------------------------------}
//Hull squeeze oscillator
//-----------------------------------------------------------------------------{
var os = 0
var lenn = array.size(hull_coeffs)-1
hma = 0.
inv_hma = 0.

for i = 0 to lenn
hma += src[i] * array.get(hull_coeffs, i)
inv_hma += src[lenn-i] * array.get(hull_coeffs, i)

hso = hma - inv_hma

cmean = ta.cum(math.abs(hso)) / bar_index * mult

os := ta.cross(hso, cmean) or ta.cross(hso, -cmean) ? 0


: hso < hso[1] and hso > cmean ? -1
: hso > hso[1] and hso < -cmean ? 1
: os

//-----------------------------------------------------------------------------}
//Plot
//-----------------------------------------------------------------------------{
//Colors
css0 = color.from_gradient(hso, 0, cmean, bull_css_0, bull_css_1)
css1 = color.from_gradient(hso, -cmean, 0, bear_css_1, bear_css_0)
css = hso > 0 ? css0 : css1

smallRev = 0
if os > os[1] and os == 1
smallRev := -1
if os < os[1] and os == -1
smallRev := 1

lookbackPeriod = mfL

// Calculate the percentage change in price for each bar


priceChange = close - close[1]
priceChangePercentage = priceChange / close[1] * 100

// Calculate the average volume over the lookback period


averageVolume = ta.ema(volume, lookbackPeriod)

// Initialize the counters for upward and downward trends


upwardTrends = 0
downwardTrends = 0

// Iterate over the lookback period and count the number of upward and downward
trends
for i = 1 to lookbackPeriod
if priceChangePercentage[i] > 0
upwardTrends := upwardTrends + 1
else if priceChangePercentage[i] < 0
downwardTrends := downwardTrends + 1

// Calculate the probabilities of upward, downward, and neutral trends


totalTrends = upwardTrends + downwardTrends
probabilityUpward = math.round(upwardTrends / totalTrends, 2) * 100
probabilityDownward = math.round(downwardTrends / totalTrends, 2) * 100

// Determine the probability trend based on the probabilities


probabilityTrend = ""
if probabilityUpward > probabilityDownward
probabilityTrend := "Upward"
else if probabilityUpward < probabilityDownward
probabilityTrend := "Downward"

// Display the probabilities in a table


var table tableObject = na
//if barstate.islast
// tableObject := table.new(position = position.top_right, columns = 2, bgcolor
= color.new(color.white, 0), border_color = color.gray, rows = 2)

//if not na(tableObject)


// table.cell(tableObject, 0, 0, "Probability Upward:")
// table.cell(tableObject, 0, 1, str.tostring(probabilityUpward) + "%")
//table.cell(tableObject, 1, 0, "Probability Downward:")
//table.cell(tableObject, 1, 1, str.tostring(probabilityDownward) + "%")

// Calculate the oscillator value based on the difference between upward and
downward trends
oscillatorValue = probabilityUpward - probabilityDownward

// Determine the histogram color based on the difference between the oscillator
value and zero line

histogramColor = oscillatorValue >= 0 ? (oscillatorValue[1] < oscillatorValue ?


color.new(color.teal, 50) : color.new(color.teal, 50)) : (oscillatorValue[1] <
oscillatorValue ? color.new(color.red, 50) : color.new(color.red, 50))

// Plot the histogram


// Smoothning the Histogram
smooth_hist = true
smoothning_scale = mfS
smooth_len = smoothning_scale * 2

smooth_hist_val = smooth_hist ? ta.ema(oscillatorValue, smooth_len) :


oscillatorValue
smooth_hist_val := smooth_hist_val / 2.5
// Plot the histogram
//plot(smooth_hist_val, color=histogramColor, style=plot.style_area, linewidth=1,
title="Probability Histogram")
mf.mfi := smooth_hist_val
sm1 = ta.sma(smooth_hist_val, smooth_len)
if (oscillatorValue > 0 and sm1 > smooth_hist_val)
smooth_hist_val:=0
if (oscillatorValue < 0 and sm1 < smooth_hist_val)
smooth_hist_val := 0
mf.blMFI := math.max(smooth_hist_val-9, 0)
mf.brMFI := math.min(smooth_hist_val+9, 0)
//plot(math.max(smooth_hist_val-22, 0), color = color.teal, style=plot.style_area,
linewidth=1, title="Probability Histogram")
//plot(math.min(smooth_hist_val+22, 0), color = color.red, style=plot.style_area,
linewidth=1, title="Probability Histogram")

mfT() =>
switch
mf.mfi > 0 =>
if cf.brT.size() > 1
cf.brT.pop()
if cf.blT.size() > mfL
cf.blT.pop()
if mf.mfi > cf.blT.avg()
cf.blT.unshift(mf.mfi)
else
cf.blT.unshift(mf.mfi[mfL] > 0 ? mf.mfi[mfL] : mf.mfi)

mf.mfi < 0 =>


if cf.blT.size() > 1
cf.blT.pop()
if cf.brT.size() > mfL
cf.brT.pop()
if mf.mfi < cf.blT.avg()
cf.brT.unshift(mf.mfi)
else
cf.brT.unshift(mf.mfi[mfL] < 0
? mf.mfi[mfL]
: mf.mfi
)

method st(simple string src, float osc, simple int len) =>
float o = switch src
"SMA" => ta.sma(osc, len)
"EMA" => ta.ema(osc, len)

method css(color x, int inv) =>


color out = inv == 1
? color.new(x, tCSS)
: color.new(x, 0 )

method transp(color x, int t) =>


color.new(x, t)

rv() =>
vMA = ta.sma(volume, 7)
rsi = ta.rsi(vMA, 7) - 50

tMj = volume > vMA * ( rsF != 10 ? 1 + (rsF / 10) : 2) ? true :


false
tMn = volume > vMA * ( rsF != 10 ? 0 + (rsF / 10) : 2) and not tMj ? true :
false

mjBR = tMj and osc.sig > rsF and mf.mfi > cf.blT.avg() ? true :
false
mjBL = tMj and osc.sig < -rsF and mf.mfi < cf.brT.avg() ? true :
false

mnBR = tMn and osc.sig > 20 and osc.sig > osc.sgD and rsi > 20 ? true :
false
mnBL = tMn and osc.sig < -20 and osc.sig < osc.sgD and rsi < -20 ? true :
false

[mjBL, mjBR, mnBR, mnBL]

osc(simple int len, simple int smt) =>


float hi = ta.highest( len)
float lo = ta.lowest ( len)
float av = ta.sma (hl2, len)

osc.sig := ta.ema(ta.linreg((close - math.avg(hi, lo, av)) / (hi - lo) * 100,


len, 0), sL)
osc.sgD := sT.st(osc.sig, 2)
osc.cO := osc.sig > osc.sgD ? fCSS.css(1) : sCSS.css(1)

mfi() =>
mf.mfi := ta.sma(ta.mfi(hl2, mfL) - 50, mfS)

mf.mfc := mf.mfi > 0


? mfBL
: mfBR

bL = mf.mfi - 10
bR = mf.mfi + 10

mf.blMFI := mf.mfi > 0 and mf.mfi > cf.blT.avg()


? bL
: 0
mf.brMFI := mf.mfi < 0 and mf.mfi < cf.brT.avg()
? bR
: 0

cDiv() =>
mx = math.max(osc.sig, osc.sgD, osc.sig[1], osc.sgD[1])
mn = math.min(osc.sig, osc.sgD, osc.sig[1], osc.sgD[1])

mxid = mx == osc.sig[1] or mx == osc.sgD[1] ? 1 : 0


mnid = mn == osc.sig[1] or mn == osc.sgD[1] ? 1 : 0

switch
osc.sig > dvT =>
if ta.crossunder(osc.sig, osc.sgD)
switch
na(div.src) =>
div.n := bar_index - mxid
div.src := math.max(open[mxid], close[mxid])
div.p := mx

not na(div.src) =>


if math.max(open[mxid], close[mxid]) > div.src and
not(osc.sig[mxid] > div.p)
line.new(x1 = div.n, x2 = bar_index - mxid, y1 = div.p,
y2 = mx, color = brDv)
alert(message = "DIV",freq =
alert.freq_once_per_bar_close)
div.n := na
div.src := na
div.p := na
else
div.n := bar_index - mxid
div.src := math.max(open[mxid], close[mxid])
div.p := mx
osc.sig < -dvT =>
if ta.crossover (osc.sig, osc.sgD)
switch
na(div.src) =>
div.n := bar_index - mnid
div.src := math.min(open[mnid], close[mnid])
div.p := mn

not na(div.src) =>


if math.min(open[mnid], close[mnid]) < div.src and
not(osc.sig[mnid] < div.p)
line.new(x1 = div.n, x2 = bar_index - mnid, y1 = div.p,
y2 = mn, color = blDv)
alert(message = "DIV",freq =
alert.freq_once_per_bar_close)
div.n := na
div.src := na
div.p := na
else
div.n := bar_index - mnid
div.src := math.min(open[mnid], close[mnid])
div.p := mn

//osc(mL, sL)

var float highestHyperWave = 0.


var float lowestHyperWave = 0.

n1 = mL
n2 = sL

ap = hlc3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)

wt1 = tci
//wt1 += mf.mfi

if wt1 > maxval


maxval := wt1
if wt1 < minval
minval := wt1

zi = (wt1-minval)/(maxval-minval)*100

wt1 := zi
wt1 := wt1-50
wt2 = ta.sma(wt1, 3)
if (sT == 'EMA')
wt2 := ta.ema(wt1, 3)

//wt2 = ta.sma(wt1, 2)
var indbot=0
var indtop=0

if wt1 > wt2 and wt1[1] < wt2[1]


indbot := bar_index
if wt1 < wt2 and wt1[1] > wt2[1]
indtop := bar_index

bott = bar_index - indbot


topp = bar_index - indtop

osc.sig := wt1
osc.sgD := wt2
osc.cO := osc.sig > osc.sgD ? fCSS.css(1) : sCSS.css(1)

//if ()
// Histogram

//lookbackPeriod = input(35, "Lookback Period")

// Calculate the percentage change in price for each bar

// Histogram

//plot(0, color=color.new(#787b86, 100))


//top1 = plot(obLevel1, color=color.new(#4caf4f, 100))
//top2 = plot(osLevel1, color=color.new(#ff5252, 100))
//bottom1 = plot(obLevel2, color=color.new(#4caf4f, 100))
//bottom2 = plot(osLevel2, color=color.new(#ff5252, 100))

//fi//ll(plot1=top1, plot2=bottom1, color=wt2 > 0 and (wt1 - wt2) > 0 ? #089981 :


wt2 > 0 or (wt1 - wt2) > 0 ?color.new(#363a45, 60) : color.new(#363a45, 70))
//fill(plot1=top2, plot2=bottom2, color=wt2 < 0 and (wt1 - wt2) < 0 ? #f23645 : wt2
< 0 or (wt1 - wt2) < 0 ? color.new(#363a45, 60) : color.new(#363a45, 70))

//plot1 = plot(wt1, color=wt1 > wt2 ? color.new(color.green, 0) :


color.gray ,title="Signal")
//plot2 = plot(wt2, color=color.new(#ff5252, 100),title="Signal Dots")

//fill(plot1=plot1, plot2=plot2, color=wt1 > wt2 ? color.rgb(8, 153, 129, 80) :


color.rgb(120, 123, 134, 80),title="Signal Shadow")

//plot(ta.cross(wt1, wt2) ? wt2 : na, color=color.new(color.black, 0),


style=plot.style_circles, linewidth=3,title="Dot Shadows")
//plot(ta.cross(wt1, wt2) ? wt2 : na, color=wt2 - wt1 > 0 ? color.gray :
color.green , style=plot.style_circles, linewidth=2)
//mfi()
mfT()

if sDiv
cDiv()

[mjBL, mjBR, mnBR, mnBL] = rv()

// REVERSAL SIGNAL
plotshape(bigRev == 1 ? -65 : na, location = location.absolute, color = rsBL, size
= size.tiny, style = shape.triangleup)
plotshape(bigRev == -1 ? 65 : na, location = location.absolute, color = rsBR, size
= size.tiny, style = shape.triangledown)

plot(smallRev == -1? -65 : na, color = rsBL, linewidth = 1, style =


plot.style_circles)
plot(smallRev == 1? 65 : na, color = rsBR, linewidth = 1, style =
plot.style_circles)

// HYPER WAVE
plot(ta.crossover (osc.sig, osc.sgD) and dW ? math.min(osc.sig, osc.sgD) : na,
style = plot.style_circles, linewidth = 2, color = osc.cO.css(0), offset = 0)
plot(ta.crossunder(osc.sig, osc.sgD) and dW ? math.max(osc.sig, osc.sgD) : na,
style = plot.style_circles, linewidth = 2, color = osc.cO.css(0), offset = 0)

pO = plot(dW ? osc.sig : na, color = osc.cO.css(0) )


iO = plot(dW ? osc.sgD : na, color = osc.cO.css(1), display = display.none)
bL = plot(0 , color = color.black )

fill(pO, iO, color = dW ? osc.cO : na)

mf.mfc := mf.mfi > 0 ? color.new(color.teal, 50) : color.new(#e93543, 50)


//SMART MONEY FLOW
pmf = plot(Smf ? mf.mfi : na, color =
mf.mfc )
blT = plot(mf.blMFI > 0 and mf.mfi > 0 ? mf.blMFI : 0 , color = na, display =
display.none)
brT = plot(mf.brMFI < 0 and mf.mfi < 0 ? mf.brMFI : 0 , color = na, display =
display.none)

fill(bL, pmf, mf.mfc.transp(Smf ? 50 : 100))


fill(bL, blT, mf.mfc.transp(Smf ? 0 : 100))
fill(bL, brT, mf.mfc.transp(Smf ? 0 : 100))

cf.up := color.rgb(54, 58, 69, 60)


cf.dn := color.rgb(54, 58, 69, 60)

switch
osc.sig > 0 and mf.mfi > 0 => cf.up := cnBL
osc.sig < 0 and mf.mfi < 0 => cf.dn := cnBR
=>
cf.dn := cnBR.transp(60)
cf.up := cnBL.transp(60)

tLv = plot( 55, color = sCNB ? cf.up : na)


bLv = plot(-55, color = sCNB ? cf.dn : na)

tfL = plot( 50, display = display.none)


dfL = plot(-50, display = display.none)

fill(tLv, tfL, color = sCNB ? cf.up : na)


fill(bLv, dfL, color = sCNB ? cf.dn : na)

//threshold
plot(mf.mfi > 0 and Smf ? cf.blT.avg() : na, color = mfBL, style =
plot.style_linebr)
plot(mf.mfi < 0 and Smf ? cf.brT.avg() : na, color = mfBR, style =
plot.style_linebr)

//CONFLUENCE METER
if barstate.islast
line.new(x1 = last_bar_index, x2 = bar_index - 1, y1 = 20, y2 = 20, color =
chart.fg_color.transp(50), style = line.style_dashed, extend = extend.right)
line.new(x1 = last_bar_index, x2 = bar_index - 1, y1 = -20, y2 = -20, color =
chart.fg_color.transp(50), style = line.style_dashed, extend = extend.right)

if sCNF

var line[] ln = array.new<line>()


for j in ln
j.delete()
ln.clear()

var label lb = na
lb.delete()
lb := na

for i = 0 to 21
int id = switch i
0 => 55
1 => 50
2 => 45
3 => 40
4 => 35
5 => 30
6 => 25
7 => 20
8 => 15
9 => 10
10 => 5
11 => 0
12 => -5
13 => -10
14 => -15
15 => -20
16 => -25
17 => -30
18 => -35
19 => -40
20 => -45
21 => -50

ln.unshift(
line.new(
x1 = bar_index + 2
, x2 = bar_index + 2
, y1 = id
, y2 = id - 5
, color = color.from_gradient(id, -50, 55, cnBR, cnBL)
, width = 4
)
)

cnfP = switch
osc.sig > 0 and mf.mfi > 0 and mf.mfi > cf.blT.avg() => 40
osc.sig < 0 and mf.mfi < 0 and mf.mfi < cf.brT.avg() => -40

osc.sig > 0 and mf.mfi > 0 => 20


osc.sig < 0 and mf.mfi < 0 => -20

osc.sig > 0 and mf.mfi < 0 => 0


osc.sig < 0 and mf.mfi > 0 => 0

lb := label.new(
x = bar_index + 3
, y = cnfP
, text = "◀"
, color = na
, textcolor = chart.fg_color
, size = size.small
, style = label.style_label_left
)

alertcondition(mjBL and rsS or mjBR and rsS, title='Major Reversals',


message='Major Reversals')
alertcondition(mnBL and rsS or mnBR and rsS, title='Minor Reversals',
message='Minor Reversals')
alertcondition(ta.crossover (osc.sig, osc.sgD) and dW , title='Hyper Wave UP
Cross', message='Hyper Wave UP Cross')
alertcondition(ta.crossunder(osc.sig, osc.sgD) and dW, title='Hyper Wave DOWN
Cross', message='Hyper Wave DOWN Cross')
alertcondition(ta.crossover (mf.mfi, 0), title='Money Flow UP', message='Money Flow
UP')
alertcondition(ta.crossover (mf.mfi, 0), title='Money Flow DOWN', message='Money
Flow DOWN')
alertcondition(mjBL and rsS or mnBL and rsS or ta.crossover (osc.sig, osc.sgD) or
ta.crossover (mf.mfi, 0), title='Any Alert LONG', message='Any Alert LONG')
alertcondition(mjBR and rsS or mnBR and rsS or ta.crossunder(osc.sig, osc.sgD) or
ta.crossover (mf.mfi, 0), title='Any Alert SHORT', message='Any Alert SHORT')

You might also like