Create "Adaptive Algo" Order - Interactive Broker API
Show older comments
I'm trying to determine the matlab method of creating an "Adaptive Algo" order in the Interactive Broker api. The c# method is stated here: https://interactivebrokers.github.io/tws-api/ibalgos.html#adaptive however, I can't figure out its matlab equivalent
C#:
Order baseOrder = OrderSamples.LimitOrder("BUY", 1000, 1);
...
AvailableAlgoParams.FillAdaptiveParams(baseOrder, "Normal");
client.placeOrder(nextOrderId++, ContractSamples.USStockAtSmart(), baseOrder);
...
public static void FillAdaptiveParams(Order baseOrder, string priority)
{
baseOrder.AlgoStrategy = "Adaptive";
baseOrder.AlgoParams = new List<TagValue>();
baseOrder.AlgoParams.Add(new TagValue("adaptivePriority", priority));
}
What I've done so far in Matlab:
% Create TWS connection and Create Order
ib = ibtws('',7496);
ibOrder = ib.Handle.createOrder;
ibOrder.action = 'BUY';
ibOrder.totalQuantity = 1000;
ibOrder.orderType = 'LMT';
% Specifying Adaptive Algo Order
ibOrder.algoStrategy = "Adaptive";
Accepted Answer
More Answers (0)
Categories
Find more on Transaction Cost Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
