ClosePartialPosition

Closes a portion of an open position.

Syntax

ClosePartialPosition(orderTicket: number, lotSize: number): boolean

Parameters

  • orderTicket: The ticket number of the position to partially close.

  • lotSize: The volume (in lots) to close.

Return Value

Returns a boolean value indicating whether the partial position closure was successful.

  • true: Position was partially closed successfully.

  • false: Failed to close part of the position.

Description

The ClosePartialPosition method allows you to close a portion of an open position.

Example

Last updated