I have found this problem in one of my strategies. I suppose that the problem is in the trail stop internals (?), since the error is in the sell order. Here attached a false market replay, and the simplified strategy that generates the error. You must set the instrument YM 03-11, and volume chart to 5.
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
SetTrailStop("", CalculationMode.Ticks, 10, false);
BarsRequired = 1;
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
Print (CurrentBar.ToString() + "-" + Close[0].ToString());
// Condition set 1
if (CurrentBar == 16)
{
EnterLong(DefaultQuantity, "");
}
}
Thanks !

Comment