While the below code compiles fine, it does not send out any exit orders.....
if (BarsInProgress == 1)
{ExitLongStop(1, true, 1, Position.AvgPrice - 8 * TickSize, "LONGstop", "LONG");}
{ExitLongLimit(1, true, 1, Position.AvgPrice + 6 * TickSize, "LONGtarget", "LONG");}
{
// If a long position is open, allow for stop loss modification to breakeven
if (Position.MarketPosition == MarketPosition.Long)
{
// Once the price is greater than entry price+12 ticks, set stop loss to breakeven + 2 ticks
if (High[0] > Position.AvgPrice + 12 * TickSize)
{
ExitLongStop(1, true, 1, Position.AvgPrice + 2 * TickSize, "LX", "LONG");
}
}
Any thoughts?
Comment