protectedoverridevoid
OnBarUpdate()
{
if (something is true)
{
entry = High[1]+ 0.02;
stop = Low[2]- 0.03;
target = High[1] + (entry - stop);
SetStopLoss("ltarget1",CalculationMode.Price, stop,true);
SetProfitTarget("ltarget1",CalculationMode.Price, target);
EnterLongLimit(shares, entry, "ltarget1");
SetStopLoss("ltarget2",CalculationMode.Price, stop,true);
SetProfitTarget("ltarget2",CalculationMode.Price, (target + (target - entry)));
EnterLongLimit(shares, entry, "ltarget2");
}
}

Comment