#26 20.03.2018 08:59:41

inkosto
Участник
Регистрация: 16.03.2018
Кол-во сообщений: 13

Re: Скрипты от Tatiana

Tatiana написал ранее:

Обновляю скрипт TV_Pivot_Points

Скрытый текст
Скрытый текст

добавлена заливка буферной зоны по Camarilla
так же протестировано и увеличин период до 4D, т.к. в этом периоде уровни рисует лучше

study(title="TV_Pivot_Points_Camarilla", shorttitle="TV_Pivot_Сamarilla", overlay=true)
len = input("4D", title="Период")
sm = input(true, title="Уровни Camarilla")
sd = input(false, title="Буферная зона Camarilla")
sh = input(false, title="Уровни Pivot")


ds     = period == '1' ? 1440 :
         period == '3' ? 480 :
         period == '5' ? 288 :
         period == '15' ? 96 :
         period == '30' ? 48 :
         period == '45' ? 32 :
         period == '60' ? 24 :
         period == '120' ? 12 :
         period == '180' ? 8 :
         period == '240' ? 6 :
         period == '480' ? 3 :
         period == '720' ? 2 :
         0

pdc = security(tickerid, len, close)
pdo = security(tickerid, len, open)
Z = security(tickerid, len, high)
X = security(tickerid, len, low)

//Camarilla Equation
HL0 = pdc
H1= pdc + (Z-X)*1.1/12
H2= pdc + (Z-X)*1.1/6
H3= pdc + (Z-X)*1.1/4
H4= pdc + (Z-X)*1.1/2
H5= (Z/X)*pdc
L1= pdc - (Z-X)*1.1/12
L2= pdc - (Z-X)*1.1/6
L3= pdc - (Z-X)*1.1/4
L4= pdc - (Z-X)*1.1/2
L5= pdc - (H5 - pdc)

plot (sm and HL0? HL0 : na, color=HL0!=HL0[1] ? na:gray, title="P",style=line, linewidth=2, transp=0, offset = ds)
plot (sm and H1? H1 : na, color=H1!=H1[1] ? na:orange, title="H1",style=line, linewidth=1, transp=0, offset = ds)
plot (sm and L1? L1 : na, color=L1!=L1[1] ? na:orange, title="L1",style=line, linewidth=1, transp=0, offset = ds)
plot (sm and H2? H2 : na, color=H2!=H2[1] ? na:black, title="H2",style=line, linewidth=1, transp=0, offset = ds)
plot (sm and L2? L2 : na, color=L2!=L2[1] ? na:black, title="L2",style=line, linewidth=1, transp=0, offset = ds)
ba1 = plot (sm and H3? H3 : na, color=H3!=H3[1] ? na:red, title="H3",style=line, linewidth=2, transp=0, offset = ds)
ba2 = plot (sm and L3? L3 : na, color=L3!=L3[1] ? na:red, title="L3",style=line, linewidth=2, transp=0, offset = ds)
ba3 = plot (sm and H4? H4 : na, color=H4!=H4[1] ? na:red, title="H4",style=line, linewidth=2, transp=0, offset = ds)
ba4 = plot (sm and L4? L4 : na, color=L4!=L4[1] ? na:red, title="L4",style=line, linewidth=2, transp=0, offset = ds)
plot (sm and H5? H5 : na, color=H5!=H5[1] ? na:black, title="H5",style=line, linewidth=1, transp=0, offset = ds)
plot (sm and L5? L5 : na, color=L5!=L5[1] ? na:black, title="L5",style=line, linewidth=1, transp=0, offset = ds)
fill (ba1, ba3, color=purple, title="Буферная зона Camarilla", transp=95)
fill (ba2, ba4, color=purple, title="Буферная зона Camarilla", transp=95)

//Pivot Point
pivot = (Z+X+pdc)/3
R1 = 2*pivot - X
S1 = 2*pivot - Z
R2 = pivot + (R1 - S1)
S2 = pivot - (R1-S1)
R3 = Z + 2*(pivot - X)
S3 = X - 2*(Z - pivot)

plot (sh and pivot? pivot : na, color=pivot!=pivot[1] ? na:blue, title="P",style=line, linewidth=1, transp=0, offset = ds)
plot (sh and R1? R1 : na, color=R1!=R1[1] ? na:purple, title="R1",style=circles, linewidth=1, transp=0, offset = ds)
plot (sh and S1? S1 : na, color=S1!=S1[1] ? na:purple, title="S1",style=circles, linewidth=1, transp=0, offset = ds)
plot (sh and R2? R2 : na, color=R2!=R2[1] ? na:orange, title="R2",style=circles, linewidth=1, transp=0, offset = ds)
plot (sh and S2? S2 : na, color=S2!=S2[1] ? na:orange, title="S2",style=circles, linewidth=1, transp=0, offset = ds)
plot (sh and R3? R3 : na, color=R3!=R3[1] ? na:black, title="R3",style=circles, linewidth=1, transp=0, offset = ds)
plot (sh and S3? S3 : na, color=S3!=S3[1] ? na:black, title="S3",style=circles, linewidth=1, transp=0, offset = ds)

Татьяна краса! добрый день! а по какому пинципу вы торгуете на этом графике?

Вне форума

Board footer