Lot Size/Volume Calculation Issue Using Open API

Created at 29 Apr 2023, 17:25
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!
CT

ctid5696420

Joined 17.02.2023

Lot Size/Volume Calculation Issue Using Open API
29 Apr 2023, 17:25


Hi,

I am using Open API and C# for trading solution development and I need to calculate this volume for Trade .
Below is what I am using to calculate the volume and it is working fine for Forex Market But Fails for other Market Like Crypto.

if I have Given 200 in Stop Loss when Creating Position using Ctrader I am Getting relativeStopLoss = 2000000 for BTCUSD and if I have given Stop Loss 200 I am Receiving 2000 For EURUSD why there is difference between both Symbols ?

 

 

StopLossDistanceInPIP = RelativeStopLoss / 10

 TradeAmount = Balance * (RiskPercentageForTrade / 100)
 TradeVolume= ((TradeAmount / StopLossDistanceInPIP) / SymbolPipValue);


@ctid5696420