Retracement trading

 

I have been looking for a way to take advantage of the retracement after a big move that has occurred over a few hours as I have noticed that there is normally a retracement in the opposite direction.

I have put together an EA that tries to do this, the rules are as follows:

Entry

1) Wait for a big move long or short over the last few hours, the move must be big enough and over a relatively short period to be considered a retracement candidate, this is calculated in the Retracement3 indicator and will be indicated with an arrow on the chart.

2) The 15 minute CCI is over sold (below 150) for long trades and over bought (above 150) for short trades.

3) If the big move has been in a long direction then we will place a sell order below the recent high in order to wait for the retracement to begin. If the order is filled then at least we know that the price has already started to move. The order price is calculated using the Retracement break indicator.

Exit

1) Close the order when the 15 minute CCI trend changes direction

2) The trade must be open for minimum of 1 hour.

Or

1) Stop loss

3) Trailing stop

4) Take profit level that is determined by size of the original move.

Back testing on GBPJPY from 2004.06.01 to 2009.03.23 it generates about 4300 pips which is not too bad but as these big moves are not to frequent I am not yet completely convinced. The market is usually quite volatile during these big moves and so it is very tricky to use stop losses as you can be repeatedly stopped out before it finally begins to retrace.

I have attached the ea with the indicators and also the profile you can load to make the set up easy if you would like to take a quick look.

I would be grateful for any comments or suggestions.

Files:
retracement.zip  40 kb
 

Trailing entry EA?

Hi derek. Looks like you have a sound, workable idea. However, I'm currently working on another system using non-lagging MAs. I'm actually looking for help to code an EA which can enter a trade using similar method as trailing stop loss, ie., when I activate the EA, it will trail the current price by xx pips until eventually the trailing stop entry order is hit. This concept works great for 100% getting in on a retracement because sometimes, setting limit orders at fib levels or pivot points may not hit the order price. Since your thread was on retracements and you sound quite knowledgeable at coding EA I wonder whether you might be able to help me out. Thanks so much.

 

Sure Alvin, I hope I can help!.

My ea does exactly that, it trails the price by a set number of pips (in the ea its the "break1" variable) until the pending order is hit. The retracement break indicator calculates the high or the low over a set period and then the long entry price is the low price + the set break and the short entry price is the high - the set break.

The order is modified each time the entry price changes just like the trailing stop would be changed.

 

Custom EA

Hi Derek. I've plugged your indicators and EA into my MT4 platform but your EA settings have been customised for your system so I can't use them for my system. Could I ask you for a great favour, to code an EA for me with the below settings? So I can use it to trade my system, and I'm sure many forum members will also find it useful for entering trades on retracements with whatever systems they are using. Many thanks!

1. Magic Number: (input #)

2. BuyTrail: (input true/false)

3. BuyTrail pips: (input #). When EA is placed on chart and enabled, it trails the current ask price by # pips like a trailing stop. Buy Market Order is entered when the price hits the trail. This is for user who wants to enter at downward retracement.

4. SellTrail: (input true/false)

5. SellTrail pips: (input #). Similar to BuyTrail. Trails the current bid price by # pips like a trailing stop. Sell Market Order is entered when the price hits the trail. This is for user who wants to enter at upward retracement.

Note: If BuyTrail is set to "true" by user, SellTrail must be set to "false" by user and vice versa.

6. Number of lots: (input #)

7. Slippage: (input #). When Market Order is entered, allows for maximum # pips slippage.

8. Take Profit: (input #) # pips from entry price

9. Stop Loss: (input #) # pips from entry price

 

Has anyone tested

Has anyone tested the ea above? I was hoping someone would give it a backtest and reply with some feedback about its potential and where we can improve. I know the order logic will work in live as I use similar logic in my live ea's.

Thanks

Reason: