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
