Orders for the next trading day will appear in the New Orders Report section of the Positions and Order Report web page that appears when the Generate Orders button is used.


All entry orders will need to contain a quantity of future contracts, or shares prior to them being given to a broker for placement. Trading Blox applies order quantities using Money Management modules.  These blox modules contain the sizing logic needed to attach a quantity to an entry orders.  Quantity calculation methods can vary to fit the trader's idea of how a position should be sized.  When Trading Blox is installed it provides three of the more popular methods, and it will support the use of custom sizing methods.  


This section will cover some of the methods that can be used for determining order quantity.  Each order generated and given a quantity is seen as a unit.  Positions can have multiple units each with the same or different amount of contracts or shares.  Multiple units can be removed from a position one at a time, or all at once.  Units can also be reduced in size, but when the quantity being removed from a unit is equal to quantity of the unit, the unit is closed.  When more is being reduced from a unit and there are more units in the position, the remainder not yet removed is taken from another unit.


Determining Entry Order Quantities:

We are only going explore three different methods, but there are many more methods in use.  To grasp what other methods are in use, review some of the discussions in the Trader's Roundtable forum.  A lot of knowledge about order sizing and various aspects of money management, and many other aspects of trading is available in our forum.  Trading Blox license holders get free full read and write access to the forum, so be sure to sign up for access if you don't already have it.


Money managers can be built into an entry and exit blox, or added as an additional blox that appears in the System Editors Static section in the middle of the System Editor's display.  How a money manager is added to the system, isn't important, but not having one included in the system will cause all the orders to show no quantity, and no system performance.


In this section we are only going to show the process of how the size of an order to enter the market using two different sizing options in three different blox modules.  Two of three modules use a similar sizing calculation, but one uses an internal volatility estimator to create a single contract risk for orders that don't use any entry bar protective price.  


Order quantity provides the multiplier in terms of its quantity that is used to calculate the gain or loss between the entry price and the exit price.  When only 1-share or contract is in a unit, the multiplier is one.  When two are in the unit, the multiplier is two.  However many shares or contracts are in a unit, that is the number by which the results between the entry price and the exit price are multiplied.  Those same results are the value assigned to the trade record and used to adjust the account equity being used to calculate the performance of the system.


Let's look at three of the money manager modules that are installed when Trading Blox is installed.  As we go through each, the complexity of how they provide size will increase.  We will also see how they can control risk when a risk based method is part of the process for determining position size.


Basic Money Manager:

In its simplest form a fixed size of one or more contracts, or shares is entered into the quantity area of the order of parameter field.  For our tutorial we will only size the contracts


In a trade where there is an entry price difference, the difference is expressed as the point spread between the two prices.  Whatever the spread value, it only represents the price difference for a single share or contact.  Spread values are determined by finding the difference between the current Close price and the protective price.  That difference is the risk estimate that is used to inform the sizing logic that is using risk based sizing calculations how to value the risk estimate so it can determine how many contracts or shares to assign to a unit.  


When the quantity value is being determined by the Basic Money Manager, and its parameter is set to a value of one, then the price point difference represent the potential loss of the unit.  With a quantity value greater than one, the price difference between Close price and the protective price will be multiplied by the value entered into the Basic Money Manager's parameter.  


Our first Trading Blox Basic Money Manager can apply a fixed quantity to each unit order.  This is the most simple form of adding quantity to an order.

Basic Money Mgr Parameter

Fixed quantity sizing is often used because it is simple.  User picks a quantity, enters that number into the parameter and that is the basis for determining the multiple of the price point difference valuations.  While that approach is simple, it doesn't provide the trader with the ability to fix trade size to a percentage or risk, or any other idea that the trader might think will be helpful in controlling risk and in improving the utility of the account's value.  However during the development of a trading idea, a fixed quantity size keeps the focus on the new system idea while supplying a reliable quantity during early system testing making the checking of trade results simple.

Basic Money Manager Code:

