TradingView
jdehorty
12 Okt 2022 pukul 17.46

EconomicCalendar 

Ethereum / TetherUSBinance

Deskripsi

Library "EconomicCalendar"
This library is a data provider for important dates and times from the Economic Calendar.

events()
  Returns the list of dates supported by this library as a string array.
  Returns: array<string> : Names of events supported by this library

fomcMeetings()
  Gets the FOMC Meeting Dates. The FOMC meets eight times a year to determine the course of monetary policy. The FOMC announces its decision on the federal funds rate at the conclusion of each meeting and also issues a statement that provides information on the economic outlook and the Committee's assessment of the risks to the outlook.
  Returns: array<int> : FOMC Meeting Dates as timestamps

fomcMinutes()
  Gets the FOMC Meeting Minutes Dates. The FOMC Minutes are released three weeks after each FOMC meeting. The Minutes provide information on the Committee's deliberations and decisions at the meeting.
  Returns: array<int> : FOMC Meeting Minutes Dates as timestamps

ppiReleases()
  Gets the Producer Price Index (PPI) Dates. The Producer Price Index (PPI) measures the average change over time in the selling prices received by domestic producers for their output. The PPI is a leading indicator of CPI, and CPI is a leading indicator of inflation.
  Returns: array<int> : PPI Dates as timestamps

cpiReleases()
  Gets the Consumer Price Index (CPI) Rekease Dates. The Consumer Price Index (CPI) measures changes in the price level of a market basket of consumer goods and services purchased by households. The CPI is a leading indicator of inflation.
  Returns: array<int> : CPI Dates as timestamps

csiReleases()
  Gets the CSI release dates. The Consumer Sentiment Index (CSI) is a survey of consumer attitudes about the economy and their personal finances. The CSI is a leading indicator of consumer spending.
  Returns: array<int> : CSI Dates as timestamps

cciReleases()
  Gets the CCI release dates. The Conference Board's Consumer Confidence Index (CCI) is a survey of consumer attitudes about the economy and their personal finances. The CCI is a leading indicator of consumer spending.
  Returns: array<int> : CCI Dates as timestamps

nfpReleases()
  Gets the NFP release dates. Nonfarm payrolls is an employment report released monthly by the Bureau of Labor Statistics (BLS) that measures the change in the number of employed people in the United States.
  Returns: array<int> : NFP Dates as timestamps

Catatan Rilis

v2

Added additional 2023 release dates for CPI and PPI

Catatan Rilis

v3 - Update FOMC Meetings and FOMC Minutes for 2024
Komentar
OddLogic1618
Thanks for the data!
Trackback link: tradingview.com/script/mEE1dDYA-Odd-mod-Econ-Calendar/
William_FTMO
Hello this is awesome I was wondering from which website/link were you importing the data from? (i would love to look around that website)
Kobe824
Can you add Core Retail too? That's also a high gamma event to track!
TheBastian999
Amazing job!
siw36
Thanks for updating ✌️
benjaminbarch
FYI, the time is off by an hour this week in the USA because the dates for this week seem to be defined with EST time when in fact the clocks changed in the USA and the dates this week should be EDT. Not a huge deal as it will essentially self correct next week moving forward, but I was trying to figure out why the line on my chart shows at 9:30 CPI today when it actually happened at 8:30. Love the indicator. Great work!
t5674
Hi, thanks for coding this. I'm having a hard time trying to include this into my strategy. How can one check if a day is within this arrays using Pine? Thank you
YagoLega
Hi @t5674,
Time functions returns integer values (UNIX Time), you just have to sum or subtract the integers to know if a date is exactly the same or a future/past one.
You can go throw the dates in a loop and subtract the date in the array with the one you want to check, if subtract is 0 you have a match.
if you want to check the whole day you have to consider a day will be a wide range of values in milliseconds.
jdehorty
@t5674 The process described by @YagoLega is spot on: treat all of the date arrays as integer arrays. For an example of subtracting with Unix Time, you can check out the "getUnixTime" function in this indicator, which uses this library: tradingview.com/script/HLYDwa0N-Economic-Calendar-Events-FOMC-CPI-and-more/
Lebih lanjut