I have an strategy running multiple "substrategies". One one strategy opens an opposite position to the current position I would like to close the open position and then enter in the new direction.
i.e.- MarketPosition is long, and we get a short signal, so we close the long and then open a long.
I've tried doing:
if (Position.MarketPosition == MarketPosition.Long)
{
Position.Close();
}
EnterShort(contratos, EntryName[StrategyOne]);
What is the best way to accomplish this?

Comment