I have a strategy that moves the stoploss to position.averageprice once price moves 4 ticks in my favor. I would like the stoploss to then move to lock in 3 ticks of profit once price moves 8 ticks in my favor, yet I can't seem to figure out how. Here is my break even logic so far. Can I simply duplicate this logic and use different number to accomplish what I want?
if (Position.MarketPosition == MarketPosition.Flat)
{
SetStopLoss(CalculationMode.Ticks, StopLossTicks);
}
// If a long position is open, allow for stop loss modification to breakeven
else if (Position.MarketPosition == MarketPosition.Long)
{
// Once the price is greater than entry price + 3 ticks, set stop loss to breakeven
if (Close[0] > Position.AveragePrice + 3 * TickSize)
{
Print(Time[0].ToString()+ @"This should be changing SL");
SetStopLoss(CalculationMode.Price, Position.AveragePrice);
}
Chris
Comment