Live Chat by Hybrid Solutions
Knowledgebase
OrderSend
Posted by Mohammad Rahhal on 25 January 2012 03:10 PM

This function used to perform trade opertion by sending VtlTradeRequest variable to get result in VtlTradeResult variable.

Public Function OrderSend(ByRef request As VtlTradeRequest, ByRef result As VtlTradeResult) As Boolean

Parameters

Parameter  Description 
request Structure of VtlTradeRequest variable which describe the trade operation
result Structure of VtlTradeResult variable which describe the trade out put operation

Return value

Returns true value if successfully  performed.

Sample

  ' This code to make a market order

Publice Sub main()

  Dim result1 As VTLGeneral.VtlTradeResult

  Dim request1 As VTLGeneral.VtlTradeRequest

                       request1.action = 0

                       request1.symbol = "EURUSD"

                       request1.volume = 0.1

                       request1.type = 0

  GUI.MsgDialog(ClientCode.OrderSend(request1, result1).ToString())

  GUI.MsgDialog(" The result is : " & result1.retcode.tostring & " , The price is : " & result1.price.tostring & ", the ask is : " & result1.bid.tostring)

 End Sub


See Also


Back to VTL Server Script Index

(0 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Hybrid Solutions