Expand README with examples, code, links
This commit is contained in:
31
README.md
31
README.md
@ -1,11 +1,24 @@
|
||||
# Free Forex Position Size Calculator
|
||||
|
||||
(Account x Risk%) / (Stop Loss x Pip Value) = Exact Lots
|
||||
|
||||
Visit: https://blog.quant-view.xyz/tools/position-size-calculator.html
|
||||
|
||||
## 22 Free Tools
|
||||
https://blog.quant-view.xyz/tools/
|
||||
|
||||
The correct position size formula with worked examples and code.
|
||||
## Formula
|
||||
Position Size = (Account Balance x Risk%) / (Stop Loss x Pip Value)
|
||||
## Worked Examples
|
||||
| Account | Risk | Stop | Pair | Pip Value | Position |
|
||||
| $1,000 | 1% | 20 pip | EURUSD | $10 | 0.05 lots |
|
||||
| $10,000 | 2% | 30 pip | XAUUSD | $1 | 0.67 lots |
|
||||
| $5,000 | 1.5% | 15 pip | GBPJPY | $9.3 | 0.54 lots |
|
||||
## Gold Warning
|
||||
XAUUSD pip value is $1.00 per 0.01 lot, NOT $10.00 like EURUSD. Most calculators get this wrong.
|
||||
## Python
|
||||
def position_size(balance, risk_pct, stop_pips, pip_value=10):
|
||||
return round(balance * risk_pct / 100 / (stop_pips * pip_value), 2)
|
||||
## JavaScript
|
||||
function positionSize(balance, risk, stop, pipVal=10) {
|
||||
return parseFloat((balance * risk / 100 / (stop * pipVal)).toFixed(2));
|
||||
}
|
||||
## Pip Values
|
||||
EURUSD $10 | XAUUSD $1 | XAGUSD $5 | BTCUSD $1 | US30 $1
|
||||
## Free Web Calculator
|
||||
https://blog.quant-view.xyz/tools/position-size-calculator.html
|
||||
## Community
|
||||
[Telegram](https://t.me/GFIL_Trading) | [Discord](https://discord.gg/GMmMCD4MCr) | [Terminal](https://gfil-intel.xyz)
|
||||
Telegram: https://t.me/GFIL_Trading | Discord: https://discord.gg/GMmMCD4MCr
|
||||
Reference in New Issue
Block a user