Thread: need help
View Single Post
  #7 (permalink)  
Old 07-25-2006, 03:43 PM
dreamer dreamer is offline
Member
 
Join Date: Feb 2006
Location: malaysia
Posts: 44
dreamer is on a distinguished road
void OpenSell()
{
int err, ticket;
double ldLot, ldStop, ldTake;
string lsComm;

ldLot = GetSizeLot();
ldStop = 0;
if ( StopLoss > 0 ) ldStop = Bid + StopLoss * Point ;
ldTake = 0;
if (TakeProfit > 0) ldTake = NormalizeDouble(GetTakeProfitSell(),Digits);
lsComm = GetCommentForOrder();

ticket=OrderSend(Symbol(),OP_SELL,ldLot,NormalizeD ouble(Bid,Digits),Slippage,ldStop,ldTake,lsComm,Ma gicNumber,0,Red);
if(ticket<=0)
{
err = GetLastError();
Print("Error opening Sell order [" + lsComm + "]: (" + err + ") " + ErrorDescription(err));
}
else
{
if (UseSound) PlaySound(NameFileSound);
}


hi guyss.... i need help to make it open another order only after the earlier position gain a profit (variable setting).



example

extern int Pips=15; // Distance in Pips from one order to another


Reply With Quote