31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PctSize = PositionRisk * MarginDeposit / ( RiskPerContract

* PointValue );

SetPositionSize( PctSize, spsPercentOfEquity );

At first, the formula might look confusing, but plugging in some values will help

explain things. Assume you are working with the emini-SP and the MarginDeposit

is $5,600, PointValue is $50, InitialEquity = $500, 000, and 2XATR(10) =

40.00.

PctSize = .01 × $5, 600 ∕(40 × $50) =$560∕ $2, 000 = 0.028, or 2.8%

PctSize then can be used to calculate PositionSize:

$500, 000 × 0.028∕5600 = 2.5 contracts

Compare this to the Fixed Fractional calculation without using the margin-

Deposit:

$500, 000 × 0.01 ∕(40 × 50) =2.5 contracts

You get the exact same number of contracts, and since you can’t have a partial

contract, the number of contracts is rounded down to 2.

299

AMIBROKER

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!