Thread: How to code?
View Single Post
  #1875 (permalink)  
Old 07-02-2009, 06:24 PM
SPACECHIMP's Avatar
SPACECHIMP SPACECHIMP is offline
Member
 
Join Date: Feb 2006
Location: West Michigan, USA.
Posts: 86
SPACECHIMP is on a distinguished road
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!
Reply With Quote