BardParticipant
Master
This indicator code will keep you out of trouble on Federal Reserve day announcements when volatility can go through the roof.
There’s a number of times I’ve been trading forex and either missed or forgotten an FOMC day in the online calendars…
I also avoid trading before the news/economic data announcements at 9.30am 1.30pm & 3.00pm.
(Please confirm FOMC days here: https://www.federalreserve.gov/monetarypolicy/fomccalendars.htm)
//Avoid FOMC dates (with warning on day before because I can't quite figure out
//how to code it on the actual day other than delay the dates by one day?)
FOMC = date=20180731 or date=20180925 or date=20180926 or date=20181107 or date=20181108 or date=20181218 or date=20181219
If FOMC then
HowManyCentralBankersDoesitTaketoBlowUptheMkt = 1
Else
HowManyCentralBankersDoesitTaketoBlowUptheMkt = 0
Endif
if HowManyCentralBankersDoesitTaketoBlowUptheMkt then
drawtext("●",barindex,FOMC,Dialog,Bold,16) coloured(255,0,0)
endif
return HowManyCentralBankersDoesitTaketoBlowUptheMkt as "Take Cover it's an FOMC Day!"
Please feel free to rename the indicator. Lol.
BardParticipant
Master
How to code it on the actual day other than delay the dates by one day?
Use opendate not date.
I’ve moved this post to the ProBuilder forum as that is a more relevant place for it.
The best way to see the difference between DATE and OPENDATE is to graph or write an indicator for them:
return opendate as "opendate", date as "date"
DATE is the date at the close of a candle and OPENDATE is the date at the open of a candle.