Submitted the order exactly like in the sample code and API spec, however PriceType upon assignment to the Order object is getting assigned 'invalid' as the value ? Order Submission is failed with the message "Failed. Price type is required". Msg line in the below code does return "PriceType invalid" as the error message. What am I doign wrong here ?
Dim hOrder As New Order
hOrder.Side = Side
hOrder.Symbol = Symbol
hOrder.Exchange = Exchange
hOrder.PriceType = "Limit"
hOrder.TIF = "OPG"
hOrder.Account = Account
hOrder.Warning = False
hOrder.Ticket = "Bypass"
MsgBox ("PriceType " & hOrder.PriceType)
If L1Qty > 0 & Side = "Buy" & L1Select = "Yes" Then
hOrder.Price = Bid - ((L1Perc * Bid) / 100)
hOrder.Quantity = L1Qty
rtnVal1 = hOrder.Submit(errMsg)