Found another bug in OnBar() event, the Max Spread should be calculated correctly, to match cTrader displayed value in Active Symbol Panel -> Symbol tab
The correct code should be:
In cTrader Spread is always displayed as:
I fixed on my code, please consider the fix for further releases of this robot.
Cheers,
Gabriel