View only closed trading positions from history
long deal_entry = HistoryDealGetInteger(deal_ticket, DEAL_ENTRY); if(deal_entry == DEAL_ENTRY_OUT) { // order is closed }
Ludovico Mattiuzzo:
I test and Trade window have 3 positions ... but I get 7 positions with:
if(deal_entry == DEAL_ENTRY_OUT)
?!
You are confusing Orders, Positions and Deals. Please go read the docs about it
Ludovico Mattiuzzo:
You are confusing Orders, Positions and Deals. Please go read the docs about it
You are confusing Orders, Positions and Deals. Please go read the docs about it
Yes... but:
Can I get code that list history positions like on MT5 (Toolbar - History) ..... with filter: 2days
??
Hi
With this we can see current orders and orders (positions) from history:
https://www.mql5.com/en/docs/trading/historyordergetticket
but I need to know which one are closed (MT5: __History View__) and wich are opened: MT5: __Trade View__
?!
BR
J.