News Trader EA - page 35

 

Hey,

I'm trying to use the newstrader v6, but I see from igorad, it requires another number (ex. 2007.04.10;01:30;AUD;NAB Business Confidence;1;1;) but the updated file is only for version 5 it seems.

Does anyone have the april file for news in this format? Or how do I do it myself?

Thanks

Jeff.

 

been testing with v5, yes updating mt4 was my original prob!! anyone else have orders that are not being deleted after duration time is up? it seems to overlook some of the delete pending orders for any random chart. example...it left buy/sell eurusd orders once then another time it left 1 hanging usdjpy order.

 

XML calendar idea

Hello,

Im wondering... XML was designed solely to transfer data between computer systems via the internet in a simple text file.

Is it possible to use XML inside an EA? If you could, someone could setup a web server somewhere to broadcast out the current news events and their expected effect on the market.

Then the news trading EAs could simply connect to this and download all calendar events for the next few months!

Totally simple and totally automated.

Anyone know how to get this done?

Thanks,

-Matt

 
webjeff:
Hey,

I'm trying to use the newstrader v6, but I see from igorad, it requires another number (ex. 2007.04.10;01:30;AUD;NAB Business Confidence;1;1;) but the updated file is only for version 5 it seems.

Does anyone have the april file for news in this format? Or how do I do it myself?

Thanks

Jeff.

Text file in the first post is for version #5.

In the first post it is stated the following:

Set you setting in SetsFile. Last number in text calendar is number of the settings.

And look at this post by Igorad: https://www.mql5.com/en/forum/175898/page23

So basicly you need to write set text file with the settings (example is on the first post of this thread). Just keep everything the same in that set text file. and only you may change is the settings numbered 1, 2 and so on.

And in text forex calendar (for version #5) just add the last number which is number of settings in set text file.

 
cturner:
been testing with v5, yes updating mt4 was my original prob!! anyone else have orders that are not being deleted after duration time is up? it seems to overlook some of the delete pending orders for any random chart. example...it left buy/sell eurusd orders once then another time it left 1 hanging usdjpy order.

I had this case. That is why I changed the time for session end settings (see new setings in some posts above). Basicly it is because of bad connection Mettatrader with the broker sometimes in midnight.

 
BidPlace:
Hello,

Im wondering... XML was designed solely to transfer data between computer systems via the internet in a simple text file.

Is it possible to use XML inside an EA? If you could, someone could setup a web server somewhere to broadcast out the current news events and their expected effect on the market.

Then the news trading EAs could simply connect to this and download all calendar events for the next few months!

Totally simple and totally automated.

Anyone know how to get this done?

Thanks,

-Matt

Igorad created totally new version and we are testing it now (beta testing). If it is ok so i will post it of course.

This version is using API from our forex calendar https://www.mql5.com/en/forum/176665 to take the news events automatically.

Besides everybody may create their own calendar and trade it, or use mine.

My calendar ID is 4. So create your own public, or your own private, or your own for trading signals and so on.

- Private events is the events that people may get according to your private invitation for example; and it is visible for that people only.

- Public events is the events for everybody.

- Events means calendar or trading signals and so on (anything tradable).

Besides everybody may create some signals as private events and other people may follow it.

It was created. It was done but it should be tested for at least one-two days for possible bugs.

I am very busy creating calendar here https://www.mql5.com/en/forum/176665. It is not calendar only if you understand. It is something with some APIs and some dll files and so on to do that. Thanks forexts for creating this great tool!

And if new version of Newstrader (from Igorad and forexts) will be fine so it will be very good and we may take any events from this calendar.

Because all the events are repeated mostly in month way so I will need 1 and half week more to be busy with that and everything will be fine after that means that i will be ready for any ther testing/development). And, in the same time, the beta testing of this totally new NewsTrader is going on.

That is why I am now testing version #6. Because we got totally new version now.

But this new version will be based on version #5. Later on Igorad will find some way to use different setting for "totally new version" and we may trade as mnay calendars/trading signals/events (commercial or private - anyone) as we want.

 

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
 

I'm working on the ECN trading, initially rewriting EA in another language to work on the ECN and later emulating MT4 server or EA execution on the ECN if possible. I think the newstrader could easily be converted because there aren't any weird signals to adapt.

 
newdigital:
Igorad created totally new version and we are testing it now (beta testing). If it is ok so i will post it of course.

This version is using API from our forex calendar https://www.mql5.com/en/forum/176665 to take the news events automatically.

Besides everybody may create their own calendar and trade it, or use mine.

My calendar ID is 4. So create your own public, or your own private, or your own for trading signals and so on.

- Private events is the events that people may get according to your private invitation for example; and it is visible for that people only.

- Public events is the events for everybody.

- Events means calendar or trading signals and so on (anything tradable).

Besides everybody may create some signals as private events and other people may follow it.

It was created. It was done but it should be tested for at least one-two days for possible bugs.

I am very busy creating calendar here https://www.mql5.com/en/forum/176665. It is not calendar only if you understand. It is something with some APIs and some dll files and so on to do that. Thanks forexts for creating this great tool!

And if new version of Newstrader (from Igorad and forexts) will be fine so it will be very good and we may take any events from this calendar.

Because all the events are repeated mostly in month way so I will need 1 and half week more to be busy with that and everything will be fine after that means that i will be ready for any ther testing/development). And, in the same time, the beta testing of this totally new NewsTrader is going on.

That is why I am now testing version #6. Because we got totally new version now.

But this new version will be based on version #5. Later on Igorad will find some way to use different setting for "totally new version" and we may trade as mnay calendars/trading signals/events (commercial or private - anyone) as we want.

It works. Look at the image attached. The data for news was taken from this our calendar (ID=4) https://www.mql5.com/en/forum

Why I cound not install this EA?

Because of Jurik indicators set here https://www.mql5.com/en/forum/173010 (this jurik is having a lot of library files).

I will post this EA tomorrow.

Files:
news_api.gif  57 kb
 

New version of Newstrader (v5.1) was updated on the post #1 of this thread. This version is taking the news directly from our forex-tsd calendar https://www.mql5.com/en/forum

We don't need text file anymore. Because people may use my calendar, or create other calendar they want to trade with any events. All the explanation is on the post #1.

Reason: