我在网上看到这个MACD的EA,以下是他的英文介绍: I have been working on a strategy for the last number of months using MACD as a signal. The basis for this is the principal that what goes up must come down, I think NB mentioned that in one of his earlier threads.
The strategy is fairly simple.
A sell trade is opened provided
1. MACD value is positive on the current candle, and
2. MACD value of previous candle was less(closer to 0) than the MACD signal, and
3. MACD value of 2 candles back is greater than MACD signal
Obviously the opposite of the above for a buy trade. I originally have been trading this on the 1 min timeframe on GU and used
a manual recovery system of reentry around 150 pips. My target tp was 5 pips.
I then used an online ea generator to help code an ea that would trigger the trades. In an attempt to automate recvoery trades, I appealed to anyone on one of the SWB Martingale threads and pipernet took up the challenge and recoded the ea to automate the martingale strategy. This developed into an ea that trades over a grid range, however it also
waits until it has passed the range and then waits for a new signal before entering the next trade. Pipernet also tested this on the
15 min timeframe which seemed to work well. I have since tested on anything up to daily and it works pretty well. He added a
MACD filter to stop some false trades. I have attached a backtest of 2010 to show how it looks so far.
Unfortunately the SWB thread moved in another direction and I am now looking to take this ea forward with a couple of further ideas.
I have attached two ea's relating to this. The second one also only trades with reference to a higher timeframe (user adjustable)
which seems to help stop most of the trades that go to L4 but it also stops plenty of other profitable trades. I added the code for this so it may be wrong.
My thoughts on developement are as follows;
I want to introduce two different types of recovery. The first and possibly newer type of recovery is something I am going to call
momentum recovery. This is simply where we add recovery trades each time we get a new trade trigger (see attached pic which illustrates 3
momentum recovery trades after first trade is taken) The EA's attached trade with momentum recovery provided the range is quite small
As you can see in this picture the momentum recovery worked. I call this momentum recovery as the momentum behind the original trigger
signal is still valid until we get an opposite signal (not neccessarily using the macd filter setting). On the backtests it would appear that more often than not the momentum trades get us to the tp in money figure depneding on the timeframe.
Lets say in the attached pic the momentum recovery didn't result in closing the trade and we then received an opposite signal as indicated in the pic.
This is the ppoint I wish to develope further. Either we
1. Close all open trades for a loss and await next trade subject to macd filter. This is my preference as it means we do not go into mega drawdown when momentum swings against us and allowsus to hopefully set up more successfull trades.
2.We close the L2, L3 and L4 etc momentum recovery trades (at a loss) and then enter full NB style recovery 1.1.2.4. until we recover
to BE plus the loss from the momentum recovery trades (plus swap if applicable)
Hopefully someone can help with this as the various backtests and demo tests I have run with this so far indicate that it will perform well. The best pair I have found is GU, although AU (with macd filter 0.0005) and CJ (macd filter 0.2) produce reasonable results as well.
Thanks must go to pipernet who helped with the original development of this ea and to all those involved in the SWB thread.
Paul
EDIT : The backtest below is for 1-1-2010 until 30-03-2011 and used 0.01 lots. The max dd was £155 or 1.28%
[size=12.3199996948242px]I