Advanced Analytics



Download 0.61 Mb.
Page13/20
Date29.01.2017
Size0.61 Mb.
#11326
1   ...   9   10   11   12   13   14   15   16   ...   20

Creating Trade Systems


Description

Trade systems provide a way to test trading strategies using past data.

Formula components

Trade systems are composed of studies and conditions.

Formula example

AMA(@,ERPeriod,FastPeriod,SlowPeriod)[-1] XABOVE MA(@,Sim,MAPeriod)[-1]

Signal is true and initiates a long entry when yesterday’s Adaptive Moving Average crosses over yesterday’s Simple Moving Average



Location

Formula Builder, Trade Systems window

Toolbox


Add Study window (ATS and XTS only here)

Pre-defined formulas

ATS (Auto Trade system)

XTS (External Trade system)

cqg.AMASamp

cqg.StochSample




31.Creating a Trade System


Trade Systems are part of Formula Builder. To access them:

  1. Click the Support or System button.

  2. Select Formula Builder.

  3. Click the Trade Systems tab.

Creating a trade system involves 5 steps:

  1. Naming the system.

  2. Naming the long and/or short trades for the system.

  3. Establishing entry characteristics for the long and/or short trades.

  4. Establishing exit characteristics for the long and/or short trades.

  5. Designating a commission amount and commissions scheme (either fixed or per contract).

The limit for total combined number of entries and exits per trade system is 140.

Note: You can have multiple entries and exits for the same trade system.

  1. Click the New button in the Systems section of the Trade Systems tab to open the Create a New Trade System window.

  2. Input a name and an abbreviation for the new trade system.

The abbreviation appears as the toolbar button name. Additionally, CQG uses the abbreviation name when you use one trade system as the basis for another trade system.

By default, CQG automatically uses the first seven characters of the system name as the abbreviation. However, you can change the abbreviation:



  1. Click in the Abbrev: box.

  1. Enter the desired abbreviation name.

  2. Select the Toolbar button checkbox to place a button on the application-specific toolbar, allowing users to display the trade system in a chart window with one click.

  3. Click the OK button to save the new name and abbreviation and close the Create a New Trade System window.

32.Adding a Note to the Trade System


Users can easily enter a note about a trade system or trades within the trade system.

  1. Click either the Note button associated with the trade system name or the Note button associated with the trades for the trade system.

  2. Enter the desired note text.

33.Naming the Trades Associated with the Trade system


The second step involved in defining a Trade system is to name the trades comprising the system.

  1. Click the New button in the Trades for System section.

  2. Enter a name for the new trade.

  3. Click the OK button to record the new trade name and close the Create a New Trade window.

  4. Select the type of trade from the dropdown list in the Use As section.

Choices include Long, Short or Off.

If Off is selected, the trade will still be part of the current trade system but will not be considered in the current evaluation.


34.Designating the Order Type


The first step in establishing the entry characteristics is designating an entry signal.

  1. Click the Entry tab.

  2. Select the Order Type.

35.Designating the Order Characteristics


Select one or more of the Allow multiple entries before exit (Pyramids) and/or Allow entry on exit boxes.

Selecting the Allow multiple entries before exit checkbox allows positions to accumulate without being closed until the exit signal becomes true.

Selecting the Allow entry on exit checkbox allows entries and exits to occur on the same bar. When the box is not checked the system will wait at least until the next bar before generating an exit signal.

36.Potential Timeframe Problem in Trade systems Formulas


Because some values (high, low, and close) are not known until after a market's close, you can set up a trade system that will appear to be extremely successful, but won't work in reality. The following examples illustrate what can happen:

Example #1: In this example, the system is set up to enter on today's Open (the Order Type button) whenever today's close is greater than yesterday's close. However, you won't know the value of today's close until after the close occurs, so you can't truly base entry decisions on that future event.



The graph shows the results of implementing this trade system. It reports a great profit profile. Unfortunately, it doesn't work like that in reality.



Example #2: This example illustrates a less obvious time-based mistake. Once again, the system is set to Enter on Open. This time the signal is based on an RSI.



