Calculate Volume size based on Account Balance Risk %, SL Pip Value and Symbol Pip Value
Calculate Volume size based on Account Balance Risk %, SL Pip Value and Symbol Pip Value
17 Apr 2023, 14:20
Hi,
I want to calculate Volume using the below formula ,but I am facing ths Error "errorCode": "TRADING_BAD_VOLUME", "ctidTraderAccountId": "12345", "description": "Order volume 80.00 is smaller than group minVolume=1000.00"
TradeVolume=AccountBalance * RiskPercentageForTrade
var TradeVolume =TradeAmount / (StopLossDistance in pips * Symbol.PipValue)
I need to Convert this TradeVolume With Respect to lots size of Symbol , is there any way how to do this ?
Thanks
Replies
ctid5696420
18 Apr 2023, 09:49
RE:
PanagiotisChar said:
Hi there,
Try wrapping the volume with the Symbol.NormalizeVolumeInUnits() method.
Need help? Join us on Telegram
Need premium support? Trade with us
I am Using Open API and C#, will this Symbol.NormalizeVolumeInUnits() method works the same ?
Thanks
@ctid5696420
PanagiotisChar
18 Apr 2023, 09:39
Hi there,
Try wrapping the volume with the Symbol.NormalizeVolumeInUnits() method.
Aieden Technologies
Need help? Join us on Telegram
Need premium support? Trade with us
@PanagiotisChar