Forum

why is my OrderStopLoss and OrderTakeProfit set to zero?

Hi, I have the following code.. orderS = OrderSelect (buyTicket,SELECT_BY_TICKET); bCount++; // B2 bPrice[bCount] = OrderOpenPrice(); // bPrice[2] bTicket[bCount] = buyTicket; // bTicket[2] buyAvgPrice = (bPrice[ 1 ] + bPrice[ 2 ]) / 2 ; orderM =

why doesn't my program not update t/p and s/l levels?

Hi, I am new to this forum. I have just started to write my own EA.. I have the following codes.. if (Close[ 1 ] < B1S1Avg) // if previous close is below average price, then current price is nearer to sell level, so create a sell order to average up { //