With an open Position, history_order.PriceOpen() returns 0.0

 

In the following script,  history_order.PriceOpen() returns value of 0.0. Why?

 
Don BaechtelIn the following script,  history_order.PriceOpen() returns value of 0.0. Why?

history_order.PriceOpen() returns 0.0 because market orders do not store an open price.

The actual execution price is in the deals (HistoryDealGetDouble(..., DEAL_PRICE)) or in the position (PositionGetDouble(POSITION_PRICE_OPEN)).

 
Miguel Angel Vico Alba #:

history_order.PriceOpen() returns 0.0 because market orders do not store an open price.

The actual execution price is in the deals (HistoryDealGetDouble(..., DEAL_PRICE)) or in the position (PositionGetDouble(POSITION_PRICE_OPEN)).

Thanks.