Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © mono_i_love
- //@version=5
- indicator(title='Sessions_for_crypto', shorttitle='Sessions_for_crypto', overlay=true)
- //return UTC
- timeinrange(res, sess) =>
- not na(time(res, sess)) ? time(res, sess) : 0
- doNykSession = input(defval=true, title='NY Session On')
- doTkySession = input(defval=true, title='TK Session On')
- doLdnSession = input(defval=true, title='LD Session On')
- //Since cryptocurrencies are traded for 24 hours, session gives ":1234567" to specify Sunday (1) and Saturday (7).
- nykSession = input(title='NYK時間(UTC)', defval='1500-2300:1234567')
- tkySession = input(title='TKY時間(UTC)', defval='2300-0700:1234567')
- ldnSession = input(title='LDN時間(UTC)', defval='0700-1500:1234567')
- bgcolor(doNykSession and timeinrange(timeframe.period, nykSession) ? color.red : na, transp=80)
- bgcolor(doTkySession and timeinrange(timeframe.period, tkySession) ? color.green : na, transp=90)
- bgcolor(doLdnSession and timeinrange(timeframe.period, ldnSession) ? color.yellow : na, transp=70)
Advertisement
Add Comment
Please, Sign In to add comment