private OrderType oType = OrderType.Limit;
protected void Initialize()
{
if(OType == OrderType.Limit)
CalculateOnBarClose = true;
else if(OType == OrderType.StopLimit)
CalculateOnBarClose = false;
}
And if not, can it be changed in OnBarUpdate() such as:
protected void Initialize()
{
CalculateOnBarClose = false;
}
protected void OnBarUpdate()
{
if(OType != OrderType.StopLimit && CalculateOnBarClose == false)
{
CalculateOnBarClose = true;
return;
}
else if(OType == OrderType.StopLimit && CalculateOnBarClose == true)
{
CalculateOnBarClose = false;
}
Comment