Is there any example how to create a contract with user specified lot size and assign to
Thank you in advanced!
How to code user specific lot size [SOLVED]
Questions about MultiCharts .NET and user contributed studies.
3 posts • Page 1 of 1
- Posts: 2080
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1525 times
- Been thanked: 1483 times
williamhk wrote:Is there any example how to create a contract with user specified lot size and assign to SOrderParameters?
I don't know if the specified lot size can be assigned to SOrderParameters, but you can define there Contracts.UserSpecified, and then specify your order size when you submit an order in the CalcBar() method.
Code: Select all
public class TestStrategy : SignalObject
private IOrderMarket buy_order;
protected override void Create()
buy_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.UserSpecified, "MACrossLE", EOrderAction.Buy));
protected override void CalcBar()
if (enterLong == true)