cBot Parameter with Step=0.01 does not work properly

Created at 03 Jun 2023, 11:22
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!
Best.Algo.Trader's avatar

Best.Algo.Trader

Joined 24.05.2023

cBot Parameter with Step=0.01 does not work properly
03 Jun 2023, 11:22


Hi,

I am using of one of the sample cBots provided, added a currency pair and change the quantity parameter by using the up and down arrows of the input field. But instead of increasing or decreasingg the value by 0.01 the value is increased by 0.1.

As soon as I change the code and use a Step=0.15 it respects the second digit and changes the value by 0.15.

Am I the only one experiencing this behaviour?

Example code take from SampleBreakoutcBot:

[Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
public double Quantity { get; set; }

 


@Best.Algo.Trader
Replies

Best.Algo.Trader
12 Jun 2023, 01:49

RE:

Kaspricci said:

Hi,

I am using of one of the sample cBots provided, added a currency pair and change the quantity parameter by using the up and down arrows of the input field. But instead of increasing or decreasingg the value by 0.01 the value is increased by 0.1.

As soon as I change the code and use a Step=0.15 it respects the second digit and changes the value by 0.15.

Am I the only one experiencing this behaviour?

Example code take from SampleBreakoutcBot:

[Parameter("Quantity (Lots)", Group = "Volume", DefaultValue = 1, MinValue = 0.01, Step = 0.01)]
public double Quantity { get; set; }

 

I installed latest version 4.7.11 of cTrader Desktop for Windows and now it is working properly. 


@Best.Algo.Trader