{"id":110,"date":"2025-12-06T09:57:35","date_gmt":"2025-12-06T09:57:35","guid":{"rendered":"https:\/\/alhasubat.com\/en\/?page_id=110"},"modified":"2025-12-06T10:04:00","modified_gmt":"2025-12-06T10:04:00","slug":"contracts-and-deals-calculator","status":"publish","type":"page","link":"https:\/\/alhasubat.com\/en\/contracts-and-deals-calculator\/","title":{"rendered":"Contracts and deals calculator"},"content":{"rendered":"    <div id=\"alh-contract-calc\" class=\"acc-wrap\">\n      <div class=\"acc-card\">\n        <div class=\"acc-header\">\n          <div class=\"acc-title-group\">\n            <h2 class=\"acc-title\">Contracts & Trades Calculator<\/h2>\n            <p class=\"acc-subtitle\">Calculate position size, target and stop based on account balance and risk.<\/p>\n          <\/div>\n\n          <div class=\"acc-header-actions\">\n            <div class=\"acc-control\">\n              <label for=\"acc_currency\">Currency<\/label>\n              <select id=\"acc_currency\" class=\"acc-select\"><\/select>\n            <\/div>\n\n            <button type=\"button\" id=\"acc-btn-settings\" class=\"acc-btn ghost\">\n              Settings\n            <\/button>\n\n            <button type=\"button\" id=\"acc-btn-clear\" class=\"acc-btn gray\">\n              Clear fields\n            <\/button>\n\n            <button type=\"button\" id=\"acc-btn-save\" class=\"acc-btn primary\">\n              Save data\n            <\/button>\n\n            <span id=\"acc-save-status\" class=\"acc-save-status\"><\/span>\n          <\/div>\n        <\/div>\n\n        <!-- ===== General Inputs ===== -->\n        <div class=\"acc-section\">\n          <h3 class=\"acc-section-title\">General Inputs<\/h3>\n\n          <div class=\"acc-grid acc-grid-3\">\n            <div class=\"acc-field\">\n              <label for=\"acc_capital\">Account balance<\/label>\n              <input id=\"acc_capital\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_risk_percent\">Risk (%) of balance<\/label>\n              <input id=\"acc_risk_percent\" type=\"text\" class=\"acc-input\" placeholder=\"Example: 2\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_risk_amount\">Risk (amount) <span class=\"acc-cur\"><\/span><\/label>\n              <input id=\"acc_risk_amount\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <!-- ===== Position Size ===== -->\n        <div class=\"acc-section\">\n          <h3 class=\"acc-section-title\">Position Size<\/h3>\n\n          <div class=\"acc-grid acc-grid-4\">\n            <div class=\"acc-field\">\n              <label for=\"acc_buy_percent\">Buy (%) of balance<\/label>\n              <input id=\"acc_buy_percent\" type=\"text\" class=\"acc-input\" placeholder=\"Example: 50\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_buy_amount\">Buy (amount) <span class=\"acc-cur\"><\/span><\/label>\n              <input id=\"acc_buy_amount\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_entry\">Entry price<\/label>\n              <input id=\"acc_entry\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_qty\">Quantity<\/label>\n              <input id=\"acc_qty\" type=\"text\" class=\"acc-input\" placeholder=\"0.0000\">\n            <\/div>\n          <\/div>\n\n          <div class=\"acc-grid acc-grid-4 acc-grid-bottom\">\n            <div class=\"acc-field\">\n              <label for=\"acc_fee\">Trade fee (total) <span class=\"acc-cur\"><\/span><\/label>\n              <input id=\"acc_fee\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field acc-field-note\" style=\"grid-column: span 3;\">\n              <p class=\"acc-note\">\n                Quantity is calculated automatically from (buy value \u00f7 entry price) and you can adjust it manually if you wish.\n              <\/p>\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <!-- ===== Take Profit ===== -->\n        <div class=\"acc-section\">\n          <h3 class=\"acc-section-title\">Target (Take Profit)<\/h3>\n\n          <div class=\"acc-grid acc-grid-4\">\n            <div class=\"acc-field\">\n              <label for=\"acc_tp_percent\">Target (%) from entry<\/label>\n              <input id=\"acc_tp_percent\" type=\"text\" class=\"acc-input\" placeholder=\"Example: 5\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_tp_price\">Target price (optional)<\/label>\n              <input id=\"acc_tp_price\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_tp_amount\">Profit (amount) <span class=\"acc-cur\"><\/span> (optional)<\/label>\n              <input id=\"acc_tp_amount\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field acc-field-note\">\n              <p class=\"acc-note\">\n                Choose one of the three fields (percentage \/ target price \/ profit amount) and the rest will be calculated automatically.\n              <\/p>\n            <\/div>\n          <\/div>\n\n          <div class=\"acc-grid acc-grid-4 acc-results-row\">\n            <div class=\"acc-field\">\n              <label>Calculated target price<\/label>\n              <div id=\"acc_tp_price_out\" class=\"acc-result acc-good\">0.00<\/div>\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label>Total profit <span class=\"acc-cur\"><\/span><\/label>\n              <div id=\"acc_tp_total_profit\" class=\"acc-result acc-good\">0.00<\/div>\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label>Profit (%) of balance<\/label>\n              <div id=\"acc_tp_profit_percent\" class=\"acc-result acc-good\">0.00%<\/div>\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label>Difference from entry to target (points\/price)<\/label>\n              <div id=\"acc_tp_diff\" class=\"acc-result acc-good\">0.00<\/div>\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <!-- ===== Stop Loss ===== -->\n        <div class=\"acc-section\">\n          <h3 class=\"acc-section-title\">Stop (SL)<\/h3>\n\n          <div class=\"acc-grid acc-grid-4\">\n            <div class=\"acc-field\">\n              <label for=\"acc_sl_percent\">Stop (%) from entry<\/label>\n              <input id=\"acc_sl_percent\" type=\"text\" class=\"acc-input\" placeholder=\"Example: 2\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_sl_price\">Stop price (optional)<\/label>\n              <input id=\"acc_sl_price\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label for=\"acc_sl_amount\">Loss (amount) <span class=\"acc-cur\"><\/span> (optional)<\/label>\n              <input id=\"acc_sl_amount\" type=\"text\" class=\"acc-input\" placeholder=\"0.00\">\n            <\/div>\n\n            <div class=\"acc-field acc-field-note\">\n              <p class=\"acc-note\">\n                Choose one of the three fields (percentage \/ stop price \/ loss amount) and the rest will be calculated automatically.\n              <\/p>\n            <\/div>\n          <\/div>\n\n          <div class=\"acc-grid acc-grid-4 acc-results-row\">\n            <div class=\"acc-field\">\n              <label>Calculated stop price<\/label>\n              <div id=\"acc_sl_price_out\" class=\"acc-result acc-bad\">0.00<\/div>\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label>Total loss <span class=\"acc-cur\"><\/span><\/label>\n              <div id=\"acc_sl_total_loss\" class=\"acc-result acc-bad\">0.00<\/div>\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label>Loss (%) of balance<\/label>\n              <div id=\"acc_sl_loss_percent\" class=\"acc-result acc-bad\">0.00%<\/div>\n            <\/div>\n\n            <div class=\"acc-field\">\n              <label>Difference from entry to stop (points\/price)<\/label>\n              <div id=\"acc_sl_diff\" class=\"acc-result acc-bad\">0.00<\/div>\n            <\/div>\n          <\/div>\n        <\/div>\n      <\/div>\n\n      <!-- ===== Settings modal ===== -->\n      <div id=\"acc-settings-modal\" class=\"acc-modal-backdrop\">\n        <div class=\"acc-modal\">\n          <div class=\"acc-modal-header\">\n            <h3>Calculator settings<\/h3>\n            <button type=\"button\" id=\"acc-settings-close\" class=\"acc-modal-close\">&times;<\/button>\n          <\/div>\n\n          <div class=\"acc-modal-body\">\n            <h4>Currencies list<\/h4>\n            <p class=\"acc-note\">\n              Add or edit the currencies available in the calculator. They are saved in the browser (per device\/browser).\n            <\/p>\n\n            <div class=\"acc-currency-table\">\n              <div class=\"acc-currency-header\">\n                <span>Code<\/span>\n                <span>Name<\/span>\n                <span>Symbol (optional)<\/span>\n                <span>Delete<\/span>\n              <\/div>\n              <div id=\"acc-currencies-rows\"><\/div>\n            <\/div>\n\n            <button type=\"button\" id=\"acc-add-currency-row\" class=\"acc-btn ghost full\">\n              + Add currency\n            <\/button>\n          <\/div>\n\n          <div class=\"acc-modal-footer\">\n            <button type=\"button\" id=\"acc-settings-save\" class=\"acc-btn primary full\">\n              Save settings\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-110","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/pages\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":0,"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/pages\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/alhasubat.com\/en\/wp-json\/wp\/v2\/media?parent=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}