Category Other  Published on 06/04/2014

News - DailyFx Economic Calendar

Description

[Update V7] This indicator displays a list of upcoming economic news as published on DailyFx website.

Parameters

  • ShowLow - show low priority events
  • ShowMedium - show medium priority events
  • ShowHigh - show high priority events
  • EventsToDisplay - number of events to display
  • SymbolFilter - filter events by current symbol - eg for EURUSD show news for either EUR or USD currency
  • [NEW V2]Position - static position of upcoming news (0 = top left, 1 = top right, 2 = top center)
  • [NEW V2] ShowPastNews - display past news
  • [NEW V3] PastNewsLookback - look back in weeks - how many weeks worth of data should be loaded, eg set to 4 will load calendar for the past month
  • [NEW V4] Datetime filtering bugfix + added more logging
  • [NEW V5] Set Access Rights to AccessRights.Internet
  • [NEW V6] Recompiled for cAlgo 1.19. This should fix issues with loading System.Data dll.
  • [NEW V7] Performance improvement - csv files for past news are cached in temp folder

Important

Some of the data released by Markit is available two minutes earlier on Reuters.

For instance, this is a bid/ask chart for GBPUSD, UK Construction PMI released on 3th Feb 2014 9:28 (this chart is not part of the indi)

 

Build instructions:

This indi requires following references:

  • System.Data.dll, located in
    • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
    • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
    • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5
  • LumenWorks.Framework.IO.dll - can be downloaded from http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader 

 


/

MA
marekfx

Joined on 16.02.2014

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: DailyFxNews.algo
  • Rating: 5
  • Installs: 11666
  • Modified: 13/10/2021 09:55
Comments
Log in to add a comment.
MA
madelinerpresley · 2 years ago

This coding is quite long, but those who have time to study it can easily get out of it, I don't have any time these days :(  basketball legends

TG
tgjobscv · 5 years ago

Error  //#reference: bin\LumenWorks.Framework.IO.dll

JO
joyider · 6 years ago

@[Shulya] The Lists need to be initialized prior to usage

This indicator can be replaced with NRE cbot. Trading can be disabled in settings, and the cbot will act as an indicator showing news on the chart

SH
Shulya · 6 years ago

Does anybody has the solution to this error: 

Crashed in Calculate with NullReferenceException: Object reference not set to an instance of an object.

P.S Indicator compiles without errors and references has been updated to the new cAlgo format.

 

FX
fxclicker · 7 years ago

arjuliocesarfx  - create C:\Users\<your username>\Documents\cAlgo\Sources\Indicators\bin and put the LumenWorks.Framework.IO.dll, but still will not work as DailyFX removed .csv file.

FX
fxclicker · 7 years ago

They removed .csv file that only available will be .pdf and .xls. Anyone able to converti it into .xls?

arjuliocesarfx's avatar
arjuliocesarfx · 7 years ago

Good, someone could help me please, I get the following error, I attach an image, greetings and successes

https://ibb.co/jFw1tk

EZ
ezablo · 7 years ago

I get Access Denied after 

trying to download...

04/09/2017 08:47:18.890 | Downloading http://www.dailyfx.com/files/Calendar-09-03-2017.csv

Error 403

Sorry, permission to the requested page has been denied.

Do i need to register to web site? I did not see any registeration in web site.....

BE
BeardPower · 7 years ago

Yes, the indicator still works fine.

There is no need to make big changes like @itaiophir suggested.

Just replace the line 374:

var month = DateTime.ParseExact(dateTab[1], "MMM", null).Month;

with

var month = DateTime.ParseExact(dateTab[1], "MMM", CultureInfo.InvariantCulture).Month;

Addionally, change the legacy references to the updated method:

/forum/whats-new/2713

CR
croucrou · 8 years ago

Build succeeded, but nothing is showing up neither in the log nor on the screen.

 

Does the indicator still work?

NE
nealkaplan · 8 years ago

Hi,

Great indicator but I do not see the parameter options like number of events? Is there an updated indicator?

Thank you,

Neal

 

whis.gg's avatar
whis.gg · 9 years ago

Does it still work?

DE
deansi · 9 years ago

if youre trying to recompile it,

you will need to install microsoft visual studio, its free though. It has the lumenworks stuff installed inside by default.

33
3333 · 9 years ago

Error  //#reference: bin\LumenWorks.Framework.IO.dll

Who do?, help please.Could Not Be Found

33
3333 · 9 years ago

 

Error  //#reference: bin\LumenWorks.Framework.IO.dll

Who do?, help please.

DE
deansi · 9 years ago

I just checked into it further, the .csv file that comes form dailyrx only has the data till monday in it, (normally the whole week?)

They have a .xls format format available tho, not sure if that is a replacement for the .csv file? so the code may need some updating.

DE
deansi · 9 years ago

This indicator has been working fine until a couple of days ago,

now still shows past news till 2nd March 2015, after that no vertical lines showing new events since monday, and no list which was normally in the top left corner, I have the filtering switched off also just to show all calendar events, but still nothing, attached screenshot, hope its viewable:

http://icmarkets.ctrader.com/c/Zbfwn

TE
terryxsq · 9 years ago

I think the timezone calculation is not calculated to include Daylight saving.

RA
randallwood · 9 years ago

Great work!!

Anyone know how to change the time settings for Central Time (US)?  Any help would be appreciated!
 

MI
MILAD-26 · 10 years ago

EXCELLEENT

J0
j0hnth0m · 10 years ago

No issues, very nice. thanks.

IT
itaiophir · 10 years ago

Hi,

for anyone who has the problem i had, you can replace the below function with the below script. that should do the work.

         private DateTime GetDateTime(DateTime fileDate, string dateStr, string timeStr)
        {
            try
            {
                string strDateStarted = dateStr + " " + timeStr + " 2014";
                DateTime result;


                DateTime.TryParseExact(strDateStarted, new string[] 
                {
                    "ddd MMM dd HH:mm yyyy"
                }, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out result);

                return result;
            } catch (Exception e)
            {
                _logger.Log("Error parsing datetime {0} {1} {2}", fileDate, dateStr, timeStr);
                _logger.Log(e.Message);
                throw;
            }
        }

TI
tilo10 · 10 years ago

How can I fix these errors ,,

Error CS0006: Metadata file 'c:\windows\microsoft.net\assembly\gac_64\system.data\v4.0_4.0.0.0__b77a5c561934e089\system.data.dll' could not be found

Error CS0006: Metadata file 'c:\users\mubarak\documents\calgo\sources\indicators\bin\lumenworks.framework.io.dll' could not be found

ER
Ermisl · 10 years ago

itaiophir

I am getting the same error.

Had any luck in solving it yet?

IT
itaiophir · 10 years ago

Hi Mark,

And thanks for this, but - i'm getting this error on the log:

"07/06/2014 12:33:31.483 | Error parsing datetime 08/06/2014 12:33:30 Sun Jun 8 "

I looked on the file downloaded form the site, and all the dates are like that ("Sun Jun 8 ").

I'm guessing, this is probably a problem with the date format. Any idea??

 

thanks,

Itai

 

MA
marekfx · 10 years ago

hi kestkam,

do you see anything in the cAlgo log window? It should print something like this:

17/02/2014 23:02:19.643 | Offset: 00:00:00
17/02/2014 23:02:19.658 | DST: False
17/02/2014 23:02:19.690 | 158 events loaded

kestkam's avatar
kestkam · 10 years ago

I have downloaded this. Unfortunately, I can't see it on the screen. Any help, please.

 

MA
marekfx · 10 years ago

@Elogos, thanks for the bug report, it's fixed now in V4.

@st0424, looks like there is a problem with Japanese date time parsing. The new version has additional logging so can you give it a try and post detailed error logs.

MA
marekfx · 10 years ago

@Elogos, thanks for the bug report, it's fixed now in V4.

@st0424, looks like there is a problem with Japanese date time parsing. The new version has additional logging so can you give it a try and post detailed error logs.

EL
Elogos · 10 years ago

Additionally I can see on your screenshot it is like this also, 18th of Feburary was not a Wednesday.

EL
Elogos · 10 years ago

Marek,

I love the effort, thanks.

 

I can't seem to get today's economic news to show, it always shows tomorrow.

My time in cTrader is set to UTC and the indicator is set to UTC as well.

Any Ideas?

 

ST
st0424 · 10 years ago

17/02/2014 23:02:19.643 | Initialising
17/02/2014 23:02:19.643 | TimeZone Setting: UTC
17/02/2014 23:02:19.643 | TimeZone Name: UTC
17/02/2014 23:02:19.643 | Offset: 00:00:00
17/02/2014 23:02:19.658 | DST: False
 

Messages such as the following may appear on this below. 


Japanese 
"文字列は有効なDateTimeではありませんでした" 

English translation 
"String was not a valid DateTime" 

Japanese 

"07/03/2014 07:06:23.637 | Crashed in Calculate with NullReferenceException: オブジェクト参照がオブジェクト インスタンスに設定されていません。"

English translation 
"07/03/2014 07:06:23.637 | Crashed in Calculate with NullReferenceException: Object reference not set to an instance of an object."

 

 

ST
st0424 · 10 years ago

07/03/2014 06:57:51.311 | Error #92947061: can not create instance.

What's !? 

MA
marekfx · 10 years ago

Do you have anything in the log tab? It should print something like this:

17/02/2014 23:02:19.643 | Initialising
17/02/2014 23:02:19.643 | TimeZone Setting: UTC
17/02/2014 23:02:19.643 | TimeZone Name: UTC
17/02/2014 23:02:19.643 | Offset: 00:00:00
17/02/2014 23:02:19.658 | DST: False
17/02/2014 23:02:19.690 | 158 events loaded

ST
st0424 · 10 years ago

I can compile. 
No error out. 
However, it does not appear

MA
marekfx · 10 years ago

Try to update #refernce of System.Data.dll to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll . You will also need to download and update location of LumenWorks library.

ER
ErikD · 10 years ago

Hmm, I get this 

Error CS0012: The type 'System.Data.IDataReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Anyone know how to fix this? (googled it but to luck there)