HistorySelectByPosition – script MetaTrader 5

HistorySelectByPosition - script for MetaTrader 5
An example of using HistorySelectByPosition (based on the HistoryDealGetTicket use example). Position identifier is set as the input parameter. Next, the script attempts to create a list of orders and deals with the specified identifier.  Script operation example: 0: deal #116488443 at 2017.02.07 12:55:56 Enter, buy 0.03 EURUSD (order #132873637, position ID 132873637) 1: deal