Syntax
Public Function PositionGetDouble(propertyID ENUM_POSITION_PROPERTY_DOUBLE, ByRef doubleVar As Variant) As Boolean
Description
This function is used to get the position property after Selected Position according to a given property ID and set the result on the doubleVar parameter.
Parameters
Key | Description |
propertyID | The property information to get it value, A value of typeENUM_POSITION_PROPERTY_DOUBLE. |
doubleVar | Received result value of type Double. |
Return value
Returns true if successful. Otherwise, returns false. In order to get an error, call GetLastError() function.
Sample
Public Sub main () Dim Price Dim Commission Dim Amount Ticket = PositonGetTicket (1) PositionSelect (Clng (Ticket))Returns True if position selected successfully PositionGetDouble POSITION_PRICE_OPEN , Price PositionGetDouble POSITION_COMMISSION, Commission PositionGetDouble POSITION_AMOUNT , Amount AlertMessage The price of ticket & Ticket & is: & Price & Commission & Commission & Amount & Amount End sub
See Also