'  =================================================================
'  =================================================================
'  Set the order quantity to the user value entered in the
'  parameter field:
order.SetQuantity( sizeOfUnit )
'  =================================================================
'  =================================================================


Fixed Fractional Money Manager:

This order sizing method is favored by professional because it allows the trader to determine the percentage of risk each position is allowed to use.  Percentage in this case is determined by the "Risk Per Trade (%) value entered into the Blox parameter field.  A value of 1% is the rate used to determine how much of the account's equity can be made available to the order.

Fixed Fractional Money Mgr Parameter

Let's take an example account that has a value of $100,000 and then take the 1% rate shown in the Blox image to determine how much risk equity can be allocated to an order.  In this case we find $1,000 dollars is the maximum amount we can risk.  


To determine size we need to know how much risk a single contract or share will create between an entry and its protective exit price so we can use the value of the risk to determine how many contracts or shares to use as an order quantity.  For our simple example let us also say a single contract will be creating a risk of $450 because that is the point difference value between our entry price and the order's protective exit price.  


In this example with a risk allocation is $1,000, and a single contract risk of $450, we can allow the order to have a quantity of of two contracts.  Here is the math:

Here are the calculation details for Fixed Fractional Sizing:

Account Equity = $100,000
Risk per Trade = 1%
Contract Price Risk = $450
Allowed Order Risk = (100,000 x 0.01) = $1,000
Max Order Quantity = (1,000 / 450 ) = 2.22 contracts
Order Quantity Allowed = 2 contracts

Fixed Fractional Code:

'  =================================================================
'  =================================================================
'  Risk Equity Allocation is determined by multiplying
'  the current equity available on the bar the order
'  is generated by the Risk Rate parameter percentage
'  Parameter entered as a Percentage.  A decimal value of the
'  percentage is used as the multiplier -- 1% = 0.01

riskEquity = system.tradingEquity * riskPerTrade
'  When an order is generated with a protective exit price
'  the difference between the Close price on the bar where
'  order is generated is used as the basis price from which
'  the protective exit price is compared.  Entry-Risk is the
'  point-difference between the bar's Close and order's
'  protective-exit price.
'  Dollar risk is determined my converting the point difference
'  to a monetary value by multiplying the points by the
'  instrument's Big-Point value entered into the Future's
'  Dictionary for a Future's order, or by using the monetary
'  value difference between the Close and Protective Price when
'  Stock, Funds, etc. are being used

dollarRisk = order.entryRisk * instrument.bigPointValue
'  If the order does not contain a protective exit price,

'  there won't be a risk amount in the order.  Risk amount is

'  is needed to determine the value of the risk.  With out a
'  risk amount, the calculation for determining the order's

'  single contract risk value will be zero.  When dollar-risk

'  is zero, the order will be rejected.


'  When dollar risk is greater than zero, the second part of

'  this next conditional statement will calculate a quantity.

If dollarRisk <= 0 THEN
  '  Set the Order to zero
  order.SetQuantity( 0 )
  '  Use the Integer value that results from the division of
  '  the Dollar-Risk for a single contract or share into the
  '  Risk-Equity allocated by the Risk-Per_Trade user value
  order.SetQuantity( riskEquity / dollarRisk )
'  When the order quantity is zero or less, reject the order
'  and place the order's rejection reason in the Filter.Log


'  Instrument.roundLot is the smallest quantity that can be allowed

'  to be used for the sizing of an order.

If order.quantity < instrument.roundLot THEN

  '  Place a rejection reason record in the Trading Blox Filter Log.
  order.Reject( "Quantity: " + AsString( riskEquity/dollarRisk, 2 ) _
                + " < Minimum-Round Lot: " _
                + AsString( instrument.roundLot, 2 ) _
                + " Risk Eqt: " + AsString( riskEquity,2 ) _
                + " Order-Risk: " + AsString( dollarRisk, 2 ) )
'  =================================================================
'  =================================================================



Contracts and Shares must be rounded down to an integer value.