While that might be fine, in this case, there will be a problem because the RSI is based on the closing price.



c:\users\sophiaj\appdata\local\temp\snaghtmlb88570f4.png

Once again, you have extremely profitable results reported in the graph below, but that's because it reflects decisions that are based on future events, as a result of the RSI having a closing price parameter, while the trade system has an Open order type.



If you see remarkably profitable results reported by your trade system, check all your values to be sure your trade system isn't acting on information you won't have in real-time.


37.Designating the Entry Signal


  1. Click the Signal tab to define the actual entry signal.

  2. Trade system signals are defined using the Formula Toolbox, exactly the same way Q Formulas, Conditions, User Values and Custom Studies are specified.

  3. Click the Toolbox button.

  4. Insert the desired elements from the Formula Toolbox.

Note: Signals yield true or false values.

38.Designating the Entry Price


  1. Click the Price tab.

  2. Designate the price (using the Formula Toolbox) to be used for the entry signal.

A price can only be designated when either a Stop or a Limit order has been designated as the order type, since Open and Close already refer to a specific price.

The price designation operates in conjunction with the signal designation. In other words, the price parameter tells the system where to execute the order once the designated signal becomes true.


39.Designating a Quantity


  1. Click the Quantity tab.

  2. Input the quantity for each trade.

40.Designating Exit Characteristics


Similar to defining the entry characteristics, you must define the exit characteristics for each trade in the system. Like the entry criteria, designating the exit criteria involves specifying an order type, designating the Signal, Price, and Quantity. However, unlike the entry characteristics, you may designate more than one exit for each trade system.

Defining a New Exit


  1. Select an order type. Choices include: Open, Stop, Limit or Close.

  2. Click the New button. The Create a New Exit window opens.

c:\users\sophiaj\appdata\local\temp\snaghtmlb897808e.png

41.Enter a name for the new exit.

42.Select the type of exit. CQG offers 6 types of exits:

Custom


Money management

Break even

Dollar risk trailing

Percent risk trailing

Profit target

Entry stop

43.Select either or both of the checkboxes. Allow entry on exit allows entries and exits to occur on the same bar. Allow more than once allows more than one exit to occur on the same bar.

44.Click OK.

To copy an exit

You can copy previously created exits and use the old exit as the basis for a new exit signal.



  1. Select the exit to be copied.

  2. Click the Copy button to open the Copy an Exit window.

  3. Enter a name for the new exit.

  4. Click OK.

The newly created exit appears at the bottom of the Exits for Trade section of the Exits tab. Modify the exit using the Formula Toolbox.

Note: You can only copy previously-created custom exits.

You can also easily delete a trade exit.

To delete an exit


  1. Select the exit.

  2. Click the Delete button in the Exits section for Formula Builder.

45.Types of Exit Signals


c:\users\sophiaj\appdata\local\temp\snaghtmlb89c57e9.png

You must define an entry and an exit for each trade in your system.

CQG offers 6 types of exit signals and allows you to define multiple exit signals for each Trade system.

To define an exit signal



  1. Click the Exits tab.

  2. Select an Order Type.

Choices include Open, Stop, Limit or Close.

46.Click the New button in the Exits for Trade section to open the New Exit window, which allows you to specify one of 7 types of exits.

Or

47.Click the Copy button to use a previously defined exit signal as the basis for a new exit signal.



To specify a custom exit

  1. Select Custom.

  2. Enter a name for the Custom exit.

  3. Click the OK button.

  4. Enter a formula for the signal on the Signal tab, using the Formula Toolbox.

To specify a money management exit signal

The Money Management exit type enters a stop order at a price that represents the maximum you are willing to lose per trade.



  1. Select Money management.

  2. Enter a Name for the signal.

  3. Enter an Amount representing the maximum acceptable loss per trade.

  4. Click OK to apply the selection and close the New Exit window.

To specify a break even exit signal

