protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
TimeInForce = Cbi.TimeInForce.Day;
LongThreshold = High[0] + 5*TickSize;
ShortThreshold = Low[0] - 5*TickSize;
}
Where LongThreshold and ShortThreshold are as follows:
privatedouble m_LongThreshold = 0.0;
privatedouble m_ShortThreshold = 0.0;
[Description("Buy Long Price")]
[Category("Parameters")]
publicdouble LongThreshold
{
get { return m_LongThreshold; }
set { m_LongThreshold = Math.Max(1, value); }
}
[Description("Sell Short Price")]
[Category("Parameters")]
publicdouble ShortThreshold
{
get { return m_ShortThreshold; }
set { m_ShortThreshold = Math.Max(1, value); }
}

Comment