I'm using Ninjatrader 7.0.1000.2.
I want to store orders in ArrayList, but I'm getting an error message
#region Variables
public ArrayList OrderList=new ArrayList();
IOrder last_buy_order=null;
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
CalculateOnBarClose = false;//Calculate on every tick
Unmanaged = true;//Using unmanaged order methods
TraceOrders = true;
ExitOnClose = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (OrderList.Count<1)
{
last_buy_order=SubmitOrder(0, OrderAction.Buy, OrderType.Market, 100000, 0, 0, "", "");
try
{
OrderList.Add(last_buy_order);
}
catch(Exception e){}
}else return;
}
Thank you.

Comment