PDA

View Full Version : Problem in finding the stop loss



ankitkalindi
10-05-2013, 10:42 AM
Can some body tell me how to find the stop loss from the history i mean which function helps to find the stop loss from the history as we have in mt4 orderstoploss() function.Thanks in Advance

Hassan-HS
10-05-2013, 11:26 AM
Dear sir,

you can get the SL as following:

If you are use VTL client:
1-Select the order using OrderSelect (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1748)function.
2-Use OrderGetDouble (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1749)function to get SL.

Sample:



Dim OrderID
Dim SL
OrderID=11111
OrderSelect Clng(OrderID)
If OrderGetDouble(Order_SL,SL) then
MsgBox SL
End if

If you are use VTL server:
you can get the Order (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/3666)object that contains its all information using index (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/3663)or ID (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/3664).

Sample:



Public Sub main()
Dim COrder As VTLGeneral.Order
Dim ID = 11111
Dim S As String
COrder = ClientCode.OrderByID(ID)
S = S & "OrderId:" & COrder.OrderId.Tostring()
S = S & " BuySell: " & COrder.BuySell.Tostring()
S = S & " Lots: " & COrder.Lots
S = S & " OrderTicket: " & COrder.OrderTicket.Tostring()
S = S & " OrderTime: " & COrder.OrderTime.Tostring()
S = S & " OrderType: " & COrder.OrderType.Tostring()
S = S & " Sl: " & COrder.Sl.Tostring()
S = S & " SymbolID: " & COrder.SymbolID.Tostring()
S = S & " SymbolName: " & COrder.SymbolName.Tostring()
S = S & " TP: " & COrder.TP.Tostring()
S = S & " LimitPrice: " & COrder.LimitPrice.Tostring()
GUI.MSGDialog(S)
End Sub

ankitkalindi
10-07-2013, 12:11 PM
can somebody tell me how to loop or how to select the order from the ordertotal history?that we have in mt4 if(select,selectbypos).... like that

b_morar
10-07-2013, 02:15 PM
Dear Sir,

Using VTL client:


Public Sub main()
Dim Counter
Dim SL
For Counter=1 to OrdersTotal()
OrderSelectByIndex Clng(Counter)
If OrderGetDouble(Order_SL,SL) then
MsgBox SL
End if
Next
End Sub




2-Using VTL Server



Public Sub main()

Dim COrder As VTLGeneral.Order

Dim i

Dim S As String

For i = 1 To ClientCode.OrdersTotal()

S = S & i.ToString()

COrder = ClientCode.OrderByIndex(i)

S = S & "OrderId:" & COrder.OrderId.Tostring()

S = S & " BuySell: " & COrder.BuySell.Tostring()

S = S & " Lots: " & COrder.Lots

S = S & " OrderTicket: " & COrder.OrderTicket.Tostring()

S = S & " OrderTime: " & COrder.OrderTime.Tostring()

S = S & " OrderType: " & COrder.OrderType.Tostring()

S = S & " Sl: " & COrder.Sl.Tostring()

S = S & " SymbolID: " & COrder.SymbolID.Tostring()

S = S & " SymbolName: " & COrder.SymbolName.Tostring()

S = S & " TP: " & COrder.TP.Tostring()

S = S & " LimitPrice: " & COrder.LimitPrice.Tostring()

GUI.MSGDialog(S)

Next

End Sub

ankitkalindi
10-08-2013, 09:54 AM
can some body tell me how to get the op_sell ,op_buy,op_buystop,op-sellstop this type of function in vtl

b_morar
10-08-2013, 11:11 AM
Dear Sir,


You can find our VTL client trade Enums here (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2596), and trade Enums of VTL server here (http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1904)

Hassan-HS
01-09-2014, 09:42 AM
Dear Sir,

Please update us if every thing is clear now or not, and let me know if you need any further assistance.