Code
Code
//
DodgerBlue = #1E90FF
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
//
||-------------------------------------------------------------------------
----------------------------||
pacC = ema(close_,HiLoLen)
pacL = ema(low_,HiLoLen)
pacU = ema(high_,HiLoLen)
ema05=plot(ShowEMA12_Channel?EMA05:na,
color=white,linewidth=1,transp=92,title="EMA05")
ema11=plot(ShowEMA12_Channel?EMA11:na,
color=blue,linewidth=1,transp=92,title="EMA11")
fill(ema05,ema11, color=gray,transp=92,title="Fill EMA5-12")
//
emaFast = isintraday? interval==1? EMA75 : EMA89 : EMA89
emaMedium = isintraday? interval==1? EMA180 : EMA200 : EMA200
emaSlow = isintraday? interval==1? EMA540 : EMA633 : EMA633
topfractals = na
botfractals = na
topfractals := filteredtopf ? high_[3] : topfractals[1]
botfractals := filteredbotf ? low_[3] : botfractals[1]
topfcolor = na
botfcolor = na
topfcolor := topfractals != topfractals[1] ? na : green
botfcolor := botfractals != botfractals[1] ? na : red
up_alert = 0
dn_alert = 0
up_alert := isup ? na(up_alert[1]) ? 1 : up_alert[1]+1 : 0
dn_alert := isdown ? na(dn_alert[1]) ? 1 : dn_alert[1]+1 : 0
plotarrow(ShowPACexit and UseBigArrows? up_alert[1]==1? 1 : dn_alert[1]==1?
-1 : na : na, colorup=aqua, colordown=fuchsia,
transp=20,minheight=10,maxheight=60, title="SCALPSWING Alert Arrows")
plotshape(ShowPACexit and not UseBigArrows? up_alert[1]==1? true : na : na,
title='TTSS Buy Arrow', location=location.belowbar, color=green,
style=shape.arrowup, text="BUY", textcolor=green,transp=0)
plotshape(ShowPACexit and not UseBigArrows? dn_alert[1]==1? true : na : na,
title='TTSS Sell Arrow', location=location.abovebar, color=red,
style=shape.arrowdown, text="SELL",textcolor=red,transp=0)