Jours fériés 2022
-
trappiste73
- Membre du Conseil Jedi
- Messages : 5208
- Enregistré le : 08 déc. 2016 11:38
Jours fériés 2022
Je viens de mettre à jour mes algos :
US
17/01
21/02
15/04
30/05
04/07
05/09
24/11
26/12
IF DayOfWeek[0]=6 or DayOfWeek[0]=7 or month=1 and day=17 or month=2 and day=21 or month=4 and day=15 or month=5 and day=30 or month=7 and day=4 or month=9 and day=5 or month=11 and day=24 or month=12 and day=26 then
JourTrading = 0
ELSE
JourTrading = 1
endif
Fr et Dax
15/04
18/04
26/12
IF DayOfWeek[0]=6 or DayOfWeek[0]=7 or month=4 and (day=15 or day=18) or month=12 and day=26 then
JourTrading = 0
ELSE
JourTrading = 1
endif
US
17/01
21/02
15/04
30/05
04/07
05/09
24/11
26/12
IF DayOfWeek[0]=6 or DayOfWeek[0]=7 or month=1 and day=17 or month=2 and day=21 or month=4 and day=15 or month=5 and day=30 or month=7 and day=4 or month=9 and day=5 or month=11 and day=24 or month=12 and day=26 then
JourTrading = 0
ELSE
JourTrading = 1
endif
Fr et Dax
15/04
18/04
26/12
IF DayOfWeek[0]=6 or DayOfWeek[0]=7 or month=4 and (day=15 or day=18) or month=12 and day=26 then
JourTrading = 0
ELSE
JourTrading = 1
endif
-
Flanders
- Stormtrooper
- Messages : 211
- Enregistré le : 26 déc. 2016 13:26
Re: Jours fériés 2022
Merci
De plus, j'ignorais qu'on pouvait utiliser DayOfWeek[0] , DayOfWeek[1], ...
De plus, j'ignorais qu'on pouvait utiliser DayOfWeek[0] , DayOfWeek[1], ...
-
ChristelleP
- La Battante
- Messages : 69050
- Enregistré le : 23 janv. 2018 09:53
Re: Jours fériés 2022
merci Trappiste 
-
falex
- Le Gladiateur
- Messages : 34269
- Enregistré le : 12 févr. 2013 15:41
Re: Jours fériés 2022
Commença tes algos n’ont pas le droit de s’exécuter le samedi et le dimanche ?!? 
-
trappiste73
- Membre du Conseil Jedi
- Messages : 5208
- Enregistré le : 08 déc. 2016 11:38
Re: Jours fériés 2022
oui falex : j’ai appris dans la douleur qu’ils voulaient deux jours de repos. 
-
falex
- Le Gladiateur
- Messages : 34269
- Enregistré le : 12 févr. 2013 15:41
Re: Jours fériés 2022
Pourquoi tu trades (enfin tes algo) les jours fériés usa mais pas férié en EU ?
En général ce sont ds journée « morte » côté EU
-
trappiste73
- Membre du Conseil Jedi
- Messages : 5208
- Enregistré le : 08 déc. 2016 11:38
Re: Jours fériés 2022
Parce que je n'ai pas identifié à ce jour que cela posait un pb à mes algos : pas spécialement de pertes ces jours là.
-
Olivier Sun
- Chevalier Émérite Jedi
- Messages : 3123
- Enregistré le : 27 avr. 2020 13:43
Re: Jours fériés 2022
EU est insignifiante, les patrons restent les US.
-
palladium
- Apprenti Jedi
- Messages : 838
- Enregistré le : 05 févr. 2014 12:15
Re: Jours fériés 2022
Merci, est-ce qu'il ne manquerait pas le 20/06 également pour les US ?
-
trappiste73
- Membre du Conseil Jedi
- Messages : 5208
- Enregistré le : 08 déc. 2016 11:38
Re: Jours fériés 2022
oui merci : le 20 juin c'est le Juneteenth National Independence Day
Code corrigé :
US
17/01
21/02
15/04
30/05
20/06
04/07
05/09
24/11
26/12
IF DayOfWeek[0]=6 or DayOfWeek[0]=7 or month=1 and day=17 or month=2 and day=21 or month=4 and day=15 or month=5 and day=30 or month=6 and day=20 or month=7 and day=4 or month=9 and day=5 or month=11 and day=24 or month=12 and day=26 then
JourTrading = 0
ELSE
JourTrading = 1
endif
Code corrigé :
US
17/01
21/02
15/04
30/05
20/06
04/07
05/09
24/11
26/12
IF DayOfWeek[0]=6 or DayOfWeek[0]=7 or month=1 and day=17 or month=2 and day=21 or month=4 and day=15 or month=5 and day=30 or month=6 and day=20 or month=7 and day=4 or month=9 and day=5 or month=11 and day=24 or month=12 and day=26 then
JourTrading = 0
ELSE
JourTrading = 1
endif
-
dav
- Chevalier Émérite Jedi
- Messages : 3763
- Enregistré le : 08 mars 2015 14:34
Re: Jours fériés 2022
Merci Trappiste
Tres utile ton code
Tres utile ton code