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.
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