A Break Even exit signal allows you to specify a certain price level for the stop to activate. Once the profit level is reached, a stop order is placed at the entry price. Therefore, the trade will break even, if the stop price is hit.



  1. Select Break Even.

  2. Enter a Name for the Break Even signal.

  3. Enter a Floor price.

The Floor price represents the point where the stop order takes effect.

To specify a trailing dollar risk exit signal

A trailing dollar risk stop allows you to specify a profit level that is no less than a user-specified dollar amount below your highest profit. In other words, it represents an amount you are willing to "give back". As profits rise, the stop will also rise.


  1. Select Dollar Risk Trailing.

  2. Enter a Name for the Dollar Risk Trailing signal.

  3. Enter an Amount.

The Amount represents the "give back" amount.

To specify a trailing percent risk exit signal

The trailing percent risk option allows you to specify a minimum level of profits and a retracement level. In the above example, the stop would activate once profits had reached $2000, and the stop would be set at 50% of that level, i.e. $1000.


  1. Select Percent Risk Trailing.

  2. Enter a Name for the Percent Risk Trailing signal.

  3. Enter a Floor amount.

  4. The Floor amount represents the level of profits where the stop is activated.

  5. Enter a Percent.

The Percent value represents the percentage of the floor value where the stop is placed.

To specify a profit target exit signal

The Profit target option sets the stop at the price that represents the designated profit amount.


  1. Select profit target.

  2. Enter a name for the profit target signal.

  3. Enter an amount.

The Amount represents the profit goal.

To specify an entry stop exit signal

Unlike the other exit rules, the Entry Stop option sets the stop using a bar value.

The Entry Stop enters the formula "BarsSinceEntry(@,0,All,ThisTradeOnly)" as an exit. If you choose High, then the next bar's high (or whatever number of bar's out chosen) is used. If you choose Low, then the next bar's low (or whatever number of bar's out chosen) is used. 



  1. Select entry stop.

  2. Select High or Low.

48.Designating the Exit Price




  1. Click the Price tab.

  2. Designate the price (using the Formula Toolbox) to be used for the exit signal.

A price can only be designated when either a Stop or a Limit order has been designated as the order type, since Open and Close already refer to a specific price.

49.Designating a Size




  1. Click the Size tab.

  2. Input the quantity for each trade.

Specifying Trading Costs

The Costs tab allows users to enter a commission amount, thereby providing a more accurate reflection of a system's profitability.

To enter a commission amount:


  1. Click the Costs tab.

  2. Enter a commission amount.

  3. Select either fixed or per contract from the drop down list.

50.To display a trade system on a chart


CQG considers the trade system a study. So like a study, we can:

a) Create, at first, the trade system button in the study window, close this window and then left click on the button appearing on the screen.

b) Add study window; right click on the chart, select Add Study. The window below will come up: Trade system is placed at the bottom of the list. You need to select which one you have to plot on the chart and click on add button.

The graph shows the results of implementing this trade system. It reports a great profit profile. Unfortunately, it doesn't work like that in reality.



c:\users\sophiaj\appdata\local\temp\snaghtmlb8aa97a7.png

Click the in Display column.



c:\users\sophiaj\appdata\local\temp\snaghtmlb8ac6d9b.png

The following window will appear.



c:\users\sophiaj\appdata\local\temp\snaghtmlb8ada34b.png

To display Entry Stop/Limit and Exit Stop/Limit


Click the Trades in Trades column.

The following window will display. You can check the check boxes to display on the chart your Entry Stop/Limit and Exit Stop/Limit.



c:\users\sophiaj\appdata\local\temp\snaghtml1340082.png

To edit Bar Range & Changing Trade Colors


Click the in TimeRange column to edit Bar Range & Changing Trade Colors.


To chart signals


Trades can be identified by:

Up/down arrows showing the opening of the trade

Horizontal Lines linking the opening price with the exit bar

Crosses showing the exit bar

Ovals standing for the exiting price

Dashed line showing the entries - exits limit / stop orders




To export trade system results


There are two different kinds of information you can export or print, when the trade system is applied on the chart:

Trade systems statistics per bar taking as reference point the total net profit values.

