ChrisMoody

CM_DayOfWeek All Instruments V2

Updated Code That Highlights Bars Based On Days Of The Week.

Works On Daily and Intra-Day Bars.

Works on All Instruments. Stocks, Forex, Futures , Bitcoin .

Shows Correct Trading Sessions!!!

Ability to Turn On/Off Each Day Of The Week via Inputs Panel.
Supprimer des scripts favoris Ajouter aux scripts favoris
//Created By ChrisMoody on 5-2-2014 - Updated on 10-28-2014
//Updates include Code now works for Stocks, Forex, Futures, bitcoin etc.
//Highlights Bars Based on Correct Trading Session.
//Colors Bars for Stocks Monday-Friday
study("CM_DayOfWeek_V2", overlay=true)
disMon = input(true, title="Highlight Monday?")
disTue = input(false, title="Highlight Tuesday?")
disWed = input(false, title="Highlight Wednesday?")
disThur = input(false, title="Highlight Thursday?")
disFri = input(false, title="Highlight Friday?")

isMon() => dayofweek(time('D')) == monday and close ? 1 : 0
isTue() => dayofweek(time('D')) == tuesday and close ? 1 : 0
isWed() => dayofweek(time('D')) == wednesday and close ? 1 : 0
isThu() => dayofweek(time('D')) == thursday and close ? 1 : 0
isFri() => dayofweek(time('D')) == friday and close ? 1 : 0

barcolor(disMon and isMon() ? (isMon() ? yellow : na) : na)
barcolor(disTue and isTue() ? (isTue() ? fuchsia : na) : na)
barcolor(disWed and isWed() ? (isWed() ? gray : na) : na)
barcolor(disThur and isThu() ? (isThu() ? aqua : na) : na)
barcolor(disFri and isFri() ? (isFri() ? orange : na) : na)

Hi ChisMoody
There is some function that allows me to show only one or two previous periods and not the whole story
Répondre
you really need to learn astronomy ... all colors are wrong + i added sat and sun

//Created By ChrisMoody on 5-2-2014 - Updated on 10-28-2014
// modified by anacondabitch on 1-21-2018... follow me on tradingview
//Updates include Code now works for Stocks, Forex, Futures, bitcoin etc.
//Highlights Bars Based on Correct Trading Session.
//Colors Bars for Stocks Monday-Friday
study("CM_DayOfWeek_V2", overlay=true)
disMon = input(true, title="Highlight Monday?")
disTue = input(true, title="Highlight Tuesday?")
disWed = input(true, title="Highlight Wednesday?")
disThur = input(true, title="Highlight Thursday?")
disFri = input(true, title="Highlight Friday?")
disSat = input(true, title="Highlight Saturday?")
disSun = input(true, title="Highlight Sunday?")

isMon() => dayofweek(time('D')) == monday and close ? 1 : 0
isTue() => dayofweek(time('D')) == tuesday and close ? 1 : 0
isWed() => dayofweek(time('D')) == wednesday and close ? 1 : 0
isThu() => dayofweek(time('D')) == thursday and close ? 1 : 0
isFri() => dayofweek(time('D')) == friday and close ? 1 : 0
isSat() => dayofweek(time('D')) == saturday and close ? 1 : 0
isSun() => dayofweek(time('D')) == sunday and close ? 1 : 0

barcolor(disMon and isMon() ? (isMon() ? aqua : na) : na)
barcolor(disTue and isTue() ? (isTue() ? green : na) : na)
barcolor(disWed and isWed() ? (isWed() ? purple : na) : na)
barcolor(disThur and isThu() ? (isThu() ? yellow : na) : na)
barcolor(disFri and isFri() ? (isFri() ? fuchsia : na) : na)
barcolor(disSat and isSat() ? (isSat() ? gray : na) : na)
barcolor(disSun and isSun() ? (isSun() ? orange : na) : na)
Répondre
I wonder why this is not a standard at TV.... i always needed some indicator where one ends and other starts
Répondre
Glad I could show you an example.
Répondre
Nice idea Chris
Répondre
Thanks
Répondre
Accueil Filtre d'actions Filtre Forex Filtre Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Règles de conduite Modérateurs Solutions site web & courtier Widgets Solutions de cartographie Obtenir de l'aide Demande de fonctionnalité Blog & actualités Questions Fréquentes Wiki Twitter
Profil Paramètres du Profil Compte et Facturation Obtenir de l'aide Idées Publiées Suiveurs Suivi Messages privés dialogue en ligne Se Déconnecter