Download MetaTrader 5

Experts: Catcher Profit 1.0

To add comments, please log in or register
Write articles, help other developers and make money
MetaQuotes Software Corp.
Moderator
181209
MetaQuotes Software Corp. 2013.12.16 07:24 

Catcher Profit 1.0:

This isn't an operating EA, but profit management EA.

Author: Alfredo

MQL4 Comments
16319
MQL4 Comments 2013.12.26 05:32  
Do you have to put this on EACH chart? Or on one chart to control all the charts in the account?
Alfredo Antonetti
1449
Alfredo Antonetti 2013.12.28 19:10  
gator:
Do you have to put this on EACH chart? Or on one chart to control all the charts in the account?

One chart to control all account! ;)
MQL4 Comments
16319
MQL4 Comments 2014.01.17 13:13  

hi, seems a great, simple and useful EA. I wondering how is the percentage calculated, on equity or the lots value? Thanks. I'm also wondering if it possible to use a step in the calculation, to update the value say every day once, but not constantly with the changing p/l?? Hope you can get this comment, best regards, Marcus

Alfredo Antonetti
1449
Alfredo Antonetti 2014.01.17 16:13  
winbig:

hi, seems a great, simple and useful EA. I wondering how is the percentage calculated, on equity or the lots value? Thanks. I'm also wondering if it possible to use a step in the calculation, to update the value say every day once, but not constantly with the changing p/l?? Hope you can get this comment, best regards, Marcus


Hi Marcus,

I'm glad you like it.

For what regard the percentage, it's calculated on equity value and about step in the calculation, what do you mean if not the changing P/L ?

regards

Hongliang Liu
1226
Hongliang Liu 2014.08.11 08:10  
void CloseAll() {

     int Ordini = OrdersTotal();
     int i = 0;
     for(i = Ordini; i >=0; i--)
     {
     OrderSelect(0,SELECT_BY_POS,MODE_TRADES);
     double bid = MarketInfo(OrderSymbol(),MODE_BID);
     double ask = MarketInfo(OrderSymbol(),MODE_ASK);
     
     if(OrderType()==OP_BUY)   OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
     if(OrderType()==OP_SELL)  OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
     }
}

i have this kind of close strategy in some of my EAs. You'd better check if All are really closed,If some of the orders execute failed,it may not fulfill the close condition again,FYI

Alain Verleyen
Moderator
30739
Alain Verleyen 2014.08.11 12:17  
Moggy:

i have this kind of close strategy in some of my EAs. You'd better check if All are really closed,If some of the orders execute failed,it may not fulfill the close condition again,FYI

You code isn't reliable. You don't check the returned value of functions you are using (OrderSelect, OrderClose...).
To add comments, please log in or register