Hello, I am trying to send a Stop Market entry order from excel VBA to REDI Plus, the code is like below,
Dim hOrder As New Order
hOrder.Symbol ='SQQQ
hOrder.Side = "Buy"
hOrder.Quantity = 100
hOrder.Exchange = "GSDE Algo"
hOrder.PriceType = "SOR GSDE"
hOrder.StopPrice = 26.88
hOrder.TIF = TIF
hOrder.Account = AccountID
hOrder.Ticket = "Bypass"
It filled as a market order immediately without waiting for he price breakout the StopPrice. I checked the variable, hOrder.IsStopPriceEnabled which is false in this case. My question is that how can I enable it?
Also I tried some other PriceTypes from the API, like the "Stop", it will pop up "PriceType invalid" error.
By the way, I am able to send the stop market entry order in REDI plus without problem. it just need to set the DESINATION as GSCO NA Eq Algo, the PRICE TYPE as SOR, the ORDER TYPE as Stop, and fill out the price in the "STOP" field instead of "PRICE" field. But in the API, there is only one property to set the "Price Type" and "Order Type", the options are:
• Market
• Limit
• Stop
• Stop Limit
• Peg Ask
• Peg Bid
• Peg Mid
• Market Close
• Limit Close
So how can I set them from VBA code to match the fields in REDI Plus?