Forex Position Size Calculator

Manage your risk with our forex position size calculator. Simply enter your account balance, select a currency pair, enter the percentage of your account that you are willing to risk (1-2% is suggested) and enter your stop loss. The tool will handle the rest. Position sizing is one of the most overlooked tools for traders. Use this calculator to automatically determine position sizes and control your maximum risk.

USD EUR GBP AUD JPY CHF CAD NZD
EURUSDUSDJPYGBPUSDUSDCADUSDCHFAUDUSDNZDUSDEURGBPEURCHFEURCADEURAUDEURNZDEURJPYGBPJPYCHFJPYCADJPYAUDJPYNZDJPYGBPCHFGBPAUDGBPCADGBPNZDAUDCADAUDCHFAUDNZDCADCHFAUDSGDCHFSGDEURNOKEURRUBEURSEKEURSGDEURTRYEURZARGBPHKDGBPNOKGBPSEKGBPSGDNOKJPYNZDCADNZDCHFSGDJPYUSDCNHUSDDKKUSDHKDUSDMXNUSDNOKUSDPLNUSDRUBUSDSEKUSDSGDUSDTRYUSDZARXAGEURXAGUSDXAUEURXAUUSDBTCUSDETHBTCETHUSDLTCBTCLTCUSDXRPUSDXRPBTCDSHUSDDSHBTCBCHUSDBCHBTCEURHKDEURCNHEURDKKEURMXNEURPLNEURXAGEURXAUEURBTCEURETHEURLTCEURXRPEURDSHEURBCHUSDEURUSDGBPUSDAUDUSDNZDUSDXAGUSDXAUUSDBTCUSDETHUSDLTCUSDXRPUSDDSHUSDBCHJPYEURJPYUSDJPYGBPJPYCADJPYCHFJPYAUDJPYNZDJPYSGDJPYNOKJPYRUBJPYSEKJPYTRYJPYZARJPYHKDJPYCNHJPYDKKJPYMXNJPYPLNJPYXAGJPYXAUJPYBTCJPYETHJPYLTCJPYXRPJPYDSHJPYBCHGBPEURGBPRUBGBPTRYGBPZARGBPCNHGBPDKKGBPMXNGBPPLNGBPXAGGBPXAUGBPBTCGBPETHGBPLTCGBPXRPGBPDSHGBPBCHCADEURCADUSDCADGBPCADAUDCADNZDCADSGDCADNOKCADRUBCADSEKCADTRYCADZARCADHKDCADCNHCADDKKCADMXNCADPLNCADXAGCADXAUCADBTCCADETHCADLTC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BCHHKDBCHCNHBCHDKKBCHMXNBCHPLNBCHXAGBCHXAUBCHETHBCHLTCBCHXRPBCHDSH
$
.00
%
Pips
$(document).ready(function($){ $('.modal-content').resizable({ //alsoResize: ".modal-dialog", minHeight: 300, minWidth: 300 }); $('.modal-dialog').draggable(); $('#instructionsModal').on('show.bs.modal', function () { $(this).find('.modal-body').css({ 'max-height':'100%' }); }); $('#instructionsModal').show(); $('#modal-button').on('click', function () { $('#instructionsModal').show(); }) $('#close-modal').on('click',function(){ $('#instructionsModal').hide(); }) $('#x-close').on('click',function(){ $('#instructionsModal').hide(); }) // $('#account-currency option:selected').text(); $('#account-currency').change(function(){ let selection = $('#account-currency option:selected').text() console.log('this is selection', selection); if (selection === 'GBP'){ $('#currency-span').html('£') } else if (selection === 'EUR'){ $('#currency-span').html('€') } else if (selection === 'AUD'){ $('#currency-span').html('A$') } else if (selection === 'CAD'){ $('#currency-span').html('C$') } else if (selection === 'CHF'){ $('#currency-span').html('₣') } else if (selection === 'JPY'){ $('#currency-span').html('¥') } else { $('#currency-span').html('$') } }); // url: `https://forex.1forge.com/1.0.3/symbols?api_key=eAS4pXDPhyPxX5UJ7XKmhDJYFNOStbBd`, // $.ajax({ // url: `https://api.1forge.com/symbols?api_key=UmkEKl20frnvQ2bO2nUOhanCXlWDJjne`, // method: 'GET', // dataType: "JSON" // }) // .then(function(data){ // $.each(data, function(d,i){ // // console.log(data); // return $('#traded-pair').append(`${i}`) // }) // }) ////////////callback function for our ajax call to fill the currency pairs dropdown//////////////////////// ////////////////////////////////end//////////////////////////////// //////////////////////Function To Change Currency Symbol when Account Currency is Selected////////////// // $('#account-currency').select(function(){ // alert('click'); // }); /////////////////////////////////////End//////////////////////////////// ////////////////////////////////////Calculate Click function///////////////////////////////////// $('#calculate').on('click', function(){ let tradingPrice = 0; let positionSize; let valuePerPip; let currencySplitVal; let accountCurrencyVal; let counterCurrencyPair; let currencySymbol; // let token = 'UmkEKl20frnvQ2bO2nUOhanCXlWDJjne'; let counterCurrencyPrice = 0; let tradedPair = $('#traded-pair').val(); // let currencyUrl = `https://api.1forge.com/quotes?pairs=${tradedPair}&api_key=${token}`; const token = 'TGG5I0PUSNDVNCEW'; let accountBalance = parseInt($('#account-balance').val()); let accountBalanceUnparsed = $('#account-balance').val(); let accountCurrency = $('#account-currency option:selected').text(); let riskPercentage = parseFloat($('#risk-percentage').val() / 100); console.log('this is riskpercentage var', riskPercentage); let stopLoss = parseInt($('#stop-loss').val()); let amountToRisk = (accountBalance * riskPercentage).toFixed(2) ; let currencySplit = tradedPair.slice(3); let currSplit = tradedPair.slice(0,3) let currencyUrl = `https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=${currSplit}&to_currency=${currencySplit}&apikey=` console.log('this is currsplit', currSplit); console.log('this is currencySplit', currencySplit); console.log('this is stop loss', stopLoss); console.log('this is unparsed balance',accountBalanceUnparsed) console.log('this is math . floor account balance', accountBalanceUnparsed - Math.floor(accountBalanceUnparsed)); if (isNaN(accountBalance)) { console.log('account balance NaN'); $('#account-balance-label').html('Account Balance * Please Enter A valid number').addClass('text-danger'); } else if (accountBalanceUnparsed - Math.floor(accountBalanceUnparsed) > 0) { console.log(' no decimals please'); $('#account-balance-label').html('Account Balance * Please enter a whole number with no decimals').addClass('text-danger'); } else if (accountBalance < 0) { console.log(' no negative numbers'); $('#account-balance-label').html('Account Balance * Please enter positive numbers only').addClass('text-danger'); } else { $('#account-balance-label').html('Account Balance').addClass('text-dark'); if (riskPercentage < 0) { console.log(' no negative numbers'); $('#risk-percentage-label').html('Risk Percentage * Please enter positive numbers only').addClass('text-danger'); } else if (riskPercentage == 0) { $('#risk-percentage-label').html('Risk Percentage * You have to risk something!').addClass('text-danger'); } else if (riskPercentage > 1) { $('#risk-percentage-label').html('Risk Percentage * You cannot risk more than 100%!').addClass('text-danger'); } else { $('#risk-percentage-label').html('Risk Percentage').addClass('text-dark'); if (stopLoss < 0) { $('#stop-loss-label').html('Stop Loss * Please enter positive numbers only').addClass('text-danger'); } else if (isNaN(stopLoss) || stopLoss == 0 ){ $('#stop-loss-label').html('Stop Loss * Please enter a number greater than zero ').addClass('text-danger'); } else { $('#stop-loss-label').html('Stop Loss').addClass('text-dark'); $('#resultsModal').show(); if (accountCurrency === 'EUR'){ accountCurrencyVal = 1; currencySymbol = '€' $('amount-to-risk').html('') } else if (accountCurrency === 'GBP') { accountCurrencyVal = 2; currencySymbol = '£' } else if (accountCurrency === 'AUD') { accountCurrencyVal = 3; currencySymbol = 'A$' } else if (accountCurrency === 'NZD') { accountCurrencyVal = 4; currencySymbol = '$' } else if (accountCurrency === 'USD') { accountCurrencyVal = 5; currencySymbol = '$' } else if (accountCurrency === 'CAD') { accountCurrencyVal = 6; currencySymbol = 'C$' } else if (accountCurrency === 'CHF') { accountCurrencyVal = 7; currencySymbol = '₣' } else if (accountCurrency === 'JPY') { accountCurrencyVal = 8; currencySymbol = '¥' } if (currencySplit === 'EUR'){ currencySplitVal = 1; } else if (currencySplit === 'GBP') { currencySplitVal = 2; } else if (currencySplit === 'AUD') { currencySplitVal = 3; } else if (currencySplit === 'NZD') { currencySplitVal = 4; } else if (currencySplit === 'USD') { currencySplitVal = 5; } else if (currencySplit === 'CAD') { currencySplitVal = 6; } else if (currencySplit === 'CHF') { currencySplitVal = 7; } else if (currencySplit === 'JPY') { currencySplitVal = 8; } else { currencySplitVal = 9; } ////////////// checks value of account currency and countercurrency to determine the order of the pairing or whether counter currency is needed if (accountCurrencyVal < currencySplitVal){ counterCurrencyPair = accountCurrency + currencySplit; } else if (accountCurrencyVal == currencySplitVal){ counterCurrencyPair = null; } else { counterCurrencyPair = currencySplit + accountCurrency; } console.log('this is counterCurrencyPair', counterCurrencyPair); // if (counterCurrencyPair == null){ // $('#counter-currency-div').hide(); // } else { // $('#counter-currency-div').show(); // } // let counterCurrencyUrl = `https://api.1forge.com/quotes?pairs=${counterCurrencyPair}&api_key=${token}`; let counterCurrencyUrl = `https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=${currencySplit}&to_currency=${accountCurrency}&apikey=`; //`https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&datatype=json&from_symbol=${accountCurrency}&to_symbol=${currencySplit}&interval=15min&apikey=` let convertOne; // let EUR = 1; // let GBP = 2; // let AUD = 3; // let NZD = 4; // let USD = 5; // let CAD = 6; // let CHF = 7; // let JPY = 8; //////////////////////////////////////////// Assigning values to Currency symbols to figure our the order that the pairing needs to be in./////////////////// console.log('this is split currency', currencySplit); console.log('this is amount at risk', amountToRisk); console.log('this is account currency', accountCurrency); console.log('this is account balance',accountBalance); console.log('this is risk percentage',riskPercentage); console.log('this is counter currency pair url',counterCurrencyUrl); /////////////////////check if countercurrency is needed //////////////////// if (String(currencySplit) !== String(accountCurrency)){ $('#counter-currency').html(currencySplit); } else { $('#counter-currency').html('No Counter Currency'); counterCurrencyUrl = ''; $('#counter-currency-price').html('Price: N/A') } //////////////////////////??END//////////////////////////////////////// ///////function for the ajax call that is about to get the price for the selected currency pair////// $('#amount-to-risk').html(currencySymbol + amountToRisk); console.log('trying to get traded pair', tradedPair); $('#current-pair-price').html(`Current ${tradedPair} price`); function ajaxCallTwo(){ $.ajax({ url: currencyUrl + token, method: 'GET', dataType: "JSON" }) .then(function(data){ console.log('data', data); tradingPrice = data['Realtime Currency Exchange Rate']['5. Exchange Rate']; // tradingPrice = data[0].price; localStorage.setItem('trading price', tradingPrice); console.log('current price of traded currency',tradingPrice); $('#current-price').html(parseFloat(tradingPrice)); }) } ajaxCallTwo(); if (counterCurrencyPair != null){ function ajaxCallThree(){ $.ajax({ url: counterCurrencyUrl + token, method: 'GET', dataType: 'JSON' }) .then(function(data){ counterCurrencyPrice = data['Realtime Currency Exchange Rate']['5. Exchange Rate']; // console.log('this is counter data', data); // console.log('this is positionSiez', positionSize); // console.log('this is countercurrency price', counterCurrencyPrice); if(accountCurrencyVal != currencySplitVal) { convertNewCurrency = 1/counterCurrencyPrice; console.log('converted currency', convertNewCurrency); newAmountToRisk = convertNewCurrency * amountToRisk; console.log('this is new amount to risk', newAmountToRisk); valuePerPip = newAmountToRisk / stopLoss; console.log('this is value per pip', valuePerPip); } else { convertNewCurrency = amountToRisk * counterCurrencyPrice; console.log('convertNewCurrency', convertNewCurrency, 'amountToRisk', amountToRisk, 'counterCurrencyPrice', counterCurrencyPrice); valuePerPip = convertNewCurrency / stopLoss; console.log('currency not converted', convertNewCurrency, 'valuePerPip', valuePerPip, 'stopLoss', stopLoss); } // priceToPips = if(tradedPair.search("JPY") != -1 || counterCurrencyPair.search("JPY") != -1 ){ positionSize = (valuePerPip * 100).toFixed(2); } else { positionSize = (valuePerPip * 10000).toFixed(2); } standardLots = (positionSize * .00001).toFixed(2); console.log('this is standard lots'); // miniLots =; // microLots = ; $('#position-size').html(positionSize); $('#standard-lots').html((positionSize * .00001).toFixed(2)); $('#mini-lots').html((positionSize * .0001).toFixed(2)); $('#micro-lots').html((positionSize * .001).toFixed(2)); // console.log('current price of counter currency', data[0].price); $('#counter-currency-price').html(counterCurrencyPrice); $('#amount-to-risk').html(currencySymbol + amountToRisk); }) } ajaxCallThree(); } else { console.log('no counter currency pair'); console.log('local storage', localStorage.getItem('trading price')); localPrice = localStorage.getItem('trading price'); riskToPrice = amountToRisk * localPrice; valuePerPip = amountToRisk / stopLoss; priceToPips = riskToPrice / stopLoss; positionSize = (valuePerPip * 10000).toFixed(2); console.log('this is position size',positionSize); console.log('price to pips', priceToPips); console.log('value per pip', valuePerPip); if(tradedPair.search("JPY") != -1 || counterCurrencyPair === null ){ positionSize = (valuePerPip * 100).toFixed(2); } else { positionSize = (valuePerPip * 10000).toFixed(2); } $('#position-size').html(positionSize); $('#standard-lots').html((positionSize * .00001).toFixed(2)); $('#mini-lots').html((positionSize * .0001).toFixed(2)); $('#micro-lots').html((positionSize * .001).toFixed(2)); } if(counterCurrencyPair == null) { $('#counter-currency-div').hide(); } else { $('#counter-currency-div').show(); } //$('#calculate').attr('data-target', '#resultsModal'); // console.log('the counter currency price is', counterCurrencyPrice); } } } // console.log('the trading pair price is ', tradingPrice); }); $('.close-results-modal').on('click', function(){ console.log('clicked') $('#resultsModal').hide(); }) });
>