increase lot size when account balance is rising?

Created at 23 May 2018, 23:47
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

jelle2500

Joined 25.11.2017

increase lot size when account balance is rising?
23 May 2018, 23:47


how do i code this?

for example: bot strarts with 10k and 0.1 lot size.

when account banalce reached 11k, lot size must be 0,11 and so on.


@jelle2500
Replies

PanagiotisCharalampous
24 May 2018, 09:44

Hi,

You can try something like this

 _volume = (long)Math.Ceiling(Account.Equity / 1000) * 1000

Best Regards,

Panagiotis


@PanagiotisCharalampous

jelle2500
24 May 2018, 09:47

RE:

Panagiotis Charalampous said:

Hi,

You can try something like this

 _volume = (long)Math.Ceiling(Account.Equity / 1000) * 1000

Best Regards,

Panagiotis

Thanks Panagiotis!


@jelle2500