Universal MA Cross EA - page 117

 
bixente74:
Hi smartconnect,

which are your periods for EMA cross: 34 and?

Bests,

bixente

I have mentioned in my post. 15 EMA cross 34 EMA is the entry. Also 5 EMA cross 21 SMA is widely popular. 5, 21, 34 and 55 are the popular moving averages. These are powerful Fibonacci numbers. So you can chose the combination depending on what time frame charts that you are comfortable trading. I suggest to trade in higher time frames H1 and H4. Take profit should be 30 pips for H1 and 50 pips for H4 time frames. Don't be greedy and wait too long beyond the above target. You will give back all the profits made in a move. Good luck.

smartconnect

 
smartconnect:
Hi mladen

I have used the UMA EA fairly successful. Thanks for this EA survived test of time all these years and still going strong. I have a request. In this Martingale version lot sizes multiplies only when the "stopAndReverse" is set "True". Where as I don't want any trade to close in loss but the lot size keep multiplying until the market moves in one direction such that I close all the set of trades together in profit. I saw the profit loss functions in the coding but I don't know how to correct the way I want it. Can you please help me.

If you can make the above changes also if possible to add close all function with respect to the pair only to close the bunch of orders. This would help me save time also to trade in multiple pairs.

I am presently trading the above method manually by using EMA 15 cross 34 successfully. This martingale EA would help me. Thanks in advance.

Smartconnect

Hi mladen/tools

I am waiting for your help. Please find some time for me to get this correction done if possible.

smartconnect

 
smartconnect:

smartconnect

Try this version out

It should solve the problem with breakeven for sell orders too

Hi, thank you for sharing this EA and the work you have put in.

My question, is there an update solving all the issues:

- For new built MT4/5 digit brokers

- Break Even working

- Trailing Stop (above version the Trailing Stop moves up with price but also goes back once the prices falls)

Furthermore, if someone could add multi-level of trailing stops. E.g.:

- Trailing Stop 1) Trailing Stop Trigger: 35 pips / Trailing Stop Step: 30 pips (moving with every pips of the price)

- Trailing Stop 2) Trailing Stop Trigger: 60 pips / Trailing Stop Step: 40 pips (replaces Trailing Stop 1)

- Trailing Stop 3) Trailing Stop Trigger: 120 pips / Trailing Stop Step: 15 pips (replaces Trailing Stop 2)

Thank you very much.

D

 

I have this Trailing Stop in one of my other EA's:

extern bool EnableTrailingStop1 = true;

extern double TrailingStopTrigger1 = 35

extern double TrailingStepPips1 = 30

void TrailingStop1 ()

{

bool make;

for (int i=0,i<OrdersTotal();i++)

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

if(OrderSymbol()==Symbol()&&OrderType()<=OP_SELL)

if(OrderMagicNumber()==MagicNumber&&OrderComment()=="MainSetup")

{

int ticket=OrderTicket();

if(OrderType()==OP_SELL)

{

if(OrderOpenPrice()-Ask >= TrailingStopTrigger1*g_Point)

{

double trailing = NormalizeDouble(Ask + TrailingStepPips1*g_Point,Digits);d

if (OrderStopLoss() > trailing || OrderStopLoss () == 0.0)

{

make=OrderModify(ticket,OrderOpenPrice(),trailing,OrderTakeProfit(),0);

if(!make)Print(GetLastError());

}

}

}

if(OrderType()==OP_BUY)

{

if(Bid - OrderOpenPrice() >= TrailingStopTrigger1*g_Point)

{

double trailing = NormalizeDouble(Bid - TrailingStepPips1*g_Point,Digits);

if (OrderStopLoss() < trailing || OrderStopLoss() == 0.0)

{

make=OrderModify(ticket,OrderOpenPrice(),trailing,OrderTakeProfit(),0;

if(!make)Print(GetLastError());

}

}

 
Trader-London:
I have this Trailing Stop in one of my other EA's:

extern bool EnableTrailingStop1 = true;

extern double TrailingStopTrigger1 = 35

extern double TrailingStepPips1 = 30

void TrailingStop1 ()

{

bool make;

for (int i=0,i<OrdersTotal();i++)

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

if(OrderSymbol()==Symbol()&&OrderType()<=OP_SELL)

if(OrderMagicNumber()==MagicNumber&&OrderComment()=="MainSetup")

{

int ticket=OrderTicket();

if(OrderType()==OP_SELL)

{

if(OrderOpenPrice()-Ask >= TrailingStopTrigger1*g_Point)

{

double trailing = NormalizeDouble(Ask + TrailingStepPips1*g_Point,Digits);d

if (OrderStopLoss() > trailing || OrderStopLoss () == 0.0)

{

make=OrderModify(ticket,OrderOpenPrice(),trailing,OrderTakeProfit(),0);

if(!make)Print(GetLastError());

}

}

}

if(OrderType()==OP_BUY)

{

if(Bid - OrderOpenPrice() >= TrailingStopTrigger1*g_Point)

{

double trailing = NormalizeDouble(Bid - TrailingStepPips1*g_Point,Digits);

if (OrderStopLoss() < trailing || OrderStopLoss() == 0.0)

{

make=OrderModify(ticket,OrderOpenPrice(),trailing,OrderTakeProfit(),0;

if(!make)Print(GetLastError());

}

}

Why are you using TrailingStopTrigger1*g_Point in comparison and then TrailingStepPips1*g_Point in assignment?

 
mladen:

Hi, thank you for sharing this EA and the work you have put in.

My question, is there an update solving all the issues:

- For new built MT4/5 digit brokers

- Break Even working

- Trailing Stop (above version the Trailing Stop moves up with price but also goes back once the prices falls)

Furthermore, if someone could add multi-level of trailing stops. E.g.:

- Trailing Stop 1) Trailing Stop Trigger: 35 pips / Trailing Stop Step: 30 pips (moving with every pips of the price)

- Trailing Stop 2) Trailing Stop Trigger: 60 pips / Trailing Stop Step: 40 pips (replaces Trailing Stop 1)

- Trailing Stop 3) Trailing Stop Trigger: 120 pips / Trailing Stop Step: 15 pips (replaces Trailing Stop 2)

Thank you very much.

D

No such update

Code must be rewritten

 
mladen:
Why are you using TrailingStopTrigger1*g_Point in comparison and then TrailingStepPips1*g_Point in assignment?

Hi Mladen

The reason is that it gives more possibilities to optimize.

Kind regards,

D

 

and in addition you put much more pips in your bag rather to leave them on the table

 

Does anyone else has this issue with Trailing Stop? In MT4 Strategy Tester with maximum speed on visual mode the Trailing Stop moves up and down with price action. With speed 31 it seems the Trailing Stop seems to work. However, if I speed up to maximum Trailing Stop moves up and down with price action. Once I reduce speed again, it seems not to go back to correct execution of the Trailing Stop

 
Trader-London:
Does anyone else has this issue with Trailing Stop? In MT4 Strategy Tester with maximum speed on visual mode the Trailing Stop moves up and down with price action. With speed 31 it seems the Trailing Stop seems to work. However, if I speed up to maximum Trailing Stop moves up and down with price action. Once I reduce speed again, it seems not to go back to correct execution of the Trailing Stop

That is almost sure a problem with strategy tester

Reason: