RicardoSantos

[RS]Intraday Weekly Levels Forecast V0

EXPERIMENTAL:
a different calculation for pivots and forecasting price range forward.
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title='[RS]Intraday Weekly Levels Forecast V0', shorttitle='IWLF', overlay=true)

w_shift = period == '1' ? 7200 :
         period == '3' ? 2400 :
         period == '5' ? 1440 :
         period == '15' ? 480 :
         period == '30' ? 240 :
         period == '45' ? 160 :
         period == '60' ? 120 :
         period == '120' ? 60 :
         period == '180' ? 40 :
         period == '240' ? 30 :
         period == '480' ? 15 :
         period == '720' ? 10 :
         0
w_atr = security(tickerid, 'W', atr(100))
w_open = security(tickerid, 'W', open)
w_high = security(tickerid, 'W', high)
w_low = security(tickerid, 'W', low)
w_upper = w_high + w_atr
w_lower = w_low - w_atr

plot(title='Weekly Open', series=w_open, color=black)
plot(title='Weekly Upper Extreme', series=w_upper, color=black, offset=w_shift)
plot(title='Weekly Lower Extreme', series=w_lower, color=black, offset=w_shift)
plot(title='Weekly High', series=w_high, color=black, offset=w_shift)
plot(title='Weekly Low', series=w_low, color=black, offset=w_shift)
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