News Trader EA

To add comments, please log in or register
Sergey Golubev
Moderator
110775
Sergey Golubev  

This is News Trader EA created by Igorad.

Besides, we may use this EA to draw the lines with text on the chart when the news coming.

Explanation of the settings and how to use this EA you may find in the next posts.

----------------------------------------------

Version 2.

- Please find attached the version of NewsTrader_v2 EA..

Version 3.

- Please find attached new NewsTrader_v3 version.

- Please find text file for the next week (from 14th till 21st of January). This text file will be updated weekly so check this post every week.

Changes in NewsTrader_v3 version:

- FridayEnd option was added: to close the trades in Friday earlier.

- StopTrade option was excluded from the settings.

- Money management. LossMax is 1000 by default value. But if LossMax=0 so we can trade with %MaxRisk of Balance and in this case (in case of LossMax=0 MaxRisk is % from Balance). So we have two kind of Money management: % from Balance and usual "lot increasing/decreasing depends on the profit or loss".

- SessionEnd value was changed depending on timeframe. For example, if we are trading on M5 timeframe and SessionEnd=24 so EA will close the order at 23:55. Thus EA will take into consideration our timeframes bar. It will help us to avoid some errors.

- all the orders (opened and pending) from last news event will be closed before placing new pending orders. So we can trade many news in a day. We even can trade all the news.

- if EA places one perding order instead of two so this one order will be closed. It will reduce the risk of using this EA during some errors or disconnection.

Version 4.

- Please find the version of NewsTrader_v4 EA.:

Currency and rating filters were added.

Version 5.

- Please find the next version of NewsTrader_v5 EA:

hedge and trailing of opposite orders were added according to to chrisstoff's idea.

Version 6.

- Please find EA (version #6), example of forex calendar in text file and SetsFile.

- this version is having possibility of input of external (different) settings for each type of news. Set you setting in SetsFile. Last number in text calendar is number of the settings.

---------------------------------------

Version 5.1

No need any text file anymore!

Please find new version in NewsTrader51_webget.zip file. This version is taking the news directly from our calendar Forex-Tsd Calendar :: Calendars

How to install:

- place EA (NewsTrader_v5.1) to \experts folder;

- place .mqh file (WebGet) to \experts\include folder;

- place .dll file (WebGet.dll) to \experts\libraries folder.

Settings.

The settings are the same as for Version #5. Only differencies are CalendarID.

CalendarID is the number of calendar in our forex-tsd tool here Forex-Tsd Calendar :: Calendars

CalendarID=4 is my calendar. Or you may registre here and create your own calendar with your own ID and trade yours.

Read this post to know which version/settings are the best and why.

Version 5.3

Two kinds of the settings are attached.

- Currency and Rating filters are improved;

- fixed next news in comments on the chart;

- added Previous news in comments;

- calendar file is created with name, which contain start date of current week.

- 5.3 version with 5 digits broker: this post.

- NewsTrader_v5.3_ecn EA is on this post. It is ecn/stp version of this EA with auto digit for broker's price.

- NewsTrader_v5.3_ecn+mafilter EA is on this post. With this Ea you would just have it place the orders 50 pips from when the news happens with Ma as a trend confirmation.

Version 5.5 with ECN Mode

- ECN Mode is added: Istant Orders Execution with modification of SL and TP instead of pending orders.

- Straddle Mode is added: it means that we have possibility to open orders in different directions if ECN Mode = true. This option works only with brokers which allow hedge.

- EA is on this post, settings example is on this post.

NewsTrader_v5.8 EA is on this post. Some new options:

-works without WebGet.dll on almost all Windows versions(Vista, 7 and others)

-improved Calendar view

-added China events (CNY)

-improved Trailing Stop and BreakEven agrorithm with Stepped Trailing Stop

-ECN and Straddle mode

-new display options

----------------------------------------

Explanation of the settings.

https://www.forex-tsd.com/forum/exclusive/5062-news-trader-ea#comment_122317

Please note: after placing the new text file or updating this file you need to restart Metatrader with attached EAs (or re-attach EAs) to initialize them.

explanation and how EA works:

- https://www.forex-tsd.com/forum/exclusive/5062-news-trader-ea#comment_122317

- https://www.forex-tsd.com/forum/exclusive/5062-news-trader-ea#comment_122319

Please note: discussion about settings are still going on.

----------------------------------------------

More detailed explanation about what to do step by step:

- download EA, text calendar file and text SetsFile (for version 6).

- change the time in text time according to your broker time. Change the settings for every type of news (for version #6). I am GMT time (DST off) in text file.

- place file in /file folder in MetaTrader's directory, for example:

C:\Program Files\MetaTrader4\experts\files (for trading)

and

C:\Program Files\MetaTrader4\tester\files (for backtesting)

- place EAs in /experts in MetaTrader's directory of your computer, for example:

C:\Program Files\MetaTrader4\experts.

- change name of text file in EA: open EA in MetaEditor, change name of text file according to your text file and compile EA.

- you may use different settings just to select the better ones. Or use your own settings and pairs and so on. Besides you may do your own text file see this thread about how to make it). In this case use different magic numbers as well. You may trade NFP only (once per months), or follow my text file/settings. Or trade all or some particular economoc indicator you want.

----------------------------------------------

ForexTSD_Calendar_v1.5 indicator with currency and ratings filter, with autodetection of Time Zone and with read-calendar-correctly bug fixed is here;

ScheduleTrader EA:

everything is on this public thread.

ForexTSD_Calendar_v1.5 fiboindicator with pivots and some comments is on this post;

ForexTSD_Time indicator will help to know GMT time; it is on this post.

FXstreet_Calendar_v2 indicator is on this post.

---------------

NewsTrader_v6a EA is on this post. It is improved version #6 with the auto 5 digit code added.

Sergey Golubev
Moderator
110775
Sergey Golubev  

Explanation of the settings:

Magic = 33333[/CODE]

every EA/chart should have different magic number. If you will use my pre-set files so you do not need to change it (I am using different magic number for different pairs). But nasicly you need to use different magic number (any number) for every chart you are attaching EA to).

