phampton,
I don't think there is an Include file to do this as an add-on to other EA's, and it sounds like a great idea, especially if it would read a .csv calendar of dates & times, so the user could just update the .csv file each weekend.
It could be like that COT4Metatrader program where there's a weekly .csv file that gets read from. One could identify for the coming week the times, currencies affected, magnitude of impact, etc. and just read from that.
In the attached picture, I put a dashed line 30 minutes before an opening (I can select US, UK, HK, etc.) and a solid line at opening. You can also put labels. They're easy to do as you probably know better than I do.
Add a variable "AdvanceNotice" or something so say you want it to show up x minutes before the event. You'd need to have a GMT Offset since there are so many different data times from the various vendors.
I've thought about this because I would like to either pull out of open positions or tighten my stop/losses before fundamental/news happens, especially the 'red letter' kind like from the forexfactory calendar (http://www.forexfactory.com/index.php?page=calendar.
You could add Alert screens or shoot off an e-mail to wake you up (or have the option to do that). The COT4Metatrader folks are selling data updates to their free .mq4 for only $5/month.
Just my 2 cents. Been thinking a lot about it myself.
MarkC.
Thanks for the interest and the ideas guys.
I was actually only thinking of creating something fully automatic that is useful for backtesting, by simply flagging typical news release times. Often it will be over-cautious because no news event existed, but better that way than getting run over by the news crowd.
I'll write a function "bool NewsEvent(int nWithinMinutes)" that returns true if CurTime() is nWithinMinutes of a suspected news event.
So you could insert it into any system like this:
// avoid buying if near news event
if (MyBuySignal && !NewsEvent(5)) DoMyBuying();
and
// close all positions if near news event
if (OpenOrders() && NewsEvent(5)) CloseEverything();
The CSV file idea is great for forward testing and live trading, and I'll do that as well in a Version 2.
OK guys, here's the first cut, attached . I've written some instructions into the AvoidTheNewsV0_1.mqh file, so I won't repeat them here.
Looking forward to your comments, and more importantly, some nice short timeframe systems that use it.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
No, it doesn't exist yet, but I thought I would create it if no-one else has.
The idea is this: any automatic system using 1M, 5M and 15M timeframes is ambushed by news events. If your system typically takes only 5 pips then its stoploss will be trampled by a 100 pip adverse move from payrolls! A cautious trader can manually avoid many of these events in real trading by looking at calendars of economic data releases. Why not try to automate this?
We can exploit the fact that many news events occur at very regular times -- eg US events are usually at 8:30am or 10:00am EST. It would be a simple bit of programming to provide a function that any short term system can use to avoid entering trades, and to exit open trades, just before typical news times.
Is this a worthwhile idea, or has it been done before?