How to calculate proper lot size ?

Created at 11 Feb 2022, 11:40
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!
DU

dudegrowth

Joined 06.12.2021

How to calculate proper lot size ?
11 Feb 2022, 11:40


Hi again,

So i'm trying to build a scalping system that watch the market in 5 minutes timeframe and execute trades based on simple algorithm, until here its all okay (I hope so), but when it comes to lot size its a bit tricky.

The formula i calculate lot size is:

willingToSpend = accountValue * .01 // IN THIS CASE I WANT TO RISK 1% OF MY TRADING ACCOUNT

stopLossDistance = willingToSpend / NUMBER_OF_PIPS 
calculate = stopLossDistance / VALUE_PER_PIP // In this case my account is in euro and i do the math on what's the value per pip for EUR to USD // for example 0.88

And this calculates me lot size for example it prints 0.23.

But as a scalping strategy, this system sometimes executes trades even on distances lower then one pip for example .05 pip and this calculation return value of more then 1 lot and when it touches the TP the value of it is for example $3 profit that means 2 times lower or 3 times lower than 1% of trading account, but when it touches SL it stops the SL of -$20 that is 2 times to 3 times bigger that my account value.

But when the trade size more than one pip for example 4 pips (more than one pip SL), this calculation formula somehow it works well, not accurate but its close to the ammount.

So is there any other formula on how can i calculate this more accurately ?

P.S my formula of lot size is based on this:

 


@dudegrowth
Replies

amusleh
14 Feb 2022, 09:04

Hi,

Which API you are using for your strategy? automate API or Open API?

As you opened the thread on Open API section, for calculation of Pip/tick size/value you can use this tutorial: Profit/Loss Calculation - Open API (spotware.github.io)


@amusleh

dudegrowth
14 Feb 2022, 12:41

RE:

amusleh said:

Hi,

Which API you are using for your strategy? automate API or Open API?

As you opened the thread on Open API section, for calculation of Pip/tick size/value you can use this tutorial: Profit/Loss Calculation - Open API (spotware.github.io)

Hi, Im using OPEN API


@dudegrowth