Get Price of Last Deal (Order Executed) - page 3

 
fxsaber:

Thanks for code, in my case works as below

double OPLAST=0; //Price of the Last Order executed (
if (HistorySelect(0, TimeCurrent()) && (HistoryDealsTotal() > 0))
    OPLAST = HistoryDealGetDouble(HistoryDealGetTicket(HistoryDealsTotal() - 1), DEAL_PRICE); 
 
Great stuff, this was exactly what I was looking for. Thanks a lot!!
Reason: