Volume based on balance
Volume based on balance
29 Jun 2020, 12:28
Morning,
I am new to cAlgo and writing my own bots (it's great fun, has to be said). But, because of my lack of experience here and (limited) information online I would love some clarity on an area. I will do my best to explain what I mean, apologies if it isn't 100% clear.
Is it possible to have a bot open positions with a varied volume based on current balance?
So... using some easy numbers...
Let's say your starting balance is 10,000. Your bot then knows to open positions at 0.1 lots.
After a few days your balance is then 11,000. Automatically your bot opens positions at 0.11 lots.
On the flip side... you lose some and end up at 9,000. Your bot then runs at 0.09 lots.
Is this sort of thing possible in cAlgo?
I appreciate your time!
S
Replies
executiveunleashed
29 Jun 2020, 12:46
RE:
PanagiotisCharalampous said:
Hi executiveunleashed,
A cBot will execute an order at the volume you request it to do so. The calculation of the volume is up to you. The API provides you the information about the account's balance through Account.Balance.
Best Regards,
Panagiotis
I appreciate the quick reply -- thank you!
@executiveunleashed
PanagiotisCharalampous
29 Jun 2020, 12:43
Hi executiveunleashed,
A cBot will execute an order at the volume you request it to do so. The calculation of the volume is up to you. The API provides you the information about the account's balance through Account.Balance.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous