Dislikedthis EA is being tested on 1h on all major pairs.
Currently i am using the default setting as they appear in the version 4_1.Ignored
thanks
- Syd
[dust is my bed...]
Help - This EMA Cross Expert Advisor Needs 3rd EMA Filter 5 replies
10 Ema and 200 Ema cross system 6 replies
Help. EMA Crossover with different EMA cross for exit 0 replies
Please help code an EMA Crossover 12ema x 24 ema cross 1 reply
DislikedDom, mate can I get some info about Ravifisher indicator - what does it do? how does it work etc?
thanksIgnored
Dislikedsure,
RAVI is an indicator that shows the strength of the current trend.
I am using the version from www.fxfisherman.com forum.
there are 2 parallel lines on it. when the signal line is between these 2 lines, it means that the trend is weak. these lines are at 0.08 and -0.08 levels. when the trend is weak there is a good chance for whipsaws. I am using it as a filter.
hope it helps.
Ignored
DislikedIt's a good idea. I'll prepare a version that uses MACD instead of RAVI and we'll see how is it going .Ignored
Dislikedattached is a version that doesn't use Profit Manager (UseProfitManager=fasle) and instead of trailing stop, it exits upon Simple MA(8) and EMA(5) cross in the opposite direction.
trailingStop in this version is set to 0.
if you change it to another value, it will use trailing stop in addition to the above exit rule.
Please notice that it's VERY IMPORTANT to set the global variables for all the pairs before the EA starts working.
For example, if you are starting to run it on EUR/USD at the end of the uptrend, set the global variable for this pair in such a way that it will not allow to open BUY orders and will wait for the reversal. (allowLongEURUSD = 0 )Ignored
int Distance = MathFloor(MathAbs((ema3-ema5)/Point));
int Distance2 = MathFloor(MathAbs((ema13-ema21)/Point)); //maxCrossDistance
isCrossed = Crossed(ema3,ema5);
isCrossedBig = Crossed(ema13,ema21);
....
....
....
if (isCrossedBig == 1 && Distance2 >= minCrossDistance)
{
GlobalVariableSet("allowShort" + Symbol(),1);
Comment("allowShort = true" + " " + "Distance = " + Distance2 + " mincrossDistance = " + minCrossDistance);
}
if (isCrossedBig == 2 && Distance2 >= minCrossDistance)
{
GlobalVariableSet("allowLong" + Symbol(),1);
}
Disliked
3. the trend according to ema13 and ema21 changes to DOWN ( isCrossedBig = 2)
when it happens I DO WANT TO ALLOW long trades again ONLY when ALL other conditions are met. Of course, these conditions are NOT met when
isCrossedBig = 2.Ignored
if(ema3 > ema5 && ema3 > ema80 && ema13 > ema21 && rsi >= 50 && raviTest && rsi < 70 && ravi < raviHighestBorder)
{
longOk = true;
shortOk = false;
}
if (isCrossedBig == 2 && Distance2 >= minCrossDistance)
{
GlobalVariableSet("allowLong" + Symbol(),1);
}
if (longOk && isCrossed == 1 && Distance >= minCrossDistance && GlobalVariableGet("allowLong"+ Symbol()) == 1 )
{
int ticketBuy = OrderSendSafe(Symbol(), OP_BUY, lots, Ask, slippage, Ask-stopLoss*Point,Ask+takeProfit*Point ,ExpertName, ExpertID, 0, Lime);
if (ticketBuy > 0)
{
GlobalVariableSet("allowLong"+ Symbol(),0);
//allowLong = false;
}
}
DislikedGuys,
let me try to explain my twisted logic again
It's not a bug - trust me
the flow of the EA goes like this :
1. when it's initialized, the variables allowShort and allowLong are set to 1
It means : "Allow both long and short trades"
2. When LONG conditions are met according to :
if (longOk && isCrossed == 1 && Distance >= minCrossDistance && GlobalVariableGet("allowLong"+ Symbol()) == 1 ) ,
allowLong variable is set to 0 and allowShort still equals to 1 (as it was set in Init function)
And we send a BUY order.
Am I correct so far ?
3. the trend according to ema13 and ema21 changes to DOWN ( isCrossedBig = 2)
when it happens I DO WANT TO ALLOW long trades again ONLY when ALL other conditions are met. Of course, these conditions are NOT met when
isCrossedBig = 2.
allowLong is only a flag that says "hey, since in the past we already had a down trend, we can in the FUTURE when all the criteria for LONG are met, send a BUY order."
The purpose of this flag is to prevent 2 consecutive BUYs.
4. our previous BUY order hits trailing stop at some point.
5. a downtrend continues and we make SELL order.
allowShorts is being set to 0 (allowLong already equals 1 at this point)
6. Our SELL order is closed by trailing stop.
What do we have now ?
allowLong = 1
allowShort = 0
6. The trend reverses and now it's uptrend again.
we still have :
allowLong = 1
allowShort = 0 - no changes.
7. EA waits until all the conditions for LONG are met and it sends BUY order
(since allowLong = 1, BUY order is allowed.
and so on and so forth
let me know if my explanations suck
P.S. I made these variables global, because i want to be able to intervene the trade manually.
if all conditions are met and EA is going to ,say, open BUY , BUT I see visually that this is the end of the trend, then i will change allowLong = 0.
EA will wait for the trend reversal (remember, that when ema13 and ema21 cross DOWN, allowLong is set to 1 ? )
So, when i set allowLong manually to be equal 1, the EA's next order can be ONLY SELL. AFTER this SELL is closed, allowLong will be automatically set to 1, and will be allowed to send BUY orders again .Ignored
Dislikedthat's because there is a bug in Take Profit Manager that is combined with this EA. use
usetakeprofitmanager = false until i fix itIgnored
DislikedMultEma_4_1.mq4
i already placed the EA in expert folder and the smiley is smiling for 24hours with out fail.
But so far no trade at all..
any other things i should do...Ignored