protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 1)
return;
candlesize = High[0] - Low[0];
if ((High[1] < EMA1[0])
&& (Close[0] > EMA1[0]))
{
EnterLong();
SetStopLoss("", CalculationMode.Price,(Low[0]), false);
SetProfitTarget("" , CalculationMode.Ticks, candlesize);
}

Comment