Hi people,
Hopefully someone can help me, I am coding an EA and I have some problems finding the correct algorithm to adjust the lot size of a new trade to a predefined risk.
What it is known:
- Account balance
- Risk percent
- Distance to stop loss in pips
What I need:
- Resulting position size
I'd also like to mention that ea will also trade pairs that don't contain the account currency e.g. if my account is funded in Euros and a trade is opened on USDJPY.
Thanks in advance!
-soso
Hopefully someone can help me, I am coding an EA and I have some problems finding the correct algorithm to adjust the lot size of a new trade to a predefined risk.
What it is known:
- Account balance
- Risk percent
- Distance to stop loss in pips
What I need:
- Resulting position size
I'd also like to mention that ea will also trade pairs that don't contain the account currency e.g. if my account is funded in Euros and a trade is opened on USDJPY.
Thanks in advance!
-soso
Trading = a mirror to your human flaws. Fix them or be fixed.