november 22, 2023

My automation method – Wingman

This is Part 3 of my blog on how I converted my MT4 EA to MT5. Part 2 can be found here, which introduces the Wingman strategy EA. In this part I’ll tell you how I converted my strategy into an EA by using my method.

In the previous part of this blog I wrote down how Wingman works, what it does exactly. To me, I wrote it down in a structured and clear way, but that doesn’t mean it has to be as clear to you, but it’s definitely not clear enough yet to an EA. So I have to lay out the trading strategy again in a way that the EA will be able understand; to be able to take automated trades. Once I’ve done that, I only need to add all those pieces to the EA Builder Pro webtool (link) and I’ll have a working MT5 EA.

My automation method

I will lay out my Wingman trading strategy and put all parts of the strategy in a category. These categories can then later be transfered to the tool I’m using:

  1. Indicators used by the trading strategy
  2. When to open a trade
  3. When not to open a trade
  4. When to close a trade

Indicators used by the trading strategy

My trading strategy description is just a collection of rules and the values used by those rules are often indicators. Indicators are small programs which take values from any source and will give the trader a representation of what those values mean. This could be a line, telling you the average price of what you’re trading, or a sound and a message, telling you now is a good time to enter a trade.

So which values is Wingman using to make trading decisions?

For opening trades I’m using the SMA 38 and I’m checking if the price of the previous bar crosses this value. I also use the last swing high/ low to set my initial SL. My total list of indicators therefore look like this:

  • SMA 38 (Simple moving average, Period 38)
  • Bar Open/ Close/ High Low
  • Swing high/ swing low

When to open a trade

I will now write down the conditions for opening orders. Both for the first order and the additional orders (remember rule #3 – let profits run and double down).

I want to open a first buy trade when the price on the previous bar has crossed the SMA upwards (and can no longer pull back, which is why I’m using the previous bar).
I want to open a first sell trade when the price on the previous bar has crossed the SMA downwards.

I want to add an additional trade on a retracement bar if the trade is also close, say 30 pips, to a (new) swing high/ low.

When not to open a trade

In my description of my EA I mentioned I don’t want to double down when I’ve already doubled down within 5 pips in the correct direction (the profit direction), so I’ll add this condition:

I will not open a trade, when I’m not 5 pips ahead compared to the previous order.

When to close a trade

I want to close all my orders when the price (on the previous bar) crosses the SMA in the opposite direction.
I want to close all my orders when the price (on the previous bar) crosses the swing of the first order.
I want to close my order when the price hits the order’s SL.

Before we move to the last part

Now that we put the entire Wingman strategy into a very structured, 1 page, description, each part of the EA put into it’s category, the EA has become a collection of small rules which are easy to put into an EA and gives us a great sense of control and understanding of what the EA is doing.

I am now ready to create this EA. Please jump to the next part of this blog series.

1 Comment

Comments are closed.