Forex Factory (https://www.forexfactory.com/forum.php)
-   Platform Tech (https://www.forexfactory.com/forumdisplay.php?f=69)
-   -   FF Calendar Indicator for MT (https://www.forexfactory.com/showthread.php?t=19293)

DerkWehler Feb 26, 2007 10:49pm | Post# 1

FF Calendar Indicator for MT
 
1 Attachment(s)
Good day all:

With the generous cooperation of the folks at ForexFactory, I have created an indicator which will tell you how many minutes till the next relevant news event (or two). Normally I peruse the Yahoo MetaTrader_Experts_and_Indicators group, where this has already been posted. But it's only proper that it be posted here as well.

In order to use it, you need to turn on DLL Imports in your Metatrader platform options, because it calls a DLL to get your timezone, as well as another to read the ForexFactory web page to get news information. (Be aware it will write out .XML files to your expert/files folder).

The indicator has settings so you can filter out (or in) news announcements of High, Medium, or Low impact, as well as those with the word "Speaks" in them. You can have it display the minutes till (and info about) the next announcement, or the next two. And you can adjust the colours of the text.

You just apply it to your chart, set your desired options, and it will give you announcement info relating to either currency in the pair on the chart.

The indicator can also be called from within an EA using the iCustom call. By accessing buffer 1, index 0, you can get the minutes until the most recent past event (so minutes will be negative or zero), or by using buffer 1, index 1, minutes until the next news event (positive or zero). If you want to use this feature and need more info, I can post a more detailed sample.

Enjoy,
-Derk


EDIT: The latest version of FFCal is here now in Post #1. I will try to keep it that way, so you can always have the latest. NOTE: FFCal doesn't have a version number in the name anymore. I keep it on a revision control system. If you want to know what "version" it is, open (edit) the file and look at line 8. The text you'll see will look like this:

$Revision:: 20

So yes, at the time of this edit, it is revision (version) 20. See post #400 for details.

-Derk

FFCal.mq4

merlin Mar 1, 2007 2:58pm | Post# 2

has anyone implemented this yet? im very interested to hear feedback! and if youd be so kind as to post some screenshots of the indicator in action, for us none MT users, that would be very kind of you

smjones Mar 1, 2007 3:32pm | Post# 3

1 Attachment(s)
has anyone implemented this yet? im very interested to hear feedback! and if youd be so kind as to post some screenshots of the indicator in action, for us none MT users, that would be very kind of you
Here is what it looks like. I will test it on the next news event.. It seems very cool.
Name:  news graph gbp.gif
Views: 95447
Size:  20 KB

merlin Mar 1, 2007 3:45pm | Post# 4

very cool! thanks man!

smjones Mar 1, 2007 3:58pm | Post# 5

And here is the documentation that was embedded in the code.
//=============================================================================
// FFCal_v01.mq4
// Copyright 2006, Derk Wehler
// Written in cooperation with: http://www.forexfactory.com
//
//
// This "indicator" calls DLLs to fetch a special XML file from the
// ForexFactory web site. It then parses it and writes it out as a .CSV
// file, which it places in the folder: experts/files so that IsNewsTime()
// can use that file to tell if it is near announcement time.
//
// It does this once when it starts up and once per hour in case there have
// been any updates to the annoucement calendar.
//
// In order for this to work correctly and synchronize with your broker's
// server time, you must enter the proper value for "TimeZone". This is
// entered relative to GMT. For example, my broker's server time is GMT+1,
// so I have the default set to 1. If your broker uses GMT+3, enter 3.
// If your broker uses GMT-2, then enter -2.
//
//
//
//=============================================================================
// OTHER CREDIT DUE
// (For GrebWeb and LogUtils functionality (see end of this flie)
//
// 2/14/2007: Robert Hill added code for using text objects instead
// of Comment() for easier reading
//
// 2/25/2007: Paul Hampton-Smith for his TimeZone DLL code

DerkWehler Mar 2, 2007 4:27am | Post# 6

// In order for this to work correctly and synchronize with your broker's
// server time, you must enter the proper value for "TimeZone". This is
// entered relative to GMT. For example, my broker's server time is GMT+1,
// so I have the default set to 1. If your broker uses GMT+3, enter 3.
// If your broker uses GMT-2, then enter -2.
Oh... right. The quote text above is inaccurate. On version 3 I made it auto-detect your broker's time zone.

the author,
-Derk

ranlee Mar 3, 2007 4:24pm | Post# 7

nice........
 
this is very helpfull, thanks man..

amenlo9 Mar 4, 2007 1:14am | Post# 8

thank you!!i been searching it for long time!

WHTenn Mar 4, 2007 3:27am | Post# 9

Great Indicator...I put this on all of my charts.

Thank you for sharing!

Why Oh Why Mar 4, 2007 4:45am | Post# 10

Thanks Derk!
 
It looks great. I'll use it.

amenlo9 Mar 5, 2007 10:14am | Post# 11

i tried but nothing come out.what wrong huh?

incomeideas Mar 6, 2007 12:03am | Post# 12

Hi Derk,

Thanks for this useful tool.
How can i shift the display to the right side of the screen ?

cheers.

DerkWehler Mar 6, 2007 5:59am | Post# 13

i tried but nothing come out.what wrong huh?
I've no idea. Can you tell me what chart you put it on (currency and timeframe) and approx. when?

-Derk

DerkWehler Mar 6, 2007 5:59am | Post# 14

Hi Derk,

Thanks for this useful tool.
How can i shift the display to the right side of the screen ?

cheers.
You cannot at present. A new version will be released soon though which has that feature.

-Derk

incomeideas Mar 6, 2007 6:10am | Post# 15

You cannot at present. A new version will be released soon though which has that feature.

-Derk
sure, i'll wait for it.
thanks alot.

amenlo9 Mar 6, 2007 7:14am | Post# 16

I've no idea. Can you tell me what chart you put it on (currency and timeframe) and approx. when?

-Derk
i put it on cable 5M chart with all default parameters.nothings come out before news

Freewheelin Mar 6, 2007 7:16am | Post# 17

This is a very useful tool. It works fine for me. THANK you so much for sharing and the work!

Yannis Mar 6, 2007 8:02am | Post# 18

1 Attachment(s)
i put it on cable 5M chart with all default parameters.nothings come out before news
Check the 1st Tab Page of the Indicator, and verify that both checkboxes are ticked (see picture attached)
Name:  1.png
Views: 44760
Size:  4 KB

smjones Mar 6, 2007 8:11am | Post# 19

1 Attachment(s)
You must also have them selected in the tools section at the top of the menu for MT4 under options.
Name:  ScreenHunter_023.gif
Views: 45289
Size:  23 KB

Yannis Mar 6, 2007 8:49am | Post# 20

1 Attachment(s)
You must also have them selected in the tools section at the top of the menu for MT4 under options.
Well, in that case i would suggest setting these parameters as per the picture below.
I don't think you want to confirm every DLL call, and also having the 'Disable Experts.......' checked, will make the EA reset to its hard coded default settings, loosing any change you may have made to the EA's parameters each time the ea initializes itself (which happens a lot and under various circumstances). This causes more often than not to run EA's with what we think to be the new parameters, but in reality it runs on its default - internally coded - settings.
Just a friendly advice.
Name:  1.png
Views: 44810
Size:  7 KB


© Forex Factory