can you post a chart, please?
hi,
I tested it manually for a couple of trades and it works fine, only thing is this method needs to be tested more vigirously with maybe one more condition to eliminate whipsaws.
The Macd establishes a good trend direction.
The adx signals the strength of the established trend but i found that the Pairs with Euro as base and GBP as base is not that good because of too much whipsaws, maybe another indicator which can eliminate such whipsaws can be used but that can be added later once we have a basic EA to work on.
Hi, Nicholishen , I think , the next bar after the condition are met would be safer.
thxs
Here is the EA which you have requested. Testing is not as good as i had hoped, but you can play around with it a bit. Here is the code for entry and exit:
int x=Confirm;
double
MA1=iMA(NULL,0,24,0,MODE_EMA,PRICE_HIGH,x),
MA2=iMA(NULL,0,24,0,MODE_EMA,PRICE_LOW,x),
MACD=iMACD(NULL,0,12,26,9,MODE_CLOSE,MODE_SIGNAL,x),
adx=iADX(NULL,0,14,MODE_CLOSE,0,x);
/*
MA1 - 24 Exp high
MA2 - 24 Exp low
Macd - default
adx - default
*/
if(functyp==1){//open
if(Ask > MA1 && MACD > 0.00040 && adx > 22)return(2);
if(Bid < MA2 && MACD 22)return(1);
}
if(functyp==2){//exit
if(Bid<MA2 && MACD < 0 )return(0);
if(Ask>MA1 && MACD > 0)return(0);
}
/*
buy
1. price above MA1
2. macd above +0.00040
3. adx above 22
exit - price below MA2
- macd below 0
sell - 1. price below MA2
2. macd below -0.00040
3. adx above 22
exit - price above MA1
macd above 0
tp = 200
stoploss = 25
trailing sl = 5
TF = 1hr
*/ return(0);
}Nic

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I don't know anything about programming an EA. If anyone can please help me?
MA1 - 24 Exp high
MA2 - 24 Exp low
Macd - default
adx - default
buy
1. price above MA1
2. macd above +0.00040
3. adx above 22
exit - price below MA2
- macd below 0
sell - 1. price below MA2
2. macd below -0.00040
3. adx above 22
exit - price above MA1
macd above 0
tp = 200
stoploss = 25
trailing sl = 5
TF = 1hr
option to change tp, sl functions.