OPEN-SOURCE SCRIPT
Updated Fourth Friday Future

There seems to be an options contract that comes due on the fourth Friday of every month, causing massive dips in the crypto market; this indicator colors your chart to tell you when this is going to happen.
Release Notes
Set short title to "F3".Release Notes
Simplify code by inlining color.Release Notes
It turns out the CME micro Bitcoin futures actually expire on the last Friday, not the fourth Friday. I've updated the script, but I haven't found a way to change the name (which doesn't make any sense).Release Notes
Correctly color right side of bar when it falls on the first of the month.Release Notes
Mark the Monday following the last Friday--the next regular business day and the date the next futures contract opens--as green.Release Notes
Adjust buy-back window to account for time zone: it happens at 7am UTC (and 10am UTC, and a bit 12am UTC, but 7am is the key moment).Release Notes
Update green window to include a fade for the day after the following Monday.Release Notes
Add a yellow bar for when CME launched the Bitcoin futures and do not render the red/green bars before that moment.Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.