Slippage = 6[/CODE]

I am not changing it.

CalendarName = "CalendarNFP07ja.txt"[/CODE]

It is the name of text file. This name should be the same with name of the file you are using. What is text file? It is forex calendar. This text file will be updated every week so you may use my file. This text file is having the following format:

2007.01.31;20:15;USD;Rate Decision;3;[/CODE] where

- 2007.01.31 is date;

- 20:15 is time according to your broker's server time Iread first post of this thread for more explanation);

- USD is currency of the news;

- Rate Decision is name of the news;

- 3 is rating of the news: most significant news is having rating 3, not very important news - 1.

Lots = 0.1; // Lot size[/CODE]

Lot size. You may change it for your own desirable lot size if you are not using Money Management 9MM). Or kkep it like this if you are using MM

StopTrade = false; // Stop of Trade switch[/CODE]

Some versions are having this parameter. But in most recent versions we do not have it. If StopTrade = true so EA will not trade at all. Why do we need it? because this EA is drawing the lines and text nefore the news. See the images attached. So if we want to see the text only before news coming so we may switch StopTrade to true.

TimeZone = 0; // Difference between server time and local time[/CODE]

It is very important setting. To make the explanation shorter it is the following: if the time in txt file (see post above) is on your broker time so keep this TimeZone = 0. We have the time in txt file (posted above) as GMT. So if you are trading on this broker's time you do not need to change anything. If you are using the ther broker you should set this time according to your broker time (GMT, or GMT +2 for example).

TimeGap = 5; // Time Gap between News Time and Order Open Time in min[/CODE]

It is the time in minutes. For example, two the pending orders will be placed 5 minutes before the news. It is changable of course.

OrderDuration = 15; // Order Duratiton Time in min[/CODE]

Time to live for pending orders. For example: EA placed two pending orders 5 minutes before the news: buy stop and sell stop orders. If no one order was opened so those 2 pending orders will be deleted after 15 minutes. Changable of course.

SessionEnd = 24; // Session End Time

FridayEnd = 23; // Session End Time in Friday[/CODE]

