Forex Collection Euronis

3 ducks mt4 indicator

3 ducks mt4 indicator

Pull requests 0

Join GitHub today

GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.

Clone with HTTPS

Use Git or checkout with SVN using the web URL.

The following is MT4 code for the 3 Ducks Trading System. It makes finding the 3 ducks simpler. Instead of having to manually setup three moving averages and calculate the high price, it does all that for you.

The 3 Ducks system recommends a trade when you have 3 ducks in a line. Duck 1 is the 60-period H4 SMA. If this SMA is below the current price, duck 1 suggests buy. If it is below duck 1 suggests sell.

Duck 2 is the 60-period H1 SMA. If this SMA is on the same side of the current price as duck 1, then you have 2 ducks in a line. In other words, duck 2 may or may not confirm duck 1.

In the image below we see 4 examples of 2 ducks in a line. .

It is possible for the 2 ducks to suggest nothing, and the indicator will say that if it is so.

Duck 3 is an SMA-breakout line. The SMA-breakout line is calculated as follows in a buy condition:

  1. Start at the current bar (the rightmost bar).
  2. Move leftwards to Bar 1 (one bar over).
  3. Now, move leftwards and stop at the first bar whose MAX(open, close) is higher than the M5 SMA. This means the first possible bar to use will be the third bar.
  4. Draw this line as the SMA-breakout line

The same logic applies to a sell position. Except we use MIN(open, close) and we will trade when it is lower than the SMA-breakout line.

In the image below we see the M5 60-period SMA in violet. The first qualifying bar for below this SMA is the third bar and you can see the red line is drawn through the open of that bar.

Here is a closeup showing that the red line is drawn through the open of the third bar.

Click on "Download zip" to the right. Unzip the file. Put three_ducks.mq4 in your MT4 installation's Experts directory.

Open a chart. Put the chart on M5 timeframe. Drag the expert to the chart.

For support requests click on "Issues" to the right and fill out an issue ticket.

  • © 2017 GitHub , Inc.
  • Terms
  • Privacy
  • Security
  • Status
  • Help

You can't perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Brokers | VPS | Signals | Articles