//// @author LazyBear// If you use this code in its orignal/modified form, do drop me a note.////modified by Kurbelklaus
study("KK_Traders Dynamic Index_Bar Highlighting", shorttitle="KK_TDI_BH")
lengthrsi=input(13)
src=close
lengthband=input(34)
lengthrsipl=input(2)
lengthtradesl=input(7)
lenH = input(5, minval=1, title="PAC Length High")
lenL = input(5, minval=1, title="PAC Length Low")
Ruleset=input(false,title="Use original Ruleset")
r=rsi(src, lengthrsi)
ma=sma(r,lengthband)
offs=(1.6185 * stdev(r, lengthband))
up=ma+offs
dn=ma-offs
mid=(up+dn)/2
mab=sma(r, lengthrsipl)
mbb=sma(r, lengthtradesl)
hline(32)
hline(50)
hline(68)
upl=plot(up, color=blue)
dnl=plot(dn, color=blue)
midl=plot(mid, color=orange, linewidth=2)
fill(upl,midl, red, transp=90)
fill(midl, dnl, green, transp=90)
plot(mab, color=green, linewidth=2)
plot(mbb, color=red, linewidth=2)
// Bar - Highlighting, TDI TS// PAC
srcH = high
srcL = low
smmaH = na(smmaH[1]) ? sma(srcH, lenH) : (smmaH[1] * (lenH - 1) + srcH) / lenH
smmaL = na(smmaL[1]) ? sma(srcL, lenL) : (smmaL[1] * (lenL - 1) + srcL) / lenL
//long= Ruleset ? mab > mbb and mab > mid and mab > 50 and mab < 68 and close > smmaH and close > open : mab > mbb and mab > mid and mab > 50 and close > smmaH and close > open
short= Ruleset ? mab < mbb and mab < mid and mab < 50 and mab > 32 and close < smmaL and open > close : mab < mbb and mab < mid and mab < 50 and close < smmaL and open > close
barcolor(long ? green : na)
barcolor(short ? red : na)
Para iniciar sesión y usar el sitio web MQL5.com es necesario permitir el uso de Сookies.
Por favor, active este ajuste en su navegador, de lo contrario, no podrá iniciar sesión.
Ha iniciado sesión. La autenticación de dos factores se ha desactivado. Vuelva a configurarla y escanee un nuevo código QR, o continúe con la autenticación de dos factores desactivada.
Gracias