It is some kind of timefilter: EA will open the orders up to SessionEnd time (FridayEnd in Friday because Friday's session is closing earlier) but all opened orders will be processed/trailed all the time.

If order was opened so this order may be closed:

- in profit according to take profit value;

- in loss according to stop loss value/trailing stop;

- before next news (please note: all opened orders will be closed before next news trading!)

- at SessionEnd time or FridayEnd time if profitable.

OrdersNum = 3; // Number of pending orders from one side

It is how many perding orders will be opened on one side. For example, if OrdersNum = 3 so it will be opened 3 buy stop orders and 3 sell stop orders at the time.

[CODE]PendOrdGap = 10; // Gap for Pending Orders from current price in pips

It is the distance between the price and pending order price. For example: if current price is 1.9550 for example and PendOrdGap=10 so EA will open buy stop order at the price 1.9560 and sell stop order 1.9540. Recopmmended value is 10 and 20. PendOrdGap = 20 is less risky for trading and may be used during NFP trading.

[CODE]OrdersStep = 10; // Step between orders in pips

In our example: if OrdersNum = 3, PendOrdGap = 10 and OrdersStep = 10 so EA will open 3 buy stop orders and 3 sell stop orders and the distance between the price the first order will be PendOrdGap (10) and the distance between pending orders' price will be OrdersStep (10 for example).

[CODE]DelOpposite = 0; // Switch of orders deleting: 0-off,1-on

Please note: all unused orders will be deleted after OrderDuration time (after 15 minutes by default). It may be sell stop and buy stop orders opened in opposite side. But if we want to delete opposite pending orders immediately after real order open so we may use DelOpposite = 1.

For example: EA opened 3 sell stop orders and 3 buy stop orders and one bbuy stop order was executed (buy position was opened). So we got the following: 2 buy stop orders, one real buy order and 3 sell stop orders. So if DelOpposite = 0 so all those 5 unused pending orders will be deleted after OrderDuration time. If DelOpposite = 1 so 3 sell stop orders (3 unused orders) will be deleted immediately after EA will open real buy, and the rest 2 buy stop orders will be deleted after OrderDuration time.

Just use text file from the post #1 to backtest this EA in visual mode in Metatrader to understand this settings.

[CODE]TrailOpposite = 1; // Trailing of Opposite Orders: 0-off,1-on

If we use DelOpposite = 0 so we may have the following: EA may open buy for example but sell stop orders will not be deleted. Hedge. And if retraicement the opposite orders may be opened as well. And this opposite orders will be trailed (stop loss will be moved by trailing stop) if TrailOpposite = 1.

TakeProfit = 100; // Take Profit in pips

TrailingStop = 10; // Trailing Stop in pips

InitialStop = 30; // Initial Stop in pips

Usual take profit, stop loss and trailing stop for all the orders.

BreakEven = 0; // Breakeven in pips

It is breakeven option. Example: if BreakEven =10 and EA open buy at 1.9550 so price may go up to 10 pips (1.9560) and stop loss will be moved to initial price 1.9550 and EA will continue trailing stop loss in usual way. If BreakEven = 0 so this option is not used: trailing stop will start to move stop loss from already defined value (InitialStop).

[CODE]DisplayLine = false; // Display Line Option (Visualization mode)

DisplayText = false; // Display Text Option (Visualization mode)

If true so EA will draw the lines and text on upcoming news.

[CODE]cFilter = " Currency Filter ";

USD = true;

EUR = true;

GBP = false;

JPY = true;

AUD = false;

CAD = false;

CHF = false;

NZD = false;

It is currency filter: if you attach EA to EURUSD chart and do not want to trade the enws for AUD currency (mentioned in text file) so use AUD = false.

[CODE]rFilter = " Rating Filter ";

MaxRating = 3;

MinRating = 2;

It is news rating filter (see text file explanation). With this settings EA will trade news starting from rating 2. If we want to trade 3 rated news only so we should set MaxRating = 3 and MinRating to 3 as well.

I am not recomment you to trade all the news mentioned in text file (MinRating=1 and MaxRating=3) if you are using grid trading (OrdersNum > 1 and DelOpposite = 0).

[CODE]MM = false; // ММ Switch

MMRisk = 0.15; // Risk Factor

LossMax = 1000; // Maximum Loss by 1 Lot

Money management (MM). If you are not using MM so switch MMRisk to 0 (zero). See post #1 for more explanation.

Files:
news1.gif 17 kb
news.gif 18 kb
Sergey Golubev
Moderator
110775
Sergey Golubev  

Text files.

This EA is using text file.

For backtesting you should place this txt file to this folder C:\Program Files\MetaTrader4\tester\files

For forward testing (demo or real trading) the txt file should be in C:\Program Files\MetaTrader\experts\files

We may backtesting EA using the files from the post #1.

It is exactly what I am doing now

But we should write our own files for the January 2007 for example. Using this website (rating = 3 is red color) http://www.forexfactory.com/index.php?page=calendar&s=&week=&timezoneoffset=&month=12&year=2006 or some other websites with news.

It is not difficult.

And do not forget to set the time for the news (in news website and in text file as well) according to your broker time. And in this case TimeZone is 0 by default.

Chrisstoff
524
Chrisstoff  

News Reader

Hi Newdigital,

There is an application posted to Forex Factory forum that - I think - is able to convert FF calendar to .csv file. Do you think that application can be combined with or implemented into NewsTrader_v2 EA? That would make the process and the operation of the EA fully automatic.

Happy New Year!

Sergey Golubev
Moderator
110775
Sergey Golubev  
chrisstoff:
Hi Newdigital,

There is an application posted to Forex Factory forum that - I think - is able to convert FF calendar to .csv file. Do you think that application can be combined with or implemented into NewsTrader_v2 EA? That would make the process and the operation of the EA fully automatic.

Happy New Year!

May be ...

But you know ... It may be difficulties:

- Forexfactory is different forum.

- Besides Igorad's NewsTrader_v2 is the first version of this kind of EA. Igorad PM'ed to me that he wants to improve/develop this EA more and waiting for the some ideas. He is ready to program more improved versions.

- and as you know there are many News Traders EAs selling on ebay and on the other forums. Igorad's NewsTrader_v2 is the first such a kind of EA which is free one (well, almost free, let's say, because everything which is hidden will be free anyway you know).

