For obtaining information about a specific closed order (History Order). Just set a shift for target order. The shift for Latest closed order is zero and for one order before is 1 and one before that 2 and so on. In the table below (N=Shift)
Note: These are those orders which opened by current magic number and current symbol. It means ESB only detects its own order.
Name | Parameters | Description |
[CLOSED] Ticket | – | Returns ticket of the Nth closed order |
[CLOSED] Profit ($) | – | Returns profit of the Nth closed order |
[CLOSED] Lot | – | Returns lots of the Nth closed order |
[CLOSED] Stop Loss | – | Returns stop loss of the Nth closed order (only MT4) |
[CLOSED] Take Profit | – | Returns take profit of the Nth closed order (only MT4) |
[CLOSED] Open Price | – | Returns open price of the Nth closed order |
[CLOSED] Close Price | – | Returns close price of the Nth closed order |
[CLOSED] Duration | – | Returns open duration of the Nth closed order in seconds |
[CLOSED] Open Time | – | Returns passed seconds from open of the Nth closed order |
[CLOSED] Close Time | – | Returns passed seconds from close of the Nth closed order |
[CLOSED] Open Candle | – | Returns the open candle number of the Nth closed order |
[CLOSED] Close Candle | – | Returns the open candle number of Nth closed order |
[CLOSED] Swap | – | Returns swap value of the Nth closed order |
[CLOSED] Commission | – | Returns calculated commission of the Nth closed order |
[CLOSED] Fee | – | Returns calculated fee of the Nth closed order |
[CLOSED] Type | – | Returns Type of the Nth closed order (BUY or SELL) |
[CLOSED] Is Closed by SL | – | Returns True if Nth closed order is Closed by SL |
[CLOSED] Is Closed by TP | – | Returns True if Nth closed order is Closed by TP |