if (firstEntry)
{
firstEntryOrder = EnterLong(Convert.ToInt32(DefaultQuantity), @"FirstLong");
SetProfitTarget(CalculationMode.Ticks, ProfitTarget);
SetStopLoss(firstEntryOrder.Name,CalculationMode.T icks, StopLoss);
firstEntry = false;
}
else if (!firstEntry && BarsSinceExitExecution() > 4)
{
secondEntryOrder = EnterLong(Convert.ToInt32(DefaultQuantity), @"SecondLong");
SetProfitTarget(CalculationMode.Ticks, ProfitTarget);
SetStopLoss(secondEntryOrder.Name,CalculationMode. Ticks, StopLoss);
}
.
.
.
.
.
.
.
if ((Close[0] - Position.AveragePrice) > 4
SetStopLoss(secondEntryOrder.Name,CalculationMode. Price, Position.AveragePrice + 2 * TickSize);
I keep getting a message:
The name firstEntryOrder does not exist in the current context.
The name secondEntryOrder does notexist in the current context.
It seems like in document i can use fromEntrySignal
not sure if i used it correctly.
Comment