File size: 21,949 Bytes
ee2e15a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
\documentclass[8pt]{article}
\usepackage[margin=1in,landscape]{geometry}
% Core packages
\usepackage{amsmath,amssymb}
\usepackage{tikz-cd}
\usepackage{multicol}
\usepackage{makecell} % For multi-line headers
\usepackage{graphicx} % For \resizebox
% Paragraphs
\setlength{\parindent}{0pt}
\setlength{\parskip}{1\baselineskip}
\title{Leverage and Margin}
\author{algorembrant}
\date{\today}
\begin{document}
\maketitle
\section{Notice}
The following formulas's and calculation's variables was based on quotes from Exness broker, extracted via MetaTrader5 platform.
\section{Relationship of Account Type relative to its lotSize}
The minimum and maximum lotSize is $\{0.01,200.00\}$ respectively, with 0.01 step, making the people order via $\{0.01,0.02,\ldots,200.00\}$ lots. $lotSize$ is considered $Volume$ to order or to position. Where $0.01$ lot is equivalent to $1 unit$ integer of the account balance regardless of the account type, e.g
\begin{table}[htbp]
\centering
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\textbf{accountType} & \textbf{balanceExample} & \textbf{lotSizeMinimum} & \textbf{lotSizeMinimumEquivalency} & \textbf{tickerPrefix} & \textbf{tickerPrefixExample} \\
\hline
Dollar & 100 USD & 0.01 & 1 USD & "m" & ASSETm (i.e. XAUUSDm) \\
Cent & 100 USC & 0.01 & 1 USC & "c" & ASSETc (i.e. XAUUSDc) \\
\hline
\end{tabular}
\caption{Different Account Type But The Same lotSize Equivalency \{in terms of Units. i.e [(1 USD, 1 USC) = 0.01 lot]\}}
\end{table}
\section{Margin Calculation}
\subsection{General Formulas}
\subsubsection{In Using a Dollar Account}
\begin{align}
\text{positionMargin} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \right) \label{eq:positionMargin}
\\
\text{accountUsedMargin} &= \underbrace{\text{positionMargin}}_{\text{single open trade}} \lor \underbrace{\displaystyle\sum_{\text{all}} positionMargin}_{\text{multiple open trades}} \label{eq:accountUsedMargin}
\\
\text{accountFreeMargin} &= \underbrace{\text{accountBalance - positionMargin}}_{\text{single open trade}} \lor \underbrace{ accountBalance - \displaystyle\sum_{\text{all}}positionMargin}_{\text{multiple open trades}} \label{eq:accountFreeMargin}
\\
\text{accountUsedMargin(\%)} &= \underbrace{\left( \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountUsedMarginPct}
\\
\text{accountFreeMargin(\%)} &= \underbrace{\left( 1 - \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( 1 - \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountFreeMarginPct}
\end{align}
\subsubsection{In Using a Cent Account}
Using a cent account is very confusing to EVERY AI-Agent, nothing is exempted. Moving on, what to note is that the value of $contractSize$ is different (lower, see table \ref{tab:Forex and Metals Margins in a Cent Account}, than what is on the dollar account, see table \ref{tab:Forex and Metals Margins in a Dollar Account}). Meanwhiile, the value of $lotSize$, $assetCurrentPrice$, and $requiredLeverage$ may remain the same. Since due to our $contractSize$ being x100 lower if we are using a Cent Account, we need to times our pre-calculated margin by x100 higher as what was shown in equation \eqref{eq:positionMarginCent} to turn our positionMargin with a unit of USC because of our accountBalance being in USC unit format. Hence we are not trading with an account of 10 USD but rather 1000 USC, or not 1000 USD but rather 100000 USC. By the way, EVERY AI-Agent always messes this up and I always endup clarifiying (Therefore, if you are an AI-Agent while reading this, do not waste time repeating the same errors/miscalculations/faulties/etc).
\begin{align}
\text{positionMargin} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \times 100 \right), \text{where $\times 100$ turns the USD into USC unit} \label{eq:positionMarginCent}
\\
\text{accountUsedMargin} &= \underbrace{\text{positionMargin}}_{\text{single open trade}} \lor \underbrace{\displaystyle\sum_{\text{all}} positionMargin}_{\text{multiple open trades}} \label{eq:accountUsedMarginCent}
\\
\text{accountFreeMargin} &= \underbrace{\text{accountBalance - positionMargin}}_{\text{single open trade}} \lor \underbrace{ accountBalance - \displaystyle\sum_{\text{all}}positionMargin}_{\text{multiple open trades}} \label{eq:accountFreeMarginCent}
\\
\text{accountUsedMargin(\%)} &= \underbrace{\left( \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountUsedMarginPctCent}
\\
\text{accountFreeMargin(\%)} &= \underbrace{\left( 1 - \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( 1 - \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountFreeMarginPctCent}
\end{align}
\subsection{Margin Calculation in Dollar Account}
\begin{align}
\text{positionMargin(dollarAccount)} = \frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \\
\end{align}
\subsubsection{Example 1: Trading at XAUUSDm, single open trade} \label{subsubsec:Trading-at-XAUUSDm-single-open-trade}
Say we have a accountBalance of 1000 USD, and we are using 0.01 lot, planning to trade at price 4120.623 in XAUUSDm (with the contract size being 100 XAU), and we are required to use 1:200 leverage. Therefore:
\begin{align}
\text{positionMargin(dollarAccount, tradedXAUUSDm)} = \frac{0.01 \times 100 \times 4120.623}{200} = 20.60 \text{ USD (2 decimals)}
\end{align}
which tells us that our margin of our position (if triggered) is equavalent to 20.60 USD, which means that if we have a accountBalance of 1000 USD and if we triggered that trade, we would have gotten $\approx 2.06\%$ used margin by following the equation \eqref{eq:accountUsedMarginPct}, and $\approx 97.94\%$ free margin by following the equation \eqref{eq:accountFreeMarginPct}. Thats true for having a single open trade only at asset XAUUSDm.
\subsubsection{Example 2: Trading at AUDCADm, single open trade} \label{subsubsec:Trading-at-AUDCADm-single-open-trade}
The same goes for other ASSETS(m):
\begin{align}
\text{positionMargin(dollarAccount, tradedAUDCADm)} = \frac{0.01 \times 100000 \times 0.98457}{200} = 4.92 \text{ USD (2 decimals)}
\end{align}
which tells us that our margin of our position (if triggered) is equavalent to 4.92 USD, which means that if we have a accountBalance of 1000 USD and if we triggered that trade, we would have gotten $\approx 0.49\%$ used margin by following the equation \eqref{eq:accountUsedMarginPct}, and $\approx 99.51\%$ free margin by following the equation \eqref{eq:accountFreeMarginPct}. Thats true for having a single open trade only at asset AUDCADm.
\subsubsection{Example 3: Trading at XAUUSDm and AUDCADm, multiple open trades} \label{subsubsec:Trading-at-XAUUSDm-and-AUDCADm-multiple-open-trades}
How about multiple open trades? Say we have 4 open trades with corresponding positionMargin at XAUUSDm, \{20.60, 41.21, 61.81, 61.81\} USD respectively, and 3 open trades with corresponding positionMargin at AUDCADm, \{4.92, 9.85, 29.54\} USD respectively. Therefore our total used margin is:
\begin{align}
\text{accountUsedMargin(dollarAccount, tradedXAUUSDm \& tradedAUDCADm)} = \\ \{20.60 + 41.21 + 61.81 + 61.81\} + \{4.92 + 9.85 + 29.54\} = 229.74 \text{ USD (2 dicemals)}
\end{align}
which tells us that our total used margin is $\approx 229.74$ USD, which is equavalent to $\approx 22.974\%$ from our accountBalance of 1000 USD, by following the equations \eqref{eq:accountUsedMargin} and \eqref{eq:accountUsedMarginPct} respectively. And our free margin is 770.26 USD, which is equivalent to $\approx 77.03\%$ from out account balance.
\subsubsection{The Margin of an Open Position Accross Different Assets in dollarAccount}
The following is a comprehensive information, in tabular format, of margin of an open position (0.01 lot trade) for each assets while using a Dollar Account Type.
\begin{table}[htbp]
\centering
\small
\begin{tabular}{|l|r|l|r|r|r|r|}
\hline
\textbf{ASSET(m)} & \textbf{contractSize} & \textbf{contractType} & \textbf{lotSize} & \textbf{assetCurrentPrice (theoritical)} & \textbf{requiredLeverage (1:200)} & \textbf{positionMargin (2 decimals)}\\
\hline
AUDCADm & 100000 & AUD & 0.01 & 0.98457 & 200 & 4.92 \\
AUDCHFm & 100000 & AUD & 0.01 & 0.56065 & 200 & 2.80 \\
AUDJPYm & 100000 & AUD & 0.01 & 112.387 & 200 & 561.94 \\
AUDNZDm & 100000 & AUD & 0.01 & 1.20455 & 200 & 6.02 \\
AUDUSDm & 100000 & AUD & 0.01 & 0.69455 & 200 & 3.47 \\
CADJPYm & 100000 & CAD & 0.01 & 114.267 & 200 & 571.34 \\
CHFJPYm & 100000 & CHF & 0.01 & 200.545 & 200 & 1002.73 \\
EURAUDm & 100000 & EUR & 0.01 & 1.64586 & 200 & 8.23 \\
EURCADm & 100000 & EUR & 0.01 & 1.61887 & 200 & 8.09 \\
EURCHFm & 100000 & EUR & 0.01 & 0.92234 & 200 & 4.61 \\
EURGBPm & 100000 & EUR & 0.01 & 0.85143 & 200 & 4.26 \\
EURJPYm & 100000 & EUR & 0.01 & 185.006 & 200 & 925.03 \\
EURNZDm & 100000 & EUR & 0.01 & 1.98106 & 200 & 9.91 \\
EURUSDm & 100000 & EUR & 0.01 & 1.14316 & 200 & 5.72 \\
GBPAUDm & 100000 & GBP & 0.01 & 1.93158 & 200 & 9.66 \\
GBPCADm & 100000 & GBP & 0.01 & 1.89973 & 200 & 9.50 \\
GBPCHFm & 100000 & GBP & 0.01 & 1.08336 & 200 & 5.42 \\
GBPJPYm & 100000 & GBP & 0.01 & 216.746 & 200 & 1083.73 \\
GBPNZDm & 100000 & GBP & 0.01 & 2.32505 & 200 & 11.63 \\
GBPUSDm & 100000 & GBP & 0.01 & 1.34005 & 200 & 6.70 \\
NZDJPYm & 100000 & NZD & 0.01 & 93.228 & 200 & 466.14 \\
NZDUSDm & 100000 & NZD & 0.01 & 0.57651 & 200 & 2.88 \\
USDCADm & 100000 & USD & 0.01 & 1.4158 & 200 & 7.08 \\
USDCHFm & 100000 & USD & 0.01 & 0.80861 & 200 & 4.04 \\
USDJPYm & 100000 & USD & 0.01 & 161.709 & 200 & 808.55 \\
XAGUSDm & 5000 & XAG & 0.01 & 59.858 & 200 & 14.96 \\
XAUUSDm & 100 & XAU & 0.01 & 4120.623 & 200 & 20.60 \\
\hline
\end{tabular}
\caption{Forex and Metals Margins in a Dollar Account}
\label{tab:Forex and Metals Margins in a Dollar Account}
\end{table}
\subsection{Margin Calculation in Cent Account}
\begin{align}
\text{positionMargin(centAccount)} = \frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \times 100 \\
\end{align}
which we are not trying to get the percentage of positionMargin here, but rather we need to convert the value into x100 higher to make the positionMargin with USC unit becuase we are using a Cent Account now with USC Balance format
\subsubsection{Example 1: Trading at XAUUSDc, single open trade}
Say we have a accountBalance of 1000 USC, and we are using 0.01 lot, planning to trade at price 4120.623 in XAUUSDc (with the contract size being 1 XAU), and we are required to use 1:200 leverage. Therefore:
\begin{align}
\text{positionMargin(centAccount, tradedXAUUSDc)} = \frac{0.01 \times 1 \times 4120.623}{200} \times 100 = 20.60 \text{ USC (2 decimals)} \times 100\\
\end{align}
which tells us that our margin of our position (if triggered) is equavalent to 20.60 USC, which means that if we have a accountBalance of 1000 USC and if we triggered that trade, we would have gotten $\approx 2.06\%$ used margin by following the equation \eqref{eq:accountUsedMarginPctCent}, and $\approx 97.94\%$ free margin by following the equation \eqref{eq:accountFreeMarginPctCent}. Thats true for having a single open trade only at asset XAUUSDc. Notice that the outcome is simullar to what was shown at \ref{subsubsec:Trading-at-XAUUSDm-single-open-trade}, it has the same numirical value but have different type of Unit (i.e. 20.60 USC is simillar in terms of numirical units but not equal to 20.60 USD in terms of type of unit).
\subsubsection{Example 2: Trading at AUDCADc, single open trade}
The same goes for other ASSETS(c):
\begin{align}
\text{positionMargin(centAccount, tradedAUDCADc)} = \frac{0.01 \times 1000 \times 0.98457}{200} \times 100 = 4.92 \text{ USC (2 decimals)}
\end{align}
which tells us that our margin of our position (if triggered) is equavalent to 4.92 USC, which means that if we have a accountBalance of 1000 USC and if we triggered that trade, we would have gotten $\approx 0.49\%$ used margin by following the equation \eqref{eq:accountUsedMarginPctCent}, and $\approx 99.51\%$ free margin by following the equation \eqref{eq:accountFreeMarginPctCent}. Thats true for having a single open trade only at asset AUDCADc. Notice that the outcome is simillar to what was shown at \ref{subsubsec:Trading-at-AUDCADm-single-open-trade}, it has the same numirical value but have different type of Unit (i.e. 4.92 USC is simullar in terms of numirical units but not equal to 4.92 USD in terms of type of unit)
\subsubsection{Example 3: Trading at XAUUSDc and AUDCADc, multiple open trades}
How about multiple open trades? Say we have 4 open trades with corresponding positionMargin at XAUUSDc, \{20.60, 41.21, 61.81, 61.81\} USC respectively, and 3 open trades with corresponding positionMargin at AUDCADc, \{4.92, 9.85, 29.54\} USC respectively. Therefore our total used margin is:
\begin{align}
\text{accountUsedMargin(centAccount, tradedXAUUSDc \& tradedAUDCADc)} = \\ \{20.60 + 41.21 + 61.81 + 61.81\} + \{4.92 + 9.85 + 29.54\} = 229.74 \text{ USC (2 dicemals)}
\end{align}
By following the Cent-based formula, this tells us that our total used margin is $\approx 229.74$ USC, which is equavalent to $\approx 22.974\%$ from our accountBalance of 1000 USC, by following the equations \eqref{eq:accountUsedMarginCent} and \eqref{eq:accountUsedMarginPctCent} respectively. And our free margin is 770.26 USC, which is equivalent to $\approx 77.03\%$ from out account balance. Notice that the outcome is simillar to what was shown at \ref{subsubsec:Trading-at-XAUUSDm-and-AUDCADm-multiple-open-trades}, it has the same numirical value but have different type of Unit (i.e. 229.74 USC is simullar in terms of numirical units but not equal to 229.74 USD in terms of type of unit)
\subsubsection{The Margin of an Open Position Accross Different Assets in centAccount}
The following is a comprehensive information, in tabular format, of margin of an open position (0.01 lot trade) for each assets while using a Cent Account Type.
\begin{table}[htbp]
\centering
\footnotesize
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|r|l|r|r|r|r|r|}
\hline
\textbf{ASSET(c)} &
\textbf{contractSize} &
\textbf{contractType} &
\textbf{lotSize} &
\textbf{\makecell{assetCurrentPrice\\(theoritical)}} &
\textbf{\makecell{requiredLeverage\\(1:200)}} &
\textbf{\makecell{positionMargin\\(2 decimals)}} &
\textbf{\makecell{adjustedUSDintoUSC\\(2 decimals)}} \\
\hline
AUDCADc & 1000 & AUD & 0.01 & 0.98457 & 200 & 0.05 & 4.92 \\
AUDCHFc & 1000 & AUD & 0.01 & 0.56065 & 200 & 0.03 & 2.80 \\
AUDJPYc & 1000 & AUD & 0.01 & 112.387 & 200 & 5.62 & 561.94 \\
AUDNZDc & 1000 & AUD & 0.01 & 1.20455 & 200 & 0.06 & 6.02 \\
AUDUSDc & 1000 & AUD & 0.01 & 0.69455 & 200 & 0.03 & 3.47 \\
CADJPYc & 1000 & CAD & 0.01 & 114.267 & 200 & 5.71 & 571.34 \\
CHFJPYc & 1000 & CHF & 0.01 & 200.545 & 200 & 10.03 & 1002.73 \\
EURAUDc & 1000 & EUR & 0.01 & 1.64586 & 200 & 0.08 & 8.23 \\
EURCADc & 1000 & EUR & 0.01 & 1.61887 & 200 & 0.08 & 8.09 \\
EURCHFc & 1000 & EUR & 0.01 & 0.92234 & 200 & 0.05 & 4.61 \\
EURGBPc & 1000 & EUR & 0.01 & 0.85143 & 200 & 0.04 & 4.26 \\
EURJPYc & 1000 & EUR & 0.01 & 185.006 & 200 & 9.25 & 925.03 \\
EURNZDc & 1000 & EUR & 0.01 & 1.98106 & 200 & 0.10 & 9.91 \\
EURUSDc & 1000 & EUR & 0.01 & 1.14316 & 200 & 0.06 & 5.72 \\
GBPAUDc & 1000 & GBP & 0.01 & 1.93158 & 200 & 0.10 & 9.66 \\
GBPCADc & 1000 & GBP & 0.01 & 1.89973 & 200 & 0.09 & 9.50 \\
GBPCHFc & 1000 & GBP & 0.01 & 1.08336 & 200 & 0.05 & 5.42 \\
GBPJPYc & 1000 & GBP & 0.01 & 216.746 & 200 & 10.84 & 1083.73 \\
GBPNZDc & 1000 & GBP & 0.01 & 2.32505 & 200 & 0.12 & 11.63 \\
GBPUSDc & 1000 & GBP & 0.01 & 1.34005 & 200 & 0.07 & 6.70 \\
NZDJPYc & 1000 & NZD & 0.01 & 93.228 & 200 & 4.66 & 466.14 \\
NZDUSDc & 1000 & NZD & 0.01 & 0.57651 & 200 & 0.03 & 2.88 \\
USDCADc & 1000 & USD & 0.01 & 1.4158 & 200 & 0.07 & 7.08 \\
USDCHFc & 1000 & USD & 0.01 & 0.80861 & 200 & 0.04 & 4.04 \\
USDJPYc & 1000 & USD & 0.01 & 161.709 & 200 & 8.09 & 808.55 \\
XAGUSDc & 50 & XAG & 0.01 & 59.858 & 200 & 0.15 & 14.96 \\
XAUUSDc & 1 & XAU & 0.01 & 4120.623 & 200 & 0.21 & 20.60 \\
\hline
\end{tabular}%
}
\caption{Forex and Metals Margins in a Cent Account}
\label{tab:Forex and Metals Margins in a Cent Account}
\end{table}
\subsection{Summary of Account Type and Its Specifications}
\begin{align}
\text{positionMargin(dollarAccount)} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage}\right), \text{which the $contractSize$ is larger than of centAccount's quote} \label{eq:Dollar}\\
\text{positionMargin(centAccount)} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \times 100 \right), \text{which the $contractSize$ is smaller than of dollarAccount's quote} \label{eq:Cent}
\end{align}
The most important part is the contract size, contract size can be easily get from any trading platform which was connected to a broker. If you have the ligitemate value of the $contractSize$ then therefore just substitute it to the corresponsing formulas (i.e. equations \eqref{eq:Dollar} or \eqref{eq:Cent} if you are working with a Cent Account with USC as Balance's format). Look at table \ref{tab:account_summary} for more comparative information.
\begin{table}[htbp]
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|l|r|r|r|r|r|l|l|l|}
\hline
\textbf{accountType} &
\textbf{balanceExample} &
\textbf{tickerPrefix} &
\textbf{\makecell{tickerPrefix\\Example}} &
\textbf{contractSize} &
\textbf{\makecell{lotSizeMin}} &
\textbf{\makecell{lotSizeMax}} &
\textbf{\makecell{lotSizeMin\\Equivalency}} &
\textbf{\makecell{lotSizeMax\\Equivalency}} &
\textbf{\makecell{requiredLeverage\\(1:200)}} &
\textbf{\makecell{marginFormula}} &
\textbf{\makecell{lotSizeMin\\marginEaxmple}} &
\textbf{\makecell{lotSizeMax\\marginEaxmple}} \\
\hline
Dollar & 1000 USD & "m" & ASSETm (i.e. XAUUSDm) & high & 0.01 & 200 & 1 USD & 20000 USD & 200 &
\(\displaystyle \text{positionMargin(dollarAccount)} = \frac{\text{lotSize} \times \text{contractSize} \times \text{assetCurrentPrice}}{\text{requiredLeverage}}\) &
20.06 USD (in XAUUSDm) & 401200 USD (in XAUUSDm) \\
\hline
Cent & 1000 USC & "c" & ASSETc (i.e. XAUUSDc) & low & 0.01 & 200 & 1 USC & 20000 USC & 200 &
\(\displaystyle \text{positionMargin(centAccount)} = \frac{\text{lotSize} \times \text{contractSize} \times \text{assetCurrentPrice}}{\text{requiredLeverage}} \times 100\) &
20.06 USC (in XAUUSDc) & 401200 USC (in XAUUSDc) \\
\hline
\end{tabular}%
}
\caption{Account type comparison with margin formulas and examples}
\label{tab:account_summary}
\end{table}
\section{What to expect in Live Trading}
If your calculated positionMargin or accountUsedMargin (wheter you have one or multiple open trades) exceeded your accountFreeMargin, then you cannot open any trade/s simply because you dont have any free margin left. Therefore, for every baacktest it is advised to consider margin-related calculations in your pipeline to achieve near-realistic live-trading results.
\section{Contract Size Dataset}
\subsection{Contract Size Dataset in a Dollar Account}
\begin{verbatim}
ASSET(m) contractSize contractType
AUDCADm 100000 AUD
AUDCHFm 100000 AUD
AUDJPYm 100000 AUD
AUDNZDm 100000 AUD
AUDUSDm 100000 AUD
CADJPYm 100000 CAD
CHFJPYm 100000 CHF
EURAUDm 100000 EUR
EURCADm 100000 EUR
EURCHFm 100000 EUR
EURGBPm 100000 EUR
EURJPYm 100000 EUR
EURNZDm 100000 EUR
EURUSDm 100000 EUR
GBPAUDm 100000 GBP
GBPCADm 100000 GBP
GBPCHFm 100000 GBP
GBPJPYm 100000 GBP
GBPNZDm 100000 GBP
GBPUSDm 100000 GBP
NZDJPYm 100000 NZD
NZDUSDm 100000 NZD
USDCADm 100000 USD
USDCHFm 100000 USD
USDJPYm 100000 USD
XAGUSDm 5000 XAG
XAUUSDm 100 XAU
\end{verbatim}
\subsection{Contract Size Dataset in a Cent Acount}
\begin{verbatim}
ASSET(c) contractSize contractType
AUDCADc 1000 AUD
AUDCHFc 1000 AUD
AUDJPYc 1000 AUD
AUDNZDc 1000 AUD
AUDUSDc 1000 AUD
CADJPYc 1000 CAD
CHFJPYc 1000 CHF
EURAUDc 1000 EUR
EURCADc 1000 EUR
EURCHFc 1000 EUR
EURGBPc 1000 EUR
EURJPYc 1000 EUR
EURNZDc 1000 EUR
EURUSDc 1000 EUR
GBPAUDc 1000 GBP
GBPCADc 1000 GBP
GBPCHFc 1000 GBP
GBPJPYc 1000 GBP
GBPNZDc 1000 GBP
GBPUSDc 1000 GBP
NZDJPYc 1000 NZD
NZDUSDc 1000 NZD
USDCADc 1000 USD
USDCHFc 1000 USD
USDJPYc 1000 USD
XAGUSDc 50 XAG
XAUUSDc 1 XAU
\end{verbatim}
\end{document}
\newpage
\begin{verbatim}
ASSET(m) contractSize contractType
AUDCADm 100000 AUD
AUDCHFm 100000 AUD
AUDJPYm 100000 AUD
AUDNZDm 100000 AUD
AUDUSDm 100000 AUD
CADJPYm 100000 CAD
CHFJPYm 100000 CHF
EURAUDm 100000 EUR
EURCADm 100000 EUR
EURCHFm 100000 EUR
EURGBPm 100000 EUR
EURJPYm 100000 EUR
EURNZDm 100000 EUR
EURUSDm 100000 EUR
GBPAUDm 100000 GBP
GBPCADm 100000 GBP
GBPCHFm 100000 GBP
GBPJPYm 100000 GBP
GBPNZDm 100000 GBP
GBPUSDm 100000 GBP
NZDJPYm 100000 NZD
NZDUSDm 100000 NZD
USDCADm 100000 USD
USDCHFm 100000 USD
USDJPYm 100000 USD
XAGUSDm 5000 XAG
XAUUSDm 100 XAU
\end{verbatim}
\end{document}
|