The idea is, I'm looking for the my stop order to move to BE +/- 1 tick once price goes above 10 ticks from entry. I get the output to print what i ask it to do, but the order itself does not adjust to BE +/-1.
// Breakeven Stuff
if (Position.MarketPosition == MarketPosition.Flat)
{
SetStopLoss (CalculationMode.Ticks, stop);
}
// Long breakeven side
if (Position.MarketPosition == MarketPosition.Long
&& Close[0] > Position.AveragePrice + 10 * TickSize)
{
SetStopLoss (CalculationMode.Ticks, Position.AveragePrice + 1 * TickSize);
Print ("we changed to +5");
}
// Short breakeven side
if (Position.MarketPosition == MarketPosition.Short
&& Close[0] < Position.AveragePrice - 10 * TickSize)
{
SetStopLoss (CalculationMode.Ticks, Position.AveragePrice - 1 * TickSize);
Print ("we changed to -5");
}
In addition to that, i was wondering if it's possible to Move my Target order to BE +1 if the market goes below my entry price by X amounts. Similar to the way the stop is handled.
THanks,
Comment