Hi, I couldn’t find anywhere how to set the trade size based on equity. My intention is having set open price and stop loss price to calculate trade size based on equity, e.g. 1% of equity (rounded up).
Anybody help pls.
Peter
Here is a basic position size calculation with percent risk and fixed stoploss size:
//MM lot size
REM Money Management
Capital = 10000
Risk = 0.01
StopLoss = 10 // Could be our variable X
REM Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
There are other many topics about position sizing: https://www.prorealcode.com/topics-tag/position-size/
https://www.prorealcode.com/topics-tag/position-sizing/
https://www.prorealcode.com/topics-tag/positionsize/
https://www.prorealcode.com/topics-tag/money-management/