I've been trying to backtest SetTrailStop(), but I have not been able to get it to work. I am using TD ameritrade backtest data (minute only). Any tips?
Here's the basic test code:
protected override void Initialize()
{
SetTrailStop("EnterLong",CalculationMode.Percent,S top,true);
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (CCI(14)[0] > MainEntryCriteria && Rising(this.TEMA(20)))
{
EnterLong(DefaultQuantity, "EnterLong");
}
}
Comment