<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CRYPTO | dobachkhoa.com</title>
	<atom:link href="https://dobachkhoa.com/danh-muc/crypto/feed/" rel="self" type="application/rss+xml" />
	<link>https://dobachkhoa.com/danh-muc/crypto/</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jun 2025 12:42:19 +0000</lastBuildDate>
	<language>vi</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://dobachkhoa.com/wp-content/uploads/2025/06/dobachkhoa-logo-1-280x280.png</url>
	<title>CRYPTO | dobachkhoa.com</title>
	<link>https://dobachkhoa.com/danh-muc/crypto/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cách tính lời lỗ future</title>
		<link>https://dobachkhoa.com/cach-tinh-loi-lo-future/</link>
		
		<dc:creator><![CDATA[Do Bach Khoa]]></dc:creator>
		<pubDate>Sat, 14 Jun 2025 13:17:39 +0000</pubDate>
				<category><![CDATA[CRYPTO]]></category>
		<guid isPermaLink="false">https://dobachkhoa.com/?p=363</guid>

					<description><![CDATA[<p>Máy Tính Lời/Lỗ Giao Dịch Future Loại lệnh: Long (Mua lên)Short (Bán xuống) Giá vào lệnh ($): Giá thoát lệnh kỳ vọng ($): Vốn đầu tư ban đầu ($): Đòn bẩy (x): Phí sàn mỗi chiều (%): Tính toán</p>
<p>The post <a href="https://dobachkhoa.com/cach-tinh-loi-lo-future/">Cách tính lời lỗ future</a> appeared first on <a href="https://dobachkhoa.com">dobachkhoa.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2> Máy Tính Lời/Lỗ Giao Dịch Future</h2>
<form id="futureCalc">
  <label>Loại lệnh:</label><br>
  <select id="position">
    <option value="long">Long (Mua lên)</option>
    <option value="short">Short (Bán xuống)</option>
  </select><br><br>

  <label>Giá vào lệnh ($):</label><br>
  <input type="number" id="entryPrice" step="0.01"><br><br>

  <label>Giá thoát lệnh kỳ vọng ($):</label><br>
  <input type="number" id="exitPrice" step="0.01"><br><br>

  <label>Vốn đầu tư ban đầu ($):</label><br>
  <input type="number" id="capital" step="0.01"><br><br>

  <label>Đòn bẩy (x):</label><br>
  <input type="number" id="leverage" step="1"><br><br>

  <label>Phí sàn mỗi chiều (%):</label><br>
  <input type="number" id="fee" step="0.01" value="0.04"><br><br>

  <button type="button" onclick="calculateFuture()">Tính toán</button>
</form>

<div id="result" style="margin-top:20px; font-size: 1.1em;"></div>

<style>
  #futureCalc {
    max-width: 500px;
    padding: 20px;
    background-color: #f4f8fb;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    font-family: Arial, sans-serif;
  }

  #futureCalc label {
    font-weight: bold;
  }

  #futureCalc input, #futureCalc select {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
  }

  #futureCalc button {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    background-color: #0ae0ae;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
  }

  #futureCalc button:hover {
    background-color: #07c4ba;
  }

  #result {
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
  }
</style>

<script>
  function calculateFuture() {
    const entry = parseFloat(document.getElementById('entryPrice').value);
    const exit = parseFloat(document.getElementById('exitPrice').value);
    const pos = document.getElementById('position').value;
    const leverage = parseFloat(document.getElementById('leverage').value);
    const capital = parseFloat(document.getElementById('capital').value);
    const feePercent = parseFloat(document.getElementById('fee').value);

    const resultDiv = document.getElementById('result');

    if (!entry || !exit || !leverage || !capital) {
      resultDiv.innerHTML = "❌ Vui lòng nhập đầy đủ thông tin.";
      return;
    }

    // Tính lợi nhuận trước phí
    let pnlPercent;
    if (pos === 'long') {
      pnlPercent = ((exit - entry) / entry) * leverage * 100;
    } else {
      pnlPercent = ((entry - exit) / entry) * leverage * 100;
    }

    // Phí 2 chiều
    const totalFee = (feePercent * 2) / 100 * capital;

    // Tính lãi/lỗ USD
    const pnlUSD = (pnlPercent / 100) * capital;

    // Trừ phí
    const netProfit = pnlUSD - totalFee;

    // Kết quả
    const emoji = netProfit >= 0 ? "✅📈" : "⚠️📉";
    const color = netProfit >= 0 ? "green" : "red";
    const suggest = netProfit >= 0 ? "Bạn có thể chốt lời." : "Cẩn thận – nên cân nhắc cắt lỗ.";

    resultDiv.innerHTML = `
      ${emoji} <b style="color:${color};">Kết quả sau phí: ${netProfit.toFixed(2)} USD</b><br>
      📊 Tỷ lệ lời/lỗ: <b>${pnlPercent.toFixed(2)}%</b><br>
      💸 Phí tổng: <b>${totalFee.toFixed(2)} USD</b><br>
      💡 Gợi ý: ${suggest}
    `;
  }
</script>
<p>The post <a href="https://dobachkhoa.com/cach-tinh-loi-lo-future/">Cách tính lời lỗ future</a> appeared first on <a href="https://dobachkhoa.com">dobachkhoa.com</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
