Need help debugging while loop

 

Can anyone help me with this? I have written the following while loop. The idea behind it is that it keeps updating winprice and looseprice with the current Ask price until the current ask price is equal to the stop loss or take profit.

However it goes into a endless loop, because the Ask price never changes, it remains the same as when it first entered the loop.

while((askprice-SL*Point>StartPrice)&& (askprice +TP*Point < StartPrice+FAPSL*Point))

{

askprice=Ask;

if(askprice>=winprice)

PlaceBuyOrder();
if(askprice<=looseprice)
PlaceSellOrder();

}

Thanks in advance

 
Replace "while" to "if".
 
Roger wrote >>
Replace "while" to "if".

Thanks. This would require a reworking of the logics of my program, which I am looking into. Will let you know the outcome.