Examples: Displaying a News Calendar - page 2

 

Does anyone else get this "error"

Fundamental_Trader_DailyFX_MQL4_v0.04: handle 2 does not exist in FileClose .... and how to fix ??

Thanks

 

If you don't want to install GetRight for downloading .csv files then you can use url2disk.exe .

This is a free tool, a standalone .exe, it doesn't needs to be installed, just put in a directory of your wish and call it from mql.

You can download it from here: http://www.blocsoft.com/fwMore.asp?Title=url2disk

Or you can use this Visual Basic Script (but I don't know if winexec can run it or not) : http://www.robvanderwoude.com/vbstech_internet_download.php

Of course the script must be modified (url and destination) in order to be used here.

 
c0d3:
This is a great indicator, i modified it to become an EA, and now, it waits for the news to come out then it trades it. When the actual news data is released, the EA compares the actual data either to the forecast data or the previous data, calculates percent change, then enters the trade. Also, the EA trades every country that is supported on Dailyfx.com. Thx, for creating this awesome indicator and this awesome article.
hi c0d3, I'm new to programming MT4 and was wondering if you'd like to share your modified EA?
 

this did not work for me. I can't figure out what I did wrong or if I missed a step. also there was no folder named html under files so I made one

to see if it would work but to know avail that isn't the problem.

 

You can also use wget.exe to get the file. There is a windows version of it.


http://users.ugent.be/~bpuype/wget/

 

What I understand from the code, it doesn'@ take into account the GMT + factor within itself. I mean, if the terminal time is different from the GMT, then the plotting of the lines will be erroneous. Am I wrong?

Edit: Yep, I was wrong. It actually gets it. Guess GMT function is for this purpose. It works well.

 

You can add an additional if clause for just showing important events. (this will decrease the amounf of objects drawn) For example, create an external variable, like extern int ShowImportance = 0 (for 0 =low, 1 = medium and 2 = high) and put the drawing object code part into an if clause for drawing just high importance level events or else.

Edit: Here's code.

add these externals to the top

extern bool showHighImportance = true;
extern bool showMediumImportance = true;
extern bool showLowImportance = true;

and add these code to where ObjectCreate functions begin

if((showHighImportance == true && stImportance == "High")||(showMediumImportance == true && stImportance == "Medium")||(showLowImportance == true && stImportance == "Low"))
{
ObjectCreate("CalendarText"+i, OBJ_TEXT, 0, Date, Close[0]);
ObjectSet("CalendarText"+i, OBJPROP_COLOR, c);
ObjectSetText("CalendarText"+i, stDate + " : "+ stDescription, 8);
ObjectSet("CalendarText"+i, OBJPROP_ANGLE, 90);


ObjectCreate("CalendarLine"+i, OBJ_VLINE, 0, Date, Close[0]);
ObjectSet("CalendarLine"+i, OBJPROP_COLOR, c);
ObjectSet("CalendarLine"+i, OBJPROP_STYLE, STYLE_DOT);
ObjectSet("CalendarLine"+i, OBJPROP_BACK, true);
ObjectSetText("CalendarLine"+i, stDescription, 8);
}

Writing an EA out of it is simple as well. Just add three buffer for each importance level, and fill them with proper info (true or false might be) and get info with iCustom function. In an If Clause you can check the state of High Importance Level Event status, and you may prefer not get into any trade fo that bars.

Sorry for my bad English. And very very thanks for that old but very important, helpful article.

 
Great trading tool 10 out of 10....

I understand this thread is dead now but fingers crossed there still might be someone that maybe able to help...
I would like this indicator to use a separate window, can this be done and also could it be possible to display a box
with the information of the news when you pass the mouse pointer over the news line as some of the description is doubled up..


Thanks
Rod.
 
Good work. I tried this on my laptop and it works.

However, I have some concerns regarding the usage of the GetRight software as it is trial version.

I will spend some time this weekend to modify the code in order to use other free download software eg Orbit etc

Other than that, I am looking into possibility so give user a selection to display what currency news on the chart, eg only EUR and USD news on EURUSD chart etc

Thanks the author for this great inidicator. It helps the user to trade on news.

Before the news, we can set pending sell stop and pending buy stop.




From
erekit
http://100k2.blogspot.com
 
I have done the modification on the code to allow selection on currency. At the user input, choose the currency news you would like to display on chart

Thanks the idea from 2010.03.12 18:39 korhan.x

You can download the file and use it. I didn't add the importance level selection as I feel it is not important to do so.

Next -> work to change the download tool from GetRight (free trial but need to buy ) to other free download tool


Thanks

From
erekit
http://100k2.blogspot.com
Reason: