'Close all'/'Open' tools - page 47 1...404142434445464748495051525354...60 New comment f1trader 2010.06.09 11:19 #461 been looking, cant find it. Guyver 2010.06.09 11:52 #462 f1trader:been looking, cant find it. this? https://www.mql5.com/en/forum/175357 FXMan77 2010.06.17 18:16 #463 Guyver:I just wrote it up see if this helps.. ( EA) enter currency e.g EURUSD , GBPUSD or USDCHF doesn't matter which chart you attach it will only close the symbol you chose.. should have no issues -- guyver Thanks, I'm looking something like that: You can attach this EA to pair that you are not using but he will close your trades by Symbol by Profit. Have a look. extern int Profit=5; int start() { int i,type,err,Slippage=3; double price; bool result; //---- for(i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { type=OrderType(); if((type==OP_BUY || type==OP_SELL) && OrderProfit()>=Profit && OrderSymbol()==Symbol()) { while(true) { if(type==OP_BUY) price=MarketInfo(OrderSymbol(),MODE_BID); else price=MarketInfo(OrderSymbol(),MODE_ASK); result=OrderClose(OrderTicket(),OrderLots(),price,Slippage,CLR_NONE); if(result!=true) {err=GetLastError(); Print("LastError = ",err);} else err=0; if(err==135) RefreshRates(); else break; } } } else Print( "When selecting a trade, error ",GetLastError()," occurred"); } return(0); } Limiting one entry per Useful tips for participants Aggressive scalp ea Guyver 2010.06.17 19:12 #464 Try This One Thanks, I'm looking something like that: You can attach this EA to pair that you are not using but he will close your trades by Symbol by Profit. Have a look. Try this one.. 1. enter symbol 2. enter profit it will close the order *only* when the net profit of that symbol is > desired profit entered. Files: closingordersprofitsymbol.ex4 3 kb FXMan77 2010.06.17 20:40 #465 Guyver:Try this one.. 1. enter symbol 2. enter profit it will close the order *only* when the net profit of that symbol is > desired profit entered. You have to add few more symbols. e.g. I'm trading 5 pairs, with max trades 5 of each... EA must close only one pair with profit. Guyver 2010.06.17 21:24 #466 Bongo:You have to add few more symbols. e.g. I'm trading 5 pairs, with max trades 5 of each... EA must close only one pair with profit. Write down the symbol you need i'll update the Expert FXMan77 2010.06.17 22:42 #467 Guyver:Write down the symbol you need i'll update the Expert EURUSD, GBPUSD, EURGBP,USDJPY,USDCAN,AUDUSD. Just add more empty windows. Much easy will be use: type=OrderType(); if((type==OP_BUY || type==OP_SELL) && OrderSymbol()==Symbol()) you can use any symbol Bongo Guyver 2010.06.17 22:53 #468 Bongo:EURUSD, GBPUSD, EURGBP,USDJPY,USDCAN,AUDUSD. Just add more empty windows. Much easy will be use: type=OrderType(); if((type==OP_BUY || type==OP_SELL) && OrderSymbol()==Symbol()) you can use any symbol Bongo why don't you use your ideas update the code you posted of whatever it does and spare me the pain -guyver FXMan77 2010.06.17 23:10 #469 Guyver:why don't you use your ideas update the code you posted of whatever it does and spare me the pain -guyver Sorry for that. Many newbies are asking me to share my EA's, but nobody what to share with me, only you. Thanks. Bongo Guyver 2010.06.17 23:28 #470 Sorry for that. Many newbies are asking me to share my EA's, but nobody what to share with me, only you. Thanks. Bongo No problem , there you go Files: symbolswithprofitexit.ex4 4 kb 1...404142434445464748495051525354...60 New comment
been looking, cant find it.
been looking, cant find it.
this? https://www.mql5.com/en/forum/175357
I just wrote it up see if this helps.. ( EA)
enter currency e.g EURUSD , GBPUSD or USDCHF doesn't matter which chart you attach it will only close the symbol you chose.. should have no issues
-- guyverThanks,
I'm looking something like that:
You can attach this EA to pair that you are not using
but he will close your trades by Symbol by Profit.
Have a look.
extern int Profit=5;
int start()
{
int i,type,err,Slippage=3;
double price;
bool result;
//----
for(i=OrdersTotal()-1;i>=0;i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
type=OrderType();
if((type==OP_BUY || type==OP_SELL) && OrderProfit()>=Profit && OrderSymbol()==Symbol())
{
while(true)
{
if(type==OP_BUY) price=MarketInfo(OrderSymbol(),MODE_BID);
else price=MarketInfo(OrderSymbol(),MODE_ASK);
result=OrderClose(OrderTicket(),OrderLots(),price,Slippage,CLR_NONE);
if(result!=true) {err=GetLastError(); Print("LastError = ",err);}
else err=0;
if(err==135) RefreshRates();
else break;
} } }
else Print( "When selecting a trade, error ",GetLastError()," occurred");
}
return(0);
}
Try This One
I'm looking something like that:
You can attach this EA to pair that you are not using
but he will close your trades by Symbol by Profit.
Have a look.
Try this one..
1. enter symbol
2. enter profit
it will close the order *only* when the net profit of that symbol is > desired profit entered.
Try this one..
1. enter symbol
2. enter profit
it will close the order *only* when the net profit of that symbol is > desired profit entered.You have to add few more symbols.
e.g. I'm trading 5 pairs, with max trades 5 of each...
EA must close only one pair with profit.
You have to add few more symbols.
e.g. I'm trading 5 pairs, with max trades 5 of each...
EA must close only one pair with profit.Write down the symbol you need i'll update the Expert
Write down the symbol you need i'll update the Expert
EURUSD, GBPUSD, EURGBP,USDJPY,USDCAN,AUDUSD.
Just add more empty windows.
Much easy will be use:
type=OrderType();
if((type==OP_BUY || type==OP_SELL) && OrderSymbol()==Symbol())
you can use any symbol
Bongo
EURUSD, GBPUSD, EURGBP,USDJPY,USDCAN,AUDUSD.
Just add more empty windows.
Much easy will be use:
type=OrderType();
if((type==OP_BUY || type==OP_SELL) && OrderSymbol()==Symbol())
you can use any symbol
Bongowhy don't you use your ideas update the code you posted of whatever it does and spare me the pain
-guyver
why don't you use your ideas update the code you posted of whatever it does and spare me the pain -guyver
Sorry for that.
Many newbies are asking me to share my EA's,
but nobody what to share with me, only you.
Thanks.
Bongo
Many newbies are asking me to share my EA's,
but nobody what to share with me, only you.
Thanks.
BongoNo problem , there you go