Basket Trading EA

by Dr.Hamdi Boukamcha

What I am presenting here is a basket trading EA that uses ideas that have been presented in other forums that traders are using to trade a basket of pairs. I am just trying to take the best of the ideas and put them into a usable simple EA that can trade 90 % of the time on its own without blowing out your account. The EA settings may change from time to time depending on the market conditions and what proves to work best in the long run and what other traders may find works better. This EA is designed to trade the H1 time period of an offline chart created with up to 14 pairs. For now I will try and keep it as simple as possible with only two indicators, HAS H1 and 2 IXO settings, here are the rules.


1)HAS H1 (user settable settings) color change will be the trigger that starts the EA looking for a trade as soon as it is confirmed by IXO.

2)IXO1 (user settable settings) will be the confirming signal to place a trade after the HAS signals. If IXO1 is the only confirming signal a fixed Take profit will be used for this trade entry (user settable, 300 pips for a 14 pair basket).

3)IXO2 (user settable settings) will be a second confirming signal after the HAS and IXO1 have both happened. This signal must happen before or at the same time as the IXO1 to be valid, if it happens latter it does not change this first trade entry. If this is the case no fixed Take profit will be used but instead the opposite IXO1 will be used as an exit signal.

4)The opposite IXO1 can be used as a trade exit for all cases if set to true.

5)There is also a fixed Take Profit and a Fixed Stop Loss that can be used if you want to, these can also be moved with the mouse during an active trade if you wish.


Here is an example of a trade that would have been taken according to rules 1 and 2.

Attached Image (click to enlarge)
Basket Trading EA


Here is an example of a trade that would have been taken according to rules 1, 2 and 3.

Attached Image (click to enlarge)
Basket Trading EA


Here is an example of what I call a re-entry trade, the EA takes a trade using rules 1 and 2 and closes after hitting 300 pips (14 pair user setting), it then enters another trade in the same direction because of the change of color of the IXO2. IXO1 and the HAS still being in a confirming direction.

Attached Image (click to enlarge)
Basket Trading EA


Using the following EA setup for a 14 pair basket here are the trades that should have taken place starting on 7.25 0:00.

H1 HAS = 2-12-2-20

IXO1 = 2260

IXO2 = 3590

Use IXO1 as exit for all trades

Use TP of 300 pips for trades taken with Rule 1 and 2.


+300 pips, +1055 pips, +300 pips, -405 pips, +846 Pips, +300 pips, -470 pips, +621 pips, +300 pips and the last trade is still open and would have +1381 pips so far. (Note: This last trade was closed by the IXO1 reversal for +1150 pips)

+5103 pips, -875 pips (see above note: +4872 pips, -875 pips)

Total pip gain = +4228 pips since 7.25 0:00 (see above note: +3997 pips)



Here is an example of the present trade we would be in, you can see this would have been a re-entry type trade as we took +300 pips of profit and then re-entered again when IXO2 changed color and IXO1 and HAS H1 were still confirming the same direction.


Attached Image (click to enlarge)
Basket Trading EA


Basket Trading EA   Basket_EA.zip   128 KB | 427 downloads

Share this article

Leave a comment