I'm the newbie for this tool.
Now I'm trying to back test my strategy. My strategy open poisiton at market close and close it next day market close. So I wrote codes something like below
protected override void OnBarUpdate()
{
// Condition set 1
if (my stratey say enter)
{
EnterLong();
}
But the problem is actually the market order is fullfilled at next day open price not today's close price. So I changed it to
EnterLongLimit(Bars.CurrentAsk);
But now the order is canceled.
Can anyone let me know how to implement MOC order for backtesting?
Thanks.

Comment