How to make the volume round up?

Created at 27 Apr 2018, 10:10
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
JE

jeffwong_86

Joined 21.09.2017

How to make the volume round up?
27 Apr 2018, 10:10


Hi all,

may i know how to make the volume round up wihtout decimal behind?

ctrader default can do that, however our custom coding i cant find any solution for this?

example below: 

Above is default from ctrader it auto round up 34 / and the level of the RSI show 50

below its show 34.22170 / and the RSI level show 50.0000

In coding how can i omit the 4 decimal point behind?

 

Thank you !


@jeffwong_86
Replies

PanagiotisCharalampous
07 May 2018, 11:31

Hi jeffwong_86,

In C# you can use Math.Round() method to perform rounding on your numbers. If you post some code, I can modify it for you and demonstrate how to use the Math.Round() method.

Best Regards,

Panagiotis


@PanagiotisCharalampous