Pages

هاي لبليبل يل بل شيل
Description:

This is a small example of using news trading strategy. There are few strategies. I wrote about four different strategies to play news. This simple EA includes one and the most interesting of these strategies in my opinion.
I didn't include the method to get news बेकाउसे , and I didn't want to write about it ones more. Here you get a simple implementation of making orders results from one of the strategies I wrote on my blog.

Here is description of the strategy:

Strategy no 3

It’s my favorite strategy. Before the news publication we place two orders: one buy stop and one sell stop. Both for example 5 pisp TP and 5 pips SL. We place buy stop above current price let’s say 20 pips above, and sell stop 20 pips under current price. Now we wait for the data. When the market shots in some way it is big probability to hit one of our TP. Even if it returns after all it can his the second TP. The profit can bee small but not very risky. Be careful with your SL’s and TP’s to be not too big cause it is better to earn small than to lose big money.

Here is sample code:

//-------------------------------------------------------------------
if(orderOpenDate == currentDate)
{
//we place 2 orders: buy stop and sell stop
if(ticket < 1)
{
orderAsk = Ask - bias * Point;
orderBid = Bid - bias * Point;
ticket=OrderSend(Symbol(),OP_SELLSTOP,lot,orderBid,1,orderAsk+Point*sl,orderBid-tp*Point,"NewsTrader",2,0,Red);
}
if(ticket2 < 1)
{
orderAsk = Ask + bias * Point;
orderBid = Bid + bias * Point;
ticket2=OrderSend(Symbol(),OP_BUYSTOP,lot,orderAsk,1,orderBid-Point*sl,orderAsk+tp*Point,"NewsTrader",2,0,Green);
}
}
//---------------------------------------------------



This EA comprises only 20 lines of code, and does all its trading in two lines! if there is a simpler EA out there I would love to see it!

The EA doesn't use any indicators. Instead, it simply and blindly opens two opposing positions at the beginning of the first new bar it comes across. It waits until both positions have closed by hitting their stop-losses or take-profit levels, and then opens the next pair of positions.

After optimisation manually select the best result where the stop-loss is lower than take-profit level, in which case each pair of trades will have one of the following outcomes.

  • Both positions win (hurrah!)
  • One wins and one loses (in which case the winner covers the losses of the loser)
  • Both lose (oh no!)

It is OK to optimise the EA using "Open prices only", because it only trades at the opening of a new bar.

In my experiments, EURGBP 5M provides the best results, although positive results are also available from EURUSD, GBPUSD, EURCHF and probably others.

Please feel free to improve the code to your heart's content!


SymbolEURGBP (Euro vs Great Britain Pound )
Period5 Minutes (M5) 2009.10.01 00:00 - 2010.01.31 23:55 (2009.10.01 - 2010.02.01)
ModelEvery tick (the most precise method based on all available least timeframes)
Parameterslots=1; stop_loss=76; take_profit=750;

Bars in test25154Ticks modelled3758809Modelling quality90.00%
Mismatched charts errors0




Initial deposit10000.00



Total net profit7842.50Gross profit27413.50Gross loss-19571.00
Profit factor1.40Expected payoff76.89

Absolute drawdown792.50Maximal drawdown3539.00 (23.17%)Relative drawdown23.17% (3539.00)

Total trades102Short positions (won %)51 (56.86%)Long positions (won %)51 (19.61%)

Profit trades (% of total)39 (38.24%)Loss trades (% of total)63 (61.76%)
Largestprofit trade727.00loss trade-750.00
Averageprofit trade702.91loss trade-310.65
Maximumconsecutive wins (profit in money)1 (727.00)consecutive losses (loss in money)7 (-2543.50)
Maximalconsecutive profit (count of wins)727.00 (1)consecutive loss (count of losses)-2543.50 (7)
Averageconsecutive wins1consecutive losses