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
/
marekfx
Joined on 16.02.2014
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: DailyFxNews.algo
- Rating: 5
- Installs: 11658
- Modified: 13/10/2021 09:55
Comments
Error //#reference: bin\LumenWorks.Framework.IO.dll
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.
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.
They removed .csv file that only available will be .pdf and .xls. Anyone able to converti it into .xls?
Good, someone could help me please, I get the following error, I attach an image, greetings and successes
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.....
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:
Build succeeded, but nothing is showing up neither in the log nor on the screen.
Does the indicator still work?
Hi,
Great indicator but I do not see the parameter options like number of events? Is there an updated indicator?
Thank you,
Neal
Does it still work?
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.
Error //#reference: bin\LumenWorks.Framework.IO.dll
Who do?, help please.Could Not Be Found
Error //#reference: bin\LumenWorks.Framework.IO.dll
Who do?, help please.
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.
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:
I think the timezone calculation is not calculated to include Daylight saving.
Great work!!
Anyone know how to change the time settings for Central Time (US)? Any help would be appreciated!
EXCELLEENT
No issues, very nice. thanks.
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;
}
}
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
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
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
I have downloaded this. Unfortunately, I can't see it on the screen. Any help, please.
@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.
@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.
Additionally I can see on your screenshot it is like this also, 18th of Feburary was not a Wednesday.
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?
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."
07/03/2014 06:57:51.311 | Error #92947061: can not create instance.
What's !?
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
I can compile.
No error out.
However, it does not appear
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.
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)
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