I have been trying to code an exit strategy for my ATM strategy that will exit the trade when the position has gone too far into the red. This is my current code:
if (GetAtmStrategyMarketPosition(atmStrategyId) == MarketPosition.Short && (Close[0] - GetAtmStrategyPositionAveragePrice(atmStrategyId) >= 9) { AtmStrategyClose(atmStrategyId); }
Thanks in advance.
Comment