Í am making some progress. I have everything working with 2 indepentendt entries. Now I am putting in a trigger to make an auto breakeven but am having trouble naming the stops.
The name for the stop is "Long1b"
protectedoverridevoid Initialize()
SetStopLoss("Long1b", CalculationMode.Ticks, Stop, false);
The below statement is incorrect with a n o overload error.
if (Close[0] > Position.AvgPrice + (triggerlevel) * TickSize)
{
SetStopLoss("Long1b",CalculationMode.Price, Position.AvgPrice);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\AutoBreakEven.wav");
}
This statement is correct and compiles ok.
if (Close[0] > Position.AvgPrice + (triggerlevel) * TickSize)
{
SetStopLoss(CalculationMode.Price, Position.AvgPrice);
PlaySound(@"C:\Program Files (x86)\NinjaTrader 7\sounds\AutoBreakEven.wav");
}
Thanks raef



Comment