protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 1)
return;
// Set 1
if (Close[0] > (CurrentDayOHL1.CurrentOpen[0] * 0.1) )
{
EnterLong(Convert.ToInt32(DefaultQuantity), "");
}
// Set 2
if (Close[0] < (CurrentDayOHL1.CurrentOpen[0] * -0.1) )
{
EnterShort(Convert.ToInt32(DefaultQuantity), "");
}
}
Comment