Market Anylsis | fti.asia

Market Anylsis

				
					<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forex Position Size Calculator</title>

<style>

body{
    font-family:Arial,Helvetica,sans-serif;
    background:#f5f7fb;
}

.calculator{
    max-width:600px;
    margin:40px auto;
    background:#fff;
    padding:30px;
    border-radius:15px;
    box-shadow:0 10px 25px rgba(0,0,0,.1);
}

h2{
    text-align:center;
    margin-bottom:25px;
}

label{
    font-weight:bold;
    display:block;
    margin-top:15px;
}

input,select{
    width:100%;
    padding:12px;
    margin-top:6px;
    border:1px solid #ddd;
    border-radius:8px;
    font-size:16px;
}

button{
    width:100%;
    padding:15px;
    margin-top:25px;
    background:#0d6efd;
    color:white;
    border:none;
    border-radius:8px;
    font-size:18px;
    cursor:pointer;
}

button:hover{
    background:#084dc9;
}

.result{
    margin-top:25px;
    background:#eef6ff;
    padding:20px;
    border-radius:10px;
}

.result h3{
    margin-top:0;
}

.value{
    color:#0d6efd;
    font-weight:bold;
}

</style>

</head>

<body>

<div class="calculator">

<h2>Forex Position Size Calculator</h2>

<label>Instrument</label>

<select id="instrument">

<option value="10">EUR/USD</option>

<option value="10">GBP/USD</option>

<option value="10">AUD/USD</option>

<option value="10">USD/JPY</option>

<option value="1">XAU/USD (Gold)</option>

<option value="1">US100 (NAS100)</option>

<option value="1">US30</option>

</select>

<label>Account Balance ($)</label>

<input type="number" id="balance" value="1000">

<label>Risk (%)</label>

<input type="number" id="risk" value="2">

<label>Stop Loss (Pips / Points)</label>

<input type="number" id="sl" value="50">

<button onclick="calculate()">Calculate</button>

<div class="result">

<h3>Results</h3>

<p>Risk Amount:
<span class="value" id="riskamount">$0</span></p>

<p>Recommended Lot Size:
<span class="value" id="lotsize">0</span></p>

</div>

</div>

<script>

function calculate(){

let balance=parseFloat(document.getElementById('balance').value);

let risk=document.getElementById('risk').value;

let sl=document.getElementById('sl').value;

let pipValue=document.getElementById('instrument').value;

let riskAmount=balance*(risk/100);

let lot=(riskAmount/(sl*pipValue));

document.getElementById("riskamount").innerHTML="$"+riskAmount.toFixed(2);

document.getElementById("lotsize").innerHTML=lot.toFixed(2)+" Lots";

}

</script>

</body>
</html>
				
			
Scroll to Top

Request a Callback