(posting on behalf of a client who was asking)
Question
Is there a way to retrieve the algo parameters set on an order?
- Order submitted to “VWAP DEMO” with Aggressiveness = High and Max Vol % = 5
(posting on behalf of a client who was asking)
Question
Is there a way to retrieve the algo parameters set on an order?
Answer
(included as it was provided)
Yes, you can query Cache Control for the "custom" parameters.
Note, this varies by algo, so the parameters could be in any of the other "custom" field. Please reach out to your account representative for a mapping of algo parameters to custom fields.
VB code:
Sub DataSubscription_CacheEvent(ByVal Action As Long, ByVal ROW As Long) Dim I As Integer Dim BrSeq As Variant Dim Side As Variant Dim ExecQuantity As Variant Dim symbol As Variant Dim ExecPrice As Variant Dim Status As Variant Dim myerr As Variant Dim Account As Variant Dim Quantity As Variant Dim RefNum As Variant Dim PriceType As Variant Dim OrderRefKey As Variant Dim ParentOrdRefKey As Variant Dim Exchange As Variant Dim Price As Variant Dim TIF As Variant Dim Memo As Variant Dim MsgType As Variant Dim OrdDesc As String Dim ProgressPct As Double Dim AvgPrice As Variant Dim custom2 As Variant ' =========== Action List ============== ' 1 : Snapshot ' 4 : New insert ' 5 : Update ' ====================================== If (Action = 1) Then For I = 0 To ROW - 1 DataSubscription.GetCell I, "BrSeq", BrSeq, myerr DataSubscription.GetCell I, "Side", Side, myerr DataSubscription.GetCell I, "ExecQuantity", ExecQuantity, myerr DataSubscription.GetCell I, "ExecPrice", ExecPrice, myerr DataSubscription.GetCell I, "symbol", symbol, myerr DataSubscription.GetCell I, "Account", Account, myerr DataSubscription.GetCell I, "Quantity", Quantity, myerr DataSubscription.GetCell I, "RefNum", RefNum, myerr DataSubscription.GetCell I, "Status", Status, myerr DataSubscription.GetCell I, "PriceType", PriceType, myerr DataSubscription.GetCell I, "Price", Price, myerr DataSubscription.GetCell I, "Memo", Memo, myerr DataSubscription.GetCell I, "TIF", TIF, myerr DataSubscription.GetCell I, "OrderRefKey", OrderRefKey, myerr DataSubscription.GetCell I, "ParentOrdRefKey", ParentOrdRefKey, myerr DataSubscription.GetCell I, "MsgType", MsgType, myerr DataSubscription.GetCell I, "AvgExecPrice", AvgPrice, myerr DataSubscription.GetCell I, "custom2", custom2, myerr 'If Not OrderRefKey = "NONE" And Not MsgType = "ADMIN" And Not PriceType = "Invalid" Then Worksheets("Demo").Cells(currRow, "A").Value = Side Worksheets("Demo").Cells(currRow, "B").Value = Quantity Worksheets("Demo").Cells(currRow, "C").Value = symbol Worksheets("Demo").Cells(currRow, "D").Value = PriceType Worksheets("Demo").Cells(currRow, "E").Value = Price Worksheets("Demo").Cells(currRow, "F").Value = TIF Worksheets("Demo").Cells(currRow, "G").Value = OrderRefKey Worksheets("Demo").Cells(currRow, "H").Value = RefNum Worksheets("Demo").Cells(currRow, "I").Value = Status Worksheets("Demo").Cells(currRow, "J").Value = ExecQuantity Worksheets("Demo").Cells(currRow, "K").Value = ExecPrice Worksheets("Demo").Cells(currRow, "L").Value = MsgType Worksheets("Demo").Cells(currRow, "M").Value = AvgPrice Worksheets("Demo").Cells(currRow, "N").Value = custom2 currRow = currRow + 1 'End If Next I Else DataSubscription.GetCell ROW, "BrSeq", BrSeq, myerr DataSubscription.GetCell ROW, "Side", Side, myerr DataSubscription.GetCell ROW, "ExecQuantity", ExecQuantity, myerr DataSubscription.GetCell ROW, "ExecPrice", ExecPrice, myerr DataSubscription.GetCell ROW, "symbol", symbol, myerr DataSubscription.GetCell ROW, "Account", Account, myerr DataSubscription.GetCell ROW, "Quantity", Quantity, myerr DataSubscription.GetCell ROW, "RefNum", RefNum, myerr DataSubscription.GetCell ROW, "Status", Status, myerr DataSubscription.GetCell ROW, "PriceType", PriceType, myerr DataSubscription.GetCell ROW, "Price", Price, myerr DataSubscription.GetCell ROW, "Memo", Memo, myerr DataSubscription.GetCell ROW, "TIF", TIF, myerr DataSubscription.GetCell ROW, "OrderRefKey", OrderRefKey, myerr DataSubscription.GetCell ROW, "ParentOrdRefKey", ParentOrdRefKey, myerr DataSubscription.GetCell ROW, "MsgType", MsgType, myerr DataSubscription.GetCell ROW, "AvgPrice", AvgPrice, myerr DataSubscription.GetCell ROW, "custom2", custom2, myerr 'If Not OrderRefKey = "NONE" And Not MsgType = "ADMIN" And Not PriceType = "Invalid" Then Worksheets("Demo").Cells(currRow, "A").Value = Side Worksheets("Demo").Cells(currRow, "B").Value = Quantity Worksheets("Demo").Cells(currRow, "C").Value = symbol Worksheets("Demo").Cells(currRow, "D").Value = PriceType Worksheets("Demo").Cells(currRow, "E").Value = Price Worksheets("Demo").Cells(currRow, "F").Value = TIF Worksheets("Demo").Cells(currRow, "G").Value = OrderRefKey Worksheets("Demo").Cells(currRow, "H").Value = RefNum Worksheets("Demo").Cells(currRow, "I").Value = Status Worksheets("Demo").Cells(currRow, "J").Value = ExecQuantity Worksheets("Demo").Cells(currRow, "K").Value = ExecPrice Worksheets("Demo").Cells(currRow, "L").Value = MsgType Worksheets("Demo").Cells(currRow, "M").Value = AvgPrice Worksheets("Demo").Cells(currRow, "N").Value = custom2 currRow = currRow + 1 'End If End If End Sub