I'm running a strategy that I've run many times before without error.
I have both SetTrailStop(() and SetProfitTarget() in the OnExecution() routine.
I have trace=true on and I see messages saying, "Amended trail stop order" as the price moves.
After some messages, the output says, "Attempted to divide by zero."
I've never seen that message before.
What could be causing that?
Comment