|
int start()
{
int total,ord,i;
string symbol;
total = OrdersTotal();
for(i=0;i<total;i++)
{
OrderSelect(i,SELECT_BY_POS);
if(OrderSymbol() = Symbol())ord++;
}
if(ord>0) return (0); //Abort! A Position For This Pair is Already Open
//the rest of my program code
}
I've found in reality, I've had to use pauses for a couple seconds in the code due to brokers not instantly opening positions.
__________________
www.LiveTeamTrading.com
The FIRST LIVE Team trading Network Community for FOREX TRADERS! Ask me about Getting an Invite!
|