Analysis of Closed trades, taking as reference the Closed Net Profit value. In this analysis you will see how many trade have been opened and closed; which type of exit has been used; the entry and exit price; time etc

Tools are as follows.

Tabular display:

Tabular trades :



You can call up one of these at a time with a right-click on the printer button (on the top left of CQG screen).

CQG also allows you to export your results to a Microsoft Excel spreadsheet:


    1. Right-click the Printer button.

    2. Select Tabular Display.

    3. Highlight all the data in the table and then press CTRL + C to copy the data into the clipboard.

    4. Open a spreadsheet.

    5. Press CTRL + V to paste the data into the spreadsheet.


Inserting Functions into Entry and Exit Signals


The CQG Trade system feature comes with several special functions, which can be used to create entry and exit signals. These functions are only accessible from the Formula Toolbox using the Trade System tab in Formula Builder.

Establishing Security Provisions for a Trade system


The CQG pacs and components feature allows users to create security provisions that preclude unauthorized persons from accessing a trade system.

51.Trade System Studies


Trade System studies are found on the Add Study window:


Auto Trade system (ATS)


This study displays the potential profit and loss associated with a particular trade system, for some number of bars back or for a certain period of time.

Auto Trader Parameters



Parameter

Description

Display

Opens a sub-window with these display parameters:

Profit = Select a color for all and closed profit lines.

Loss = Select a color for all and closed loss lines.

Weight = Choose a thickness for the all and closed lines.

Draw = Select what to draw: lines and arrows, only lines, only arrows, or none

Display = Select Line or Histogram.

Trades = Opens a sub-window to assign color and thickness to trades, ATS 1-10.

Stats = Opens a sub-window to choose which ATS parameters to display



AutoTrader

Select Auto Trade system to use.

TradeCount Method

Select entry or exit based.

TimeRange

Opens a sub-window where you select the number of bars or time range for the analysis.

External Trade system (XTS)


This study graphs and analyzes the trades generated by a trade system. The study uses the buys and sells from a text file.

Text File Allowed Formats



Intraday:

i yymmdd hhnn a p s and i yymmdd hhnn sseee a p s

where:

i = trade index number (To match buys and sells. Index values must be between 1 and 10. An index less than 1 is counted as 1, and an index greater than 10 is counted as 10.)



yy = last two digits of year

mm = month

dd = day

hh = hour

nn = minutes

ss = seconds

eee = milliseconds

a = action specifier (buy, sell)

p = price specifier (open, high, low, close, or numeric value)

s = trade size

Examples:

1 130707 1031 Buy Open 100

1 130921 10311703 Sell High 250

Historical:

i yymmdd a p s

Examples:

1 130707 Buy Open 100

1 130921 Sell High 250

External Trade system Parameters



Parameter

Description

Display

Opens a sub-window with these display parameters:

Profit = Select a color for all and closed profit lines.

Loss = Select a color for all and closed loss lines.

Weight = Choose a thickness for the all and closed lines.

Draw = Select what to draw: lines and arrows, only lines, only arrows, or none

Display = Select Line or Histogram.

Trades = Opens a sub-window to assign color and thickness to trades, ATS 1-10.

Stats = Opens a sub-window to choose which ATS parameters to display



FilePath

Select the location of the text file.

TradeCount Method

Select entry or exit based.

TimeRange

Opens a sub-window where you select the number of bars or time range for the analysis.

52.Trade System Samples


CQG provides two trade system samples for you: cqg.AMASamp and cqg.StochSample.

cqg.AMASamp Signal

AMA(@,ERPeriod,FastPeriod,SlowPeriod)[-1] XABOVE MA(@,Sim,MAPeriod)[-1]

The signal becomes true and initiates a long entry when yesterday’s Adaptive Moving Average crosses over the Simple Moving Average from yesterday.

Parameters have been configured for the studies AMA (ERPeriod, FastPeriod, SlowPeriod) and MA (MAPeriod). The parameters make changing the associated periods easier from the chart window. These parameters are available for the entire trade system, so they may be used in both entries AND exits.

