How i can stop Duplicate Transactions in EA
Please help me
bool OrderIsActive(int ordertype)
{
for(int i=0;i<OrdersTotal();i++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderMagicNumber()==MagicNumber && Symbol()==OrderSymbol() && OrderType()==ordertype)
return(true);
}
return(false);
}
Is this true ??? If not, what is correct
- EA will not run on multiple pairs, need help
- Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6.
- While one currency has a trade or trades, the others musn't have trades by EA.
- Please use SRC button if you post code
- Here it is not necessary but make it your habit: count the orders down (in case you want to close one or more!)
- Check OrderSelect():
bool OrderIsActive(int ordertype) { for(int i=OrdersTotal()-1;i>=0;i--) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) continue; if (OrderMagicNumber()==MagicNumber && Symbol()==OrderSymbol() && OrderType()==ordertype) return(true); } return(false); }
But this shouldn't be the problem - I guess it is somewhere else.
Carl Schreiber: I guess it is somewhere else.
| In the presence of multiple orders (one EA multiple charts, multiple EA's,
manual trading)
|
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register