Hello.
I am currently coding a system for which I want to add a volatility adjusted position sizing, i.e. regardless of the type of market I want to risk the same dollar amount.
On paper the formula is like this:
(Equity * Risk %) / (ATR * $ per contract)
so for example if I take the following paramaters
Equity: 100 000 USD
Risk%: 2%
ATR: 25
Market: S&p500 -> $/contract= $250
The formula gives me:
(100 000 * 2%) / (25 * 250) = 0.32 as a position.
I could code the formula for the first 3 parameters but I am stuck with the $ per contract. I was unable to find any answer in the forum.
Could anyone help me with this?
Thanks!
Xavier
The “$ per contract” can be automatically retrieved with the POINTVALUE instruction.
Thanks Nicolas.
I saw the pointvalue function mentioned in several topics, however this functional gives the €/$ per point, but I need the one per contract/lot
Since you can’t buy/sellshort less than 1 contract, the $/contract is POINTSIZE*POINTVALUE
ok, clear. Thanks Nicolas!