if(CalculateSpread()<=iSpread)
{
if (tip==OP_BUY) if (OrderSend(Symbol(),OP_BUY,Lot,NormalizeDouble(Bid,Digits),slippage,
NormalizeDouble(Ask - stoploss*Point,Digits),
NormalizeDouble(Ask + takeprofit*Point,Digits),NULL,MagicNumb,clrBlue)!=-1) Comment("Open Buy");
if (tip==OP_SELL) if (OrderSend(Symbol(),OP_SELL ,Lot,NormalizeDouble(Ask,Digits),slippage,
NormalizeDouble(Bid + stoploss*Point,Digits),
NormalizeDouble(Bid - takeprofit*Point,Digits),NULL,MagicNumb,clrRed)!=-1) Comment("Open Sell");
}