To change the values for these parameters, right-click on the trade system as it is displayed on the chart and select "Modify..." The parameter names will appear as column headers and the values will be found under those headers.

The Order type for this Entry is a Market Order. This means that the Trade will be executed at the Price specified in the Price tab when the Signal is true. The other order types include Stop, Limit and S/L (Stop/Limit).

The Allow multiple entries before exit (Pyramids) is fairly self-explanatory--it allows additional entry trades to be placed if the condition for that entry is hit before the exit condition is met.

The Allow entry on exit allows an entry to be placed on the same bar that is an exit for a previous trade(s). This is especially useful for Stop-and-Reverse systems.

cqg.AMASamp Price

Open(@): The price used for the trade is today’s open as the signal happened yesterday.



cqg.AMASamp Size

In this sample, the trade system trades 7 contracts. This field could also be a formula evaluating the number of contracts based on market conditions.

cqg.StochSample Signal

B.cqg.StochXAbove(@,XUpThreshold,SSKPeriod)

This System relies on the condition cqg.StochXAbove and cqg.StochXBelow. It is a reverse type system. That is, when it exits a long it also enters a Short and vice-versa. The Threshold values and SSK Period are parameters that may be optimized.

The orders in this system are all signal based.



cqg.StochSample Price: Close(@)

cqg.StochSample Size: 1

53.Trade System Functions


Most trade system functions allow you to specify which trades should be included in calculation, as a trade system may have multiple trades. Possible values are:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name

For example, consider a trade system that has 6 trades with these open position entry sizes:

Trade Name

Use As

OpenPositionEntrySize(@, ThisTradeOnly)

L1

Long

3

L2

Long

6

L3

Long

7

S1

Short

-4

S2

Short

-9

S3

Short

-5

OpenPositionEntrySize(@, All Trades) = 3 + 6 + 7 - 4 - 9 - 5 = -2

OpenPositionEntrySize(@, Long) = 3 + 6 + 7 = 16

OpenPositionEntrySize(@, Short) = -4 - 9 - 5 = -18

Trade System functions are listed in the Formula Toolbox when the Trade System Formula Builder window is active:



c:\users\michelle\desktop\tsf.png

BarsSinceEntry


The Bars Since Entry function counts the number of bars since the entry signal was generated.

Example: Trade System with the entry signal BarsSinceEntry(@,0,All,ThisTradeOnly)

Bars Since Entry Parameters

Parameter

Description

Entry Offset

Allows you to specify which event will start the count:

Zero = Last Event

One = Second-to-Last Event

Two = Third-to-Last Event



Entry Type

Specifies the type of entry to apply the trade system function to. Choices include: All Entries, Open Entries, Closed Entries or Oldest Open Entry.

Which Trades

Specify which trades begin the count:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name




BarsSinceExit


The Bars Since Exit function counts the number of bars since the exit signal was generated.

Example: Trade System with the entry signal BarsSinceExit(@,0,All,ThisTradeOnly)

Bars Since Exit Parameters

Parameter

Description

Entry Offset

Allows you to specify which event will start the count:

Zero = Last Event

One = Second-to-Last Event

Two = Third-to-Last Event



Which Trades

Specifies which trades begin the count:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name




BarsSinceStart


The Bars Since Start function counts the number of bars since the beginning of the Trade system's time range.

Example: Trade System with the entry signal BarsSinceStart(@)

Bars Since Start Parameters

None

ClosedEntryCount


The closed entry count represents the number of the entries that have been closed.

Closed Entry Count Parameters



Parameter

Description

Info

Accesses Help for the Closing Entry Count function.

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name




EntryPrice


The Entry Price function reports the price of the last entry accounting for the selected parameters.

Example: EntryPrice(,0,All,ThisTradeOnly)

Entry Price Parameters

Parameter

Description

Entry Offset

Allows you to specify which event will start the count:

Zero = Last Event

One = Second-to-Last Event

Two = Third-to-Last Event



Entry Type

