О проекте Особенности Правила поведения Модераторы Для сайтов Виджеты Компонент графиков Отзывы и предложения ЧаВо Справка и Wiki Твиттер

# TV_Pivot_Points_Camarilla

181 0
За основу взяты формулы расчета уровней по Pivot Point и Camarilla
Комментарий: Период лучше брать 2D
Комментарий: период 4D самое оптимальное. уровни Pivot можно отключить
"4D most optimal period. Pivot levels can be switched off"

```study(title="TV_Pivot_Points_Camarilla", shorttitle="TV_PPС", overlay=true)
len = input("D", title="Период")
sh = input(true, title="Уровни Pivot")
sm = input(true, title="Уровни Camarilla")

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)

//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=2, transp=0, offset = ds)
plot (sh and R1? R1 : na, color=R1!=R1[1] ? na:red, title="R1",style=line, linewidth=2, transp=0, offset = ds)
plot (sh and S1? S1 : na, color=S1!=S1[1] ? na:green, title="S1",style=line, linewidth=2, transp=0, offset = ds)
plot (sh and R2? R2 : na, color=R2!=R2[1] ? na:orange, title="R2",style=line, linewidth=2, transp=0, offset = ds)
plot (sh and S2? S2 : na, color=S2!=S2[1] ? na:orange, title="S2",style=line, linewidth=2, transp=0, offset = ds)
plot (sh and R3? R3 : na, color=R3!=R3[1] ? na:black, title="R3",style=line, linewidth=2, transp=0, offset = ds)
plot (sh and S3? S3 : na, color=S3!=S3[1] ? na:black, title="S3",style=line, linewidth=2, transp=0, offset = ds)

//Camarilla Equation
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 H1? H1 : na, color=H1!=H1[1] ? na:purple, title="H1",style=line, linewidth=2, transp=0, offset = ds)
plot (sm and L1? L1 : na, color=L1!=L1[1] ? na:purple, title="L1",style=line, linewidth=2, 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=1, transp=0, offset = ds)
ba2 = plot (sm and L3? L3 : na, color=L3!=L3[1] ? na:red, title="L3",style=line, linewidth=1, transp=0, offset = ds)
ba3 = plot (sm and H4? H4 : na, color=H4!=H4[1] ? na:red, title="H4",style=line, linewidth=1, transp=0, offset = ds)
ba4 = plot (sm and L4? L4 : na, color=L4!=L4[1] ? na:red, title="L4",style=line, linewidth=1, 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)

```
Россия
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Türkiye
Indonesia

한국
Домой Скринер акций Сигналы для Форекс пар Экономический календарь О проекте Особенности Правила поведения Модераторы Для сайтов Виджеты Компонент графиков Приоритетная поддержка Отзывы и предложения Блог и новости ЧаВо Справка и Wiki Твиттер