Syntax
Public Overrides Function ClosePosition(ByVal AccountID As Long, ByVal Ticket As Long, ByVal Amount As Double, ByVal Price As Double, ByVal RefPrice As Double, ByVal Comm As Double)As TransResult
This function is to close an open position at a specific price for theselected account.
Parameters
Key | Description |
AccountID | Position account ID |
Ticket | Ticket ID for the position you want to close |
Amount | Lot amount |
Price | The price you want to close in |
RefPrice | Reference symbol price |
Comm | The Commission you want to use when closing the position |
See Also