The problem I'm having is that in replay the orders are getting filled right away on the crossover. Also I'm unable to add a stop. I'd like for the stop to go above the high of the entry candle.
if (CrossAbove(xyzLevel))
{
EnterShortLimit(DefaultQuantity, xyzLevel, "S1");
}
The stops are also hundreds of points away from the market with this..
if (Position.MarketPosition == MarketPosition.Long)
{
SetStopLoss("L1",CalculationMode.Ticks, Low[0] -5*TickSize,false);
}
if (Position.MarketPosition == MarketPosition.Short)
{
SetStopLoss("S1",CalculationMode.Ticks, High[0] +5*TickSize,false);
}
Not sure what is wrong, thanks.
Comment