TradingView
jdehorty
Oct 12, 2022 8:17 PM

Economic Calendar Events: FOMC, CPI, and more 

Ethereum / TetherUSBinance

Description

This script plots major events from the Economic Calendar that often correspond to major pivot points in various markets. It also includes built-in logic to retroactively adjust larger time intervals (i.e. greater than 1 hour) to be correctly aligned with the interval during which the event occurred.

Events are taken from the Economic Calendar and will be updated periodically at the following library:
tradingview.com/script/FAShzjTK-EconomicCalendar/

The above library can be used to conveniently access date-related data for major Meetings, Releases, and Announcements as integer arrays, which can be used in other indicators. Currently, it has support for the following events:

FOMC Meetings
The FOMC meets eight times a year to determine the course of monetary policy. The FOMC's decisions are based on a review of economic and financial developments and its assessment of the likely effects of these developments on the economic outlook.

FOMC Minutes
The FOMC minutes are released three weeks after each FOMC meeting. The minutes provide a detailed account of the FOMC's discussion of economic and financial developments and its assessment of the likely effects of these developments on the economic outlook.

Producer Price Index (PPI) Releases
The Producer Price Index (PPI) measures changes in the price level of goods and services sold by domestic producers. The PPI is a weighted average of prices of a basket of goods and services, such as transportation, food, and medical care. PPI is a leading indicator of CPI.

Consumer Price Index (CPI) Releases
The Consumer Price Index (CPI) measures changes in the price level of goods and services purchased by households. The CPI is a weighted average of prices of a basket of consumer goods and services, such as transportation, food, and medical care. CPI is one of the most widely used measures of inflation.

Consumer Sentiment Index (CSI) Releases
The University of Michigan's Consumer Sentiment Index (CSI) is a measure of consumer attitudes about the economy. The CSI is based on a monthly survey of U.S. households and reflects the consumers' assessment of present and future economic conditions. The CSI is a leading indicator of consumer spending, which accounts for about two-thirds of U.S. economic activity.

Consumer Confidence Index (CCI) Releases
The Consumer Confidence Index is a survey that measures how optimistic or pessimistic consumers are regarding their expected financial situation.

Non-Farm Payroll (NFP) Releases
The Non-Farm Payroll (NFP) is a measure of the change in the number of employed persons, excluding farm workers and government employees. The NFP is a leading indicator of consumer spending, which accounts for about two-thirds of U.S. economic activity.

Release Notes

  • Adjust colors in the legend to update when the events' colors are changed.

Release Notes

Fix issue where the incorrect time was being shown when viewed on the hourly chart.

Release Notes

Fixes issue where daily timeframe was off by an offset of 1.

Release Notes

Implemented a new getUnixTime function and kept the original function as an alternative mechanism for those interested in auditing dates. Performance-wise, the two are near-equivalent, but the newer implementation does a better job handling discrepancies between markets on a daily timeframe.

Release Notes

  • Use the latest data provider library version, which has additional CCI and PPI dates for 2023
  • Add an option for alternative date resolution to fix the issue whereby some charts (e.g., Forex) occasionally appear to be one day off on the daily timeframe

Release Notes

Update to include FOMC Meetings and FOMC Minutes for 2024.
Comments
veryfid
This is great!
DojiEmoji
Thanks for pointing out the issue about timing differences on my version. This is great!
jdehorty
@DojiEmoji Happy to help! For anyone interested in another cool implementation of this indicator, be sure to check out DojiEmoji's script. Instead of using a data provider library, it allows for customization based on an input string of dates that you prepare ahead of time.

tradingview.com/script/E0KaEY2L-Economic-Calendar-Import-from-Spreadsheet/
Trader-Elisa
This is so useful - any chance you can update for 2024 would be very much appreciated! Can't figure it out myself. Thanks :)
jrjain
rrsch
Great script!

Only issue is I get a whitish/greyish horizontal line that flashes across the middle of my screen the the beginning of each candle. Not the end of the world, but kind of distracting also, since I trade the 1m. Are others experiencing this issue?
jdehorty
@rrsch, Thanks for the support! Also, whoah, I definitely haven't experienced that bug before. Out of curiosity is it still happening? I pushed a new update recently and am wondering if that did anything to help.
Crypto_Popat
@jdehorty, also it would be great if we can hide the events that already occurred in the past and only want to see that due in the near future, bcoz the long-term chart will be very mess with the all.
rrsch
@jdehorty, sorry, I think I missed your reply somehow. I still had been experiencing this issue. I've had the indi off my charts for a while, I couldn't get over the white line!
More