CapnOscar

MyTrend

504 1 48
Choose timeframe for pivots ...Play with it you can find this useful
Remove from Favorite Scripts Add to Favorite Scripts
//Coded by CapnOscar on 16.04.2015 - Say Thanks?
study(title="MyTrend", shorttitle="MyTrend", overlay=true)

picktf = input(title="Pick TimeFrame", type=resolution, defval="30")


previous_close = security(tickerid, picktf,close[1])
previous_open = security(tickerid, picktf,open[1])
cur_open = security(tickerid, picktf,open)
previous_high = security(tickerid, picktf,high[1])
previous_low = security(tickerid, picktf,low[1])
cur_high = security(tickerid, picktf,high)
cur_low = security(tickerid, picktf,low)




D = (cur_high - cur_low)
Q = (previous_high - previous_low)
P = (previous_high + previous_low + previous_close) / 3
R1 = (2*P)-previous_low
S1 = (2*P)-previous_high
R2 = P+(previous_high - previous_low)
S2 = P-(previous_high - previous_low)


rsic = close > P ? green : close < P ? red : orange

pv = plot(P, color=rsic, linewidth=3)
plr1 = plot(R1, color=silver)
plr2 = plot(R2, color=gray)
pls1 = plot(S1, color=silver)
pls2 = plot(S2, color=gray)

Evgenich
2 years ago
GoodJob Captain
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out