So I think we should have our forex calender. We did not develop any fundamental indicators/calendar yet. We are having just this publc section: Analytics. And many people are still asking: "what this Analytics section for". But this section is fully related to our future forex calendar.

Look at the forum: we are developing something which is related with technical analysis only. And we did not disscuss any ecomonical indicators and news.

I can not do it alone

Some people came to technical analysis via fundamental analysis. The other people like me trying to understand economical indicators through techical indicators and trading. We can not do anything important without this fundamental knowledge. We will be limited.

Few months ago I invited Nen (Harmonic section) from the other forum to our forum to represent his indicator. I got everything from the members of that forum you can imagine

We do not have co-operation with forexfactory yet so it may be a problem.

William Snyder
9485
William Snyder  

Newstrader

Found these indicators in my computer think they use the internet to access Forex Factory Economic calender maybe can incorporate into Newstrader E.A.

Regards

mrtools

Files:
William Snyder
9485
William Snyder  

Newstrader

The other one

Files:
Sergey Golubev
Moderator
110775
Sergey Golubev  

Thanks a lot.

Just hope that we will be able to develop our own forum calendar.

This development may be started on our public Analytics section. But any deep development is possible in elite section only: because, sorry it will cost money.

So what i am using:

- this website http://eurusd.ru/analitika_02.php

- alpari calender http://www.alpari-idc.ru/ru/analytics/calendar/

Sorry it is in Russian language.

I tried to use news from forexfactory but sorry they are posting not all the news. So I had to find something different according to my language for example.

Igorad created the EA which he could create for us: we have text file and may fill this text file by any news we feel may be important.

Just fully related to our educational ... : Just hope that we will be able to develop our own forum calendar.

Sergey Golubev
Moderator
110775
Sergey Golubev  

And I have few books to read about it (pdf files):

- Cowell, F.A. - Microeconomics. Principles and analysis;

- Cochrane-NewFactsInFinance;

- Bloomberg,.The Trader's Guide to Key Economic Indicators.[2004.ISBN1576601390];

- M.Thomsett - Mastering Fundamental Analysis;

and few books in Russian language.

Just to start something. Or to understand what about other people will post.

William Snyder
9485
William Snyder  

Newstrader

Yes Newdigital an world Forex fundamental calender for this forum would be a good thing.

Regards

mrtools

Chrisstoff
524
Chrisstoff  

Newdigital,

As you probably know FXCM has a sophisticated economic calendar that is available also in Excel form (I attach the latest one here).

Although, I do not know whether it is free or copyrighted?

Files: