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