how to make sure all the orders closed with no error?
OrderClose and OrderDelete maybe wrong when you close or delete orders
if some orders are not closed in for clause,they may not be close later,as the total profit not match your condition anymore
FYI
This is great! Does any know if it's possible only close the profit order? Let's say there were 10 buy order in past 10 bar, 3 of them become profit, we only close those 3?
Thank you very much,
dont understand why people need such EA when MT4 does it already ???
you can set your sl / tp pending order sell limit , buy limit with MT4 so at least you know it will stop.
so why this EA ??
hey, your EA deoesn't close all order.
Please look at the line 265-278
if(OrderType()==OP_BUY){
OrderClose(OrderTicket(),OrderLots(),Bid,MaxSlippage,Violet);
}
if(OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),Ask,MaxSlippage,Violet);
}
I change it code below to close all order with no error
if(OrderType()==OP_BUY)
{
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),5,Violet);
}
if(OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),5,Violet);
}
hey, your EA deoesn't close all order.
Please look at the line 265-278
if(OrderType()==OP_BUY){
OrderClose(OrderTicket(),OrderLots(),Bid,MaxSlippage,Violet);
}
if(OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),Ask,MaxSlippage,Violet);
}
I change it code below to close all order with no error
if(OrderType()==OP_BUY)
{
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),5,Violet);
}
if(OrderType()==OP_SELL)
{
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),5,Violet);
}
see here
ticket=OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),5,Black);
This is great! Does any know if it's possible only close the profit order? Let's say there were 10 buy order in past 10 bar, 3 of them become profit, we only close those 3?
Thank you very much,
Hi there,
I uploaded the EA, unfortunately it did not close any open orders. when I compiled the EA, it was showing lots of warnings and I don't know how to clean or correct those warnings.
Can anyone help?
samarshi
rarshi@yahoo.com
Hi Yogie Pratama,
So please how can you help me in removing those warnings, because with these warnings the EA won't close the orders.
Thank you.
Samarshi
rarshi@yahoo.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Close@Profit:
Author: Jan Kafka