In my Create() section, my order is being set up exactly as instructed by the documentation and IDE. However, when I try to use the my_order.Send() method and specify a number of lots, it continues using the default of 1 instead of the num_contracts integer which I am specifying.
Code: Select all
my_order =
OrderCreator.MarketNextBar(new SOrderParameters(EOrderAction.SellShort, "my_order"));
In CalcBar() section, I have the following code which does not produce the desired result. Every time it runs, it will create an order with 1 contract:
I have verified via Expert Commentary that num_contracts contains an integer larger than 1.
Am I using this correctly? Is there better recommended approach to modifying the number of lots on the fly?
Thanks!