/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
CalculateOnBarClose = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (High[0] > High[1])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Low[0] < Low[1])
{
EnterShort(DefaultQuantity, "");
}
}
#region Properties
#endregion
}
}
There cannot be much missing, if there is something missing, this type of stop and reverse is a very simple and short code.
Thanx,
Steve
Comment