TradingView
Plumptoiletduck
Mar 28, 2018 1:17 PM

Custom Time ranges 

Bitcoin / DollarBitfinex

描述



Description:
This script colours the background of any time range you specify, including weekend periods.

It can be useful for spotting patterns on Bitcoin (recurring times of buying or selling).

Checkboxes to switch on and off. Inputs to specify time and day of week.


Monday = 2
Tuesday = 3
Wednesday = 4
Thursday = 5
Friday = 6
Saturday = 7
Sunday = 1


Example 1:

1500-1800:2

This will colour the background between 3pm and 6pm on Mondays.


Example 2:


0000-0600:247

This will colour the background between midnight and 6am on Mondays, Wednesdays, and Saturdays.


Any questions you may have, please leave in comments below and I'll respond when I have time.
评论
ICEKI
Very nice script, thanks for your efforts and generous =D
Plumptoiletduck
@ICEKI, You're welcome. :)
kkelsey
I am having this not get stuck with certain exchanges. I run 3-5 indicators and for EUR/USD FXCM for some reason it's no longer noticing the time zone change. If I flip over to a new exchange it works, but then i've had it stop working after some time. I've tried clearing my cache, reseting to default, and closing-reopening TV. It seems to be stuck on one timezone,even though the system setting and timezone are different. I've tried getting help from TV, but their shitbuckets
Plumptoiletduck
@kkelsey, When you say "time zone change" are you talking about the time frame? 15min/1hr/1D etc? If so, that's an issue of TV I've encountered. You just need to refresh the page.
kkelsey
@Plumptoiletduck, I mean that even after refreshing the page, the indicator is stuck on a different time zone.
Plumptoiletduck
@kkelsey, What is your definition of "Time zone"? So it's off by 1 hour or something? The data used by TV comes from the exchange itself, so there will be exchanges that don't have daylight savings, or don't operate on UTC.
dealerdon
Hi, can you add the color the only highlight the range's High and Low for the desired timeslot?
Plumptoiletduck
@dealerdon, That was my initial intention when I started this, unfortunately it is not possible due to Pinescript limitations. If you ever come across someone who has managed to plot highs and lows of a customised time series, please let me know.
Plumptoiletduck
Since It isn't possible to include price levels within the custom defined range, I added Daily price levels to this here: tradingview.com/script/t3yrpM7m-Custom-Time-ranges-Daily-price-ranges/
更多