Daily Breakout Strategy

<< <%SKIN-STRTRANS-SYNTOC%> >>

Navigation:  Video Tutorial >

Daily Breakout Strategy

menu_video Watch the video here.

 

In this tutorial, we will create an Expert Advisor based on daily breakouts. Generally, breakout systems are proven to be robust and profitable.

 

Create a new MetaTrader 4 Strategy and call it Daily Breakout.

 

clip0254

 

Add condition: Price (the MetaTrader charts show the Bid price), crosses above, Resistance. The Time Interval will be 12 hours at Fixed time of the day and the Time Interval ends at 10 o'clock.

 

clip0255

 

We won't set the Stop Loss because we're going to use Trailing Stop instead. But we will set the Take Profit to 100 Pips.

 

clip0256

 

clip0257

 

clip0258

 

Now create the opposite to sell.

 

clip0259

 

The price crosses below Support and the Take Profit is 100 Pips. That's correct.

 

(A word of advice: if the website becomes a bit slow due to the number of conditions, just hit Ctrl+R to refresh – it helps.)

 

Instead of closing the trade, we will use the Take Profit and Trailing Stop. In the Common tab, add Trailing Stop.

 

clip0260

 

For long positions, the Trailing Stop will be at Support, the last 12 bars, and we don't want to draw it on the chart because it would draw too many lines as the Stop Loss has moved.

 

clip0261

 

Create the opposite Trailing Stop for short positions.

 

clip0262

 

Because we still haven't limited the number of trades, the order will be sent multiple times when the price moves around the support or resistance. We want to send the next order on the next day. So we check Next Open Trade After Time Of The Day: 10 o'clock, which is the ending time of the support or resistance interval.

 

clip0263

 

In Money Management, we will use fixed size of 1 minilot and we can set it as input.

 

clip0264

 

clip0265

 

The Source is ready... that's pretty fast work!

 

clip0266

 

Copy the source and compile it.

 

clip0267

 

clip0268

 

Let's test it in Strategy Tester.

 

clip0269

 

We see that support and resistance are shown as blue lines. The support is broken, the order is executed and both Stop Loss and Take Profit are set. As the trade moves our way, the Stop Loss is trailed.

 

For now, we are not interested in performance because we will optimize the Take Profit and other parameters in the next videos in this tutorial.