Specifies the type of entry to apply the trade system function to. Choices include:

All Entries, Open Entries, Closed Entries or Oldest Open Entry.



Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name




EntryProfit


The Entry Profit function measures the profit or loss (in dollars) of the selected entry.

Entry Profit Parameters



Parameter

Description

Entry Offset

Allows you to specify which event will start the count:

Zero = Last Event

One = Second-to-Last Event

Two = Third-to-Last Event



Entry Type

Specifies the type of entry to apply the trade system function to. Choices include:

All Entries, Open Entries, Closed Entries or Oldest Open Entry.



Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name




EntrySize


The Entry Size function adds all the initial open position quantities (before any trades have been closed) of the selected trade type.

Long positions are added, while short positions are subtracted from the total.

Entry Size and Open Position Entry Size are calculated the same way, and so will result in the same value.

Entry Quantity Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name

ExitPrice


The Exit Price function reports the price of the selected trade at the time of the exit indicated by the Entry Offset.

If the Entry Offset is set to zero, the Exit Price returned is the price of the trade at its last exit.

If set to one, it returns the price at the second-to-last exit of this trade.

If set to two, it returns the price for the third-to-last exit of this trade.

Exit Price Parameters

Parameter

Description

Entry Offset

Specifies which event starts the count:

Zero = Last Event

One = Second-to-Last Event

Two = Third-to-Last Event



Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


InTrade


If you have designated a trade as T1, then you can use T1 as In Trade, which means you have an open position for that trade in your trade system.

In Trade Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


NotInTrade


If you have designated a trade as T1, then you can use T1 as Not In Trade, which means you do not have a position for that trade in your trade system.

Not In Trade Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


OpenEntryCount


The open entry count function tabulates the number of entries that have not been exited.

Open Entry Count Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


OpenPositionAverageEntryPrice


The Open Position Average Entry Price function calculates the average entry price for all currently open positions of the selected Which Trades parameter.

Open Position Average Entry Price Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


OpenPositionEntrySize


The Open Position Entry Size function adds all the initial open position quantities (before any trades have been closed) of the selected trade type. Long positions are added, while short positions are subtracted from the total.

Entry Size and Open Position Entry Size are calculated the same way, and so will result in the same value.

Open Position Entry Quantity Parameters

Parameter

Description

Which Trades

Specifies the type of trades that will cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


OpenPositionProfit


The Open Position Profit function takes the profit of all the trades not filtered out via the Which Trades parameter and adds them together.

Open Position Profit Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


OpenPositionSize


The Open Position Entry Size function adds all the open positions of the selected trade type. Long positions are added while short positions are subtracted from the total.

Open Position Quantity Parameters



Parameter

Description

Which Trades

Specifies the type of trades that cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name


OptimalF


The OptimalF function calculates the optimal quantity of contracts to bet on using to R. Vince’s method. This function can be used in Quantity expressions for entry and exit definition.

Mathematics:



Where


b = win/lose ratio per contract
p = probability of win per contract



Note: The account equity here isn’t constant and depends on previous trades results.

OptimalF Parameters

Parameter

Description

startAE

The Start Account Equity, or initial amount of money (in symbol currency). For example, for U.S.-traded instruments, this would be dollars).

tradesReq

The number of trades required to assure that the results obtained are good. TradesReq always uses the true entry count, not the number of contracts traded, since a Trade System could be set to be by contract or share. It is recommended that this value be set at 30 or more.

defF

The value to return while the trade count is less than TradesReq.

Which Trades

Specifies the type of trades which cause the count to begin:

All Trades = total of the corresponding values of all trade system’s trades

Long Trades = total of the corresponding values for trades that are set to Use as Long

Short Trades = total of the corresponding values for trades that are set to Use as Short

This Trade Only = this specific trade only

Specific trade name = a specific trade, identified by name



Closed Trades Only

If selected, the calculations will use only closed trades.



Download 0.61 Mb.

Share with your friends:
1   ...   9   10   11   12   13   14   15   16   ...   20




The database is protected by copyright ©ininet.org 2024
send message

    Main page