API support to modify order Volume

Created at 30 Nov 2024, 17:28
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!
o.hagliden's avatar

o.hagliden

Joined 03.11.2024

API support to modify order Volume
30 Nov 2024, 17:28


Hi,

One of the trading strategies I frequently use when trading manually involves adjusting the order volume up or down based on market conditions to minimize risk.

Unfortunately, this functionality is not currently available via the API, even though it is accessible through the user interface.

I believe this would be an incredibly valuable feature to include in the API, and I would greatly appreciate having it available in the future.

Best regards,
Olof


cTrader Automate
@o.hagliden
Replies

firemyst
06 Dec 2024, 09:18 ( Updated at: 06 Dec 2024, 09:30 )

What do you mean not available through the API?

It's right here:

https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/#modifyvolume

and you use it like so, where “_p” is your position object:

TradeResult r = _p.ModifyVolume(newVolume);
 


@firemyst