TradingView
Bluephantom
13. Mrz. 2018 05:59

Highlight the weekends 

Bitcoin / DollarBitfinex

Beschreibung

A number of times I've heard people say that the market drops on the weekends.

Being that cryptocurrencies are a 24/7 market I thought it would be interesting to see what candle movements happen on the weekends.

This is a very simple script that highlights the candles that are on Saturday and Sunday.
Kommentare
tonykwong901
Updated to work in 2021:

study("weekend", overlay=true)
disSat = input(true, title="Highlight Saturday?")
disSun = input(true, title="Highlight Sunday?")

isSat() => dayofweek(time('D')) == dayofweek.saturday and close ? 1 : 0
isSun() => dayofweek(time('D')) == dayofweek.sunday and close ? 1 : 0

bgcolor(disSat and isSat() ? (isSat() ? color.yellow : na) : na)
bgcolor(disSun and isSun() ? (isSun() ? color.yellow : na) : na)
adinoel
Made mod of your script. Highlight not bar, but background:

study("weekend", overlay=true)
disSat = input(true, title="Highlight Saturday?")
disSun = input(true, title="Highlight Sunday?")

isSat() => dayofweek(time('D')) == saturday and close ? 1 : 0
isSun() => dayofweek(time('D')) == sunday and close ? 1 : 0

bgcolor(disSat and isSat() ? (isSat() ? yellow : na) : na)
bgcolor(disSun and isSun() ? (isSun() ? yellow : na) : na)
itsbs
@leonid-korobov, hey, any tips on how I could have the bars coloured differently depending on bullish/bearish?
xVICx
Updated to work with version=5.
Weekend background will be shaded in yellow

indicator('weekend', overlay=true)
disSat = input(true, title='Highlight Saturday?')
disSun = input(true, title='Highlight Sunday?')

isSat() =>
dayofweek(time('D')) == dayofweek.saturday and close ? 1 : 0
isSun() =>
dayofweek(time('D')) == dayofweek.sunday and close ? 1 : 0

bgcolor(disSat and isSat() ? isSat() ? color.yellow : na : na, transp=90)
bgcolor(disSun and isSun() ? isSun() ? color.yellow : na : na, transp=90)
itsbs
Mate, this is so useful. I was looking for some confluence for my theory of the likelihood of a BTC pump on a weekend (whilst it's in a macro downtrend) and this helped massively. Spoiler: it's unlikely without a positive Elon tweet!

Thank you.
grigory.rybalchenko
@itsbs, clear, that often on Monday there is abnormal ATR
adinoel
Thank you for coding & sharing!
Mehr