HELP: opening price of a pending order

 

Hello. Can you help with this?:

To refer to an opening price of a trade, I use "OrderOpenPrice ()". But How do I make reference to the opening price of a pending order, that has not been executed yet? (eg OP_BUYSTOP)

Thank you very much for all the help you can give me.

Greetings
Trader201

 
the same.
 
WHRoeder:
the same.


Hello WHRoeder. didn't work. For the test, I put this code:

int start()
{
//string B=DoubleToStr(Bid, int 2);

if (OrdersTotal()==0)
{
int ticket=OrderSend("EURUSD",OP_BUYSTOP,0.01,Ask+0.0020,3,Ask-0.0010,Ask+0.0060, NULL,0,0,CLR_NONE);
double price=OrderOpenPrice();
Alert(price);
}
return(0);

}





 
 

Hello qjol. Thanks for your help. Now I have two problems:

The first is that it gives me a different price than the open price(the alert fuctionsays 1.3603, when the operation is to be open to 1.3588 (a difference of 15 pips). I thought perhaps it was giving me the price it was when the order was issued, but neither is the price (the difference is 20 pips, not 15).

The other problem is that the "wrong" price, says only once (and sometimes doesn't say at any time)

Greetings

trader201