Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
asian session high & low script

Hi, I'm looking for some help on a Tradingview script i'm working on!

Goals of script
1. Mark high and low of price between 00:00 - 07:00 UTC
2. distance between high and low marked as the defined range e.g 100 pips
3. divide this range into 2 so there's a mid range level separating high and low of equal distance
4. the distance from mid level to either high or low e.g 50 pips extended above and below the high and low 3 times almost representing pivot levels

This is my attempt nothing close to what i want so looking for help.
I have a screenshot of something i'm trying to create but can post it here
My email is [email protected] if you interested in helping me i can send it via email

// @version=3 study("High & Low Range", overlay=true)

showDailies = input(true, title="Show Daily Levels")
showDailyOpen = input(true, title="Daily Open")
showDailyClose = input(false, title="Daily Close")
showDailyHigh = input(true, title="Daily High")
showDailyLow = input(true, title="Daily Low")

getSeries (tf, src) =>
security(tickerid, tf, src, lookahead=barmerge.lookahead_on)

// Daily dailyOpen = getSeries('D', open)
dailyClose = getSeries('D', close)
dailyHigh = getSeries('D', high)
dailyLow = getSeries('D', low)

darkBlue = #247BA0
darkOrange = #FF7F00

// Daily Plots plot(showDailies and showDailyOpen and dailyOpen ? dailyOpen : na , title="Daily Open", style=line, color=darkOrange, transp=0, linewidth=3)
plot(showDailies and showDailyClose and dailyClose ? dailyClose : na , title="Daily Close", style=line, color=darkBlue, linewidth=2)
plot(showDailies and showDailyHigh and dailyHigh ? dailyHigh : na , title="Daily High", style=line, color=darkBlue, linewidth=2)
plot(showDailies and showDailyLow and dailyLow ? dailyLow : na , title="Daily Low", style=line, color=darkBlue, linewidth=2)