Fixed Fractional Sizing requires a monetary value of risk in order to determine the risk of a single contract.  When a system isn't using any protective pricing the Fixed Fractional Money Manager will assume the risk of the order is infinite.  An infinite risk will force the math to round down to zero, and the order will not be given any quantity value.


Multi-Money Manager:

This order sizing Blox is a hybrid module that incorporates the two above methods, plus it adds an additional method that will estimate the possible risk amount of a contract or a share by using the Average True-Range volatility indicator adjusted result.  


This module is useful during system development and as an all-around sizing module because it gives the trader the option of fixed quantity sizing to flush out the logic and calculation using a consistent order size.  It can also be used during development when it might be important to see the performance differences of the three methods in a stepped method simulation.

Multi-Money Manager Parameters

Using this sizing module must start with the selection of the method intended. Fixed Order Qty. and Fixed Fractional Risk Rate or Volatility Adjusted method. Fixed Fractional and Volatility Adjusted use almost the same logic as is shown above, but the exception difference is in how the Volatility Adjusted will substitute, or provide a risk estimate when no risk estimate is provided.


Volatility Adjust Risk uses the Average True-Range indicator calculation to estimate the True-Range over the previous specified bars.  It also has a companion parameter that will allow the user to expand or contract the estimated volatility value which is used as the order's estimate of risk.  


Volatility Adjusted Risk Calculation Code:

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Risk-Equity is the product of Trading-Equity times Fixed Fraction % value.
riskEquity = system.tradingEquity * riskPerTrade
' Dollar-Risk is the product of AvgTrueRange * Instrument Point Value
dollarRisk = averageTrueRange * instrument.bigPointValue
' Set the trade size.
If dollarRisk <= 0 THEN
  '  Set Order Quantity to zero
  order.SetQuantity( 0 )
  '  Order Quantity is the integer value dividing Risk-Eqty-Amt by Dollar-Risk
  order.SetQuantity( riskEquity / dollarRisk )
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Reject order when quantity is less than 1.
If order.quantity < instrument.roundLot THEN
  '  Reject order - send message to Filter Log Report
  order.Reject( "Order Quantity less than 1" )

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Fixed Fractional Sizing uses the order's point spread between the close of the bar on which the order is generated to the protective price that will be active when the order is filled.  This approach when when done carefully can be a close approximation of what each contract or share might experience should the trade fail and be filled at the position's protective price.  It also uses the current value of the account to determine risk allocation.  By using the current value of the account the risk allocation preserves the risk equity intended as the account value changes.  In simple terms, a percentage allocation process allows the trader to use a fixed leverage rate that is consistent regardless of account value.  This doesn't happen with fixed order sizing because when the account amount is low, a fixed quantity will create a larger risk level than the same size will create as the account's value increases.


Volatility Adjusted Risk estimates its Risk-Equity in the same way as Fixed Fraction Sizing, but the risk estimate is determined by using the point volatility results of the Average True-Range calculation for the period of bars listed in the parameter field.  In most cases this volatility result must be adjusted to reflect the method of how the system will exit a failed position if risk-control is an important aspect for the trader.


Adjustments to the Volatility risk-point results can be amplified or reduced by changing the value of the "Volatility Risk Rate" parameter.  In most cases for long-term trend trading the value in this parameter will need to be higher if the system's performance is showing excess draw-down percentages that are greater than expected or what would have been the result if a carefully created protective price method had been active for the system.


When the Volatility risk-points are too low, orders will size with more quantity than they should have been given because the risk-points were too small.  This means that even though the Fixed Fractional Rate being applied is allocating equity amount of that rate, under estimation of risk that increases size in reality will increase the risk-rate being created when the size is too large.


This sizing module is an important module to use to get a feel for how it works and also because it is a flexible process module.  Flexibility can provide a comparison of how the system would perform using various methods in a stepped simulation.



Operator Reference, Trader's Roundtable


This completes this topic.

Edit Time: 9/25/2017 09:09:54 AM

Topic ID#: 447


Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software