Tâche terminée
Spécifications
Some assumptions:
- I have USD 100k available margin.
- 2% or 2k of 100k is risk money for the transaction.
- I want to risk the full 2% on "n" lots (the challenge is to figure out how many lots I will break the $2k into!)
- calculate a per pip value in USD of the currency pair
- Averaage True Range or ATR calculates the average pips of range per candlestick over n candlesticks.
- ATR_Multiplier (as input parameter) is usually between 1.0 and 1.5
- multiply number of pips in ATR * ATR_Multiplier by pip value in USD, then divide total risk money by this value
This is relatively easy arithmetic with a EURUSD, USDJPY or GBPUSD transaction, however when trading the CADCHF or the EURGBP, we have to calculate the USD pip value backwards using either CHFUSD or GBPUSD to calculate the correct lot size for the USD value of ATR * ATRMultiplier of the non-USD currency pair.
This is the position size calculator that I will be comparing the EA results against for veracity:
http://www.babypips.com/tools/forex-calculators/positionsize.php
The reason this is important is because my SL number will be ATR * ATR_Multiplier and I want to spend all of my 2 % risk money on "n" lots.
CipherPipsHere is a link where you can download the two Excel files - one for standard size lots, the other for mini size lots.
http://www.forexfactory.com/showthread.php?t=61693
Both standard and mini lot sizes should work
Source code will be required after the final product is delivered.