Home

TradeSim User Manual

image

Contents

1. O2 07 990 0540990 09411992 26024 995 F 5 16 061 995 307091993 197011994 10 051 994 e 25 081 994 09424994 30 034 995 F 20 074 995 F 03411995 22 0241 996 e 13 064 996 27 094 S96 164011997 07054 997 22 084 99F 08M 21997 20s 996 16071995 30104996 16024999 08 06 999 25 091 999 12 01 2000 J O3 05 2000 18 08 2000 E 0142 2000 ogar 2004 Periodicity Daily Date 23 07 1997 Open F15 419 7000 Low 319 4270 15 51000 Displaying Open Trade Equity E Up until now all of the charting has been plotted on trade boundaries That is either at the entry of a trade or more usually at the exit of a trade The disadvantage of this is that it does not show the bar to bar price variations of the non trading days This may or may not be relevant particularly if you are a position trader only concerned with strictly adhering to your trading rules so that the only trade decisions are made when a valid entry or exit trigger has been determined by your trading system However there may be some instances where it is important to know what is happening to your trade equity on a bar by bar basis The Enterprise Edition of TradeSim facilitates this by being able to plot the Equity chart on a bar by bar basis It does this by using the underlying security data for each of the trades in the Trade Log TradeSim uses an efficient algorithm to plot the open trade equity so that memory requirements and resources a
2. Behave A K K RR RHR R K K K Statistics Folders Securities AAPT LIMITED ADELAIDE BANK ADELAIDE BRIG ADSTEAM MARI ADVANCE PROP AMALGAMATED AMCOR LIMITED AMP DIVERSIFT AMP INDUSTRIA AMP LIMITED AMP OFFICE TR Sh aains pee Om DiMyStockData Asx200 Daily 24 00 2000 Daily 24 00 2000 Daily 24 00 2000 Daily 24 08 2000 Daily 24 00 2000 Daily 24 08 2000 Daily 24 00 2000 Daily 24 08 2000 Daily 24 00 2000 Daily 24 08 2000 Daily 24 00 2000 Da 24 06 2000 Use results from last exploration DoMystockData AS5a200 Selected Securities Total Securities 205 205 Look in History mi Local Data Favorites Periodicity rick A Files of type File AAPT LIMITED Daily ADELAIDE BRIGHTO Daily ADELAIDE BANE Daily AMP DIVERSIFIED Daily ADS TEAM MARINE Daily AUSTRALIAN FOUND Daily ANGLOGOLD LIMITE Daily AUSTRALIAN GAS L Daily AMALGAMATED HOLD Daily AMP INDUS TRIAL T Daily AUSTRALIAN INFRA Daily ARMSTRONG JONES Daily ARMSTRONG JONES Daily ARMSTRONG JONES Daily ARISTOCRAT LEISU Daily AMCOR LIMITED Dail Tools OF e111 9s 24 10 1906 eof01 14494 24 10 1906 12 06 1949 24 10 1986 16 11 1999 24 10 1906 24 10 1906 13 11 1946 12 03 1949 OF 01 f2000 05 01 2000 26 06 1444 09707 1996 24 101 4AA Options edr Dare edipa re edipa re eqr Dare edi Dare e4fooye edi Dare
3. a a ee ee a sala a E p R ela vey peel HP ee Ga A pee Fe We i fe A AEN fe PB fe ee a oe E p a bg a le A D O AADU D A D D O DU E E A A o o E E 1 A C0 i TO DD Q U o NDU D 7 BE E UE E E E E mm m oo ee se Sa E E E E a eae oe eae ah O e e e re e pr 2 2 2ee2eee22 282 9 ZSE E ECETES E SS SS SS SS Ee Se my O e ODN OO tr O O e N 0 He om o MO YF N Ore i NOt DO DO e Oo typ wo h Oo rrrwrwrerisr pr ce EM EN EN CEN Lr el P al O O O e e re eee nn nnn nn NN NSN eS a eS a Date Entry Price V gt lt Trade Exit Price Trade Initial Stop sInitialStop Array J EntryPrice Array D ExitPrice Array Date 21 10 2003 Open 7 9100 High 8 0200 Low 7 9100 Close 7 9600 Vol 2 914 751 EntryPrice Array 7 9600 ExitPrice Array 7 9600 InitialStop Array 7 5795 Trade Initial Stop 7 5795 Trade Entry Price 7 9600 Tool Bar Buttons The toolbar appears along the left side of the chart Except for the tag button gg all other buttons are toggled up or down 2 O Zoom in When this button is clicked down the contents of the chart windowpane are zoomed in a horizontal direction by a fixed amount P O Zoom Out When this button is clicked down the contents of the chart windowpane are zoomed out in a horizontal direction by a fixed amount O Zoom All When this button is clicked down
4. A Yes Delay All Exits By One Bar Yes gt TradeExitPrice Open A y TradeExitPrice 1 Threshold EP Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 89 Final Release Version 6 4 1 U Profit Stops on the Short Side The following flowchart illustrates the procedure used when analysing the price information for a breach of the profit stops on the short side i No gt Next Bar Current Bar EntryTrigger 1 Yes y EP User EntryPrice Bar Count gt Inactivity Delay Next Bar lt No A Yes Exit At Stop No T gt ExitTrigger 1 A Yes XP Low pl Profit XP EP EP TR Leer p No Z r rofit gt hia Next Bar No Yes Yes Delay All Exits By One Bar Check for Price Gap downwards Yes TradeExitPrice Open gt TradeExitPrice 1 Threshold EP y SetProfitStoplnactivityDelay ExtFml TradeSim SetProfitStopInactivityDelay DELAY By default this is set to zero which means that a profit comparison is made on the entry bar If you don t wish to make a profit comparison on the entry bar then DELAY should b
5. Exploration Editor r General mmer err rert rrr e a e I e e e e e e e e e e ee et JA Name Tradesim MACD Crossover Notes Example of using the external Trade Recorder function with a simple MACD crossover function on the long side only This exploration uses all of the securities from the Asx200 Column A Column B Column C Column D Column E Column F Filter EntrylIrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD i ExitPrice CLOSE Col Name Initialstop 0 no initial stop used Trades ExtFml TradeSim RecordTrades Select Securities Folders Folders Securities E S My Computer DA MyStockData AS 200 oes 3 Floppy A H E Code C E H E Data 0 nee spare E H H ee l H A Network Neighborhood F Use results from last exploration statistics 1 folder currently added Selected Securities Total Securities Cancel Lists Help Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 78 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note that selecting the securities tab will reveal all of the securities in the database Select Securities Folders Eb rB My Computer l E a 3e Floppy A H E Code C a Data D3 ee Ai E H H Be l E 1 en Neighborhood
6. o ho on o fu co i on ny a oo oo wa an T oo or in J um o ha on z E T fi at Ta in 1 Profit R multiple Distribution P E Clicking on this tab reveals an R multiple Distribution Chart This chart displays the distribution of trade R multiples from the simulation R multiple Distribution Equis Bollinger Bands Se ee Looe saa elle ae ee SS Pa aie a ee Ne ea Py Pe a fo ae OM rears os oe ne Lesa Mes Sr er 1 1 I 1 1 1 ee ee EEEREEREEREEREREE ee ee nO EEEEEEEEREEELEEEEEEREEREEFCEEREEREEEEEEEEEEEEEREERELEEREEEREEREEEEEEEEEEELEEREEREREEREEREREELLEREEREE EE ee eee EEE ee ee ee eo ee ee ee jle ee QF ee ee ee See ee en ene ee a a a a n a a a n o a a a a a a a a aaa a y a ek 7 Clty gep G cial Bilic Glace LSO SE LoF EF multipl Changing the Distribution Chart display defaults Right clicking on any of the distribution charts will produce a popup menu like the one shown below Frequency Display Bars in display Cumulative Distribution O Frequency Display You can change the distribution chart display format by selecting the Frequency Display submenu item Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 178 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 l Relative Frequency Relative Frequency 4 o Absolute Frequency This option generates a
7. 316 48 7316 49 316 49 316 48 ER 6 33 2 646 73 2 646 73 2 646 73 2 BAB 7S 52 g5 52 95 52 95 202 76 4202 76 4202 76 202 76 4 DEZ 4 06 4 DEZ 4879 54 1 192 67 439 77 313 13 73 067 90 6 26 1 204 41 1 204 41 1 204 41 1 204 41 24 09 24 09 24 09 315 51 73 72 157 76 389 23 ATE 3 16 719 805 57 1143 37 402 76 337 80 FIJE 06 le 4216 05 4216 05 2716 05 4216 05 4 32 4 32 30 267 17 267 17 267 17 267 17 5 35 5 35 5 35 1 438 37 1 438 37 1 438 37 1 438 37 29 79 29 79 29 79 172 40 172 40 172 40 172 40 3 45 3 45 3 45 8 147 00 8 147 00 8 147 00 8 147 00 163 00 163 00 163 00 777 36 777 36 777 36 777 36 15 55 15 55 15 55 803 42 803 42 003 42 803 42 16 08 16 09 16 08 3 946 96 3 846 96 3 946 96 3 846 96 76 97 76 97 76 97 23 50 23 50 23 50 23 50 DEFES 047 DEFES 1 823 31 1 823 31 1 823 31 1 823 31 36 50 36 50 36 50 300 54 300 54 300 54 300 54 EDIZ 6 01 SES 671 07 671 07 671 07 671 07 13 43 13 43 15 43 968 18 4876 07 434 09 7 99 17 53 4 69 0 16 HE 41 491 54 41 491 54 41 491 54 41 451 54 29 84 29 84 29 845 el ee oT oe st ae M d tea M ad t M M d bn Ma Sier m G a Total Profit Mlin Frotit Aug Profit Relay Frotit Mumber oF Trades 4 40 TS 624 95 624 95 624 95 624 95 12 50 12 50 12 50 1 423 06 423 06 423 06 423 06 a 462 6 468 6 toe 770
8. Global Parameters Update Manager Securty Information Host Application Settings NOTE Security data files are only used to display secunty and trade data on a chart and if you are using the Enterprise Edition you can also plot Open Trade Equity after a simulation is run Data files are not needed or used in any simulations To specity security files you only need specify the top level directory and all tiles below ard Including this director will be scanned for any Metastock master database files Select Top Level Security Directories Retresh Top Level Security Directories De Trading DataStocksAS24E quities De Trading DataStocks Delisted Securities Metastock Master Database Files De Trading DataStocksA5 gt 4E quittes 4 master De Trading DataStocksA5 gt 4E quities B master D Trading Data StocksVa5e0 E quites C master DN Trading DataStocksAS24E quittes D niaster De Trading DataStocksAS gt 4E quities E master De Trading DataStocksA5 gt 4E quities F master DS Trading Data StocksV45 04E quites G master DT rading DataStocksAS gt 4E quitiesH Snaster DT rading DataStocksA5 gt 04E quittes sl master Display Secuntes m Selected Folder List all Symbols O Displaying all securities in a folder You can display all securities in a folder by selecting a master file from the master file list and then clicking on Display Securities in Selected Folder Copyright 2000 2009 by Compuvision Australia Pty Ltd
9. 100 00 Winning Trade Stats Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Page 256 Final Release Version 6 4 1 Maximum percentage of winning trades 32 92 Average percentage of winning trades 25 71 Minimum percentage of winning trades 15 65 Standard Deviation 3 31 Losing Trade Stats Maximum percentage of losing trades 84 35 Average percentage of losing Trades 74 21 Minimum percentage of losing trades 67 08 Standard Deviation 3 31 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 257 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 i J l l l L o ee Random Entry Bollinger Bands Exit system with limited capital Value Random Entry Bollinger Bands Exit System Monte Carlo Report Rand Entry Bollinger Bands Exit Simulation Summary Simulation Date 27 06 2001 Simulation Time 12 53 43 PM Simulation Duration 14 88 seconds Trade Parameters Initial Capital 5 000 00 Portfolio Limit 100 00 Position Size Model Fixed Percent Risk Percentage of capital risked per trade 1 00 Position size limit 100 00 Portfolio Heat 20 00 Pyramid profits Yes Transaction cost Trade Entry 20 00 Transaction cost Trade Exit 20 00 Trade Preferences Trading Instrument Stocks Copyright 2000 2009 by Compuvis
10. Cancel Ee Help Using a Table File to specify the extended values If you have table file which specifies an extended value for each symbol then this can be used instead of repeatedly calling the AssignValue from within Metastock To do this you need to organize a list of values in one text file For example the following example organizes CFD margin requirement values in a text file called C TradeSimData Table Files CFD Margin Table ASX txt As you can see in the example below there is only one value per symbol with the symbol and value arranged in two columns A hash character at the start of a line indicates that the following information on that line is a comment and should be ignored P CFO Margin Table ASX txt Notepad q Ioj x File Edit Format View Help Note If your table file has additional data then this data may need to be edited with Microsoft Excel or a suitable text editor with column formatting To indicate to the AssignValue function that you are using a table file instead of a symbol you need to insert the full filename including path where the symbol parameter normally goes and then prefix it with character as the following example shows ExtFml TradeSim AssignValue MarginReq C TradeSimData Table Files CFD Margin Table ASX txt 0 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 108 http Awww compuvision com au Last updated on 26 March 2009 F
11. NBARS This function is used to limit the maximum number of bars before the RecordTrades function is forced to exit a trade irrespective of the condition of the ExitTrigger When a trade is entered and a valid exit trigger has not been detected after NBARS have been counted the trade will automatically be terminated on the next bar If NBARS 1s set to zero then the time stop will be disabled A call to the Initialize function disables the effects of a call to this function You can also specify the time stop in terms of days This can be done by using a negative time value i e 10 specifies a time stop of 10 days where as a 10 specifies a time stop of 10 bars Note To avoid confusion the time stop now exits on the actual Nth bar day rather than one bar day after Example The following example sets up a time stop to automatically exit a trade after 60 bars have passed and an ExitTrigger has not been detected ExtFm1 TradeSim SetTimeStop 60 Example The following example sets up a time stop to automatically exit a trade after 10 days have passed and an ExitTrigger has not been detected ExtFm1 TradeSim SetTimeStop 10 SetStartRecordDate ExtFml TradeSim SetStartRecordDate day month year This function is used to set the earliest date at which trades can be entered and recorded using the RecordTrades function Any trades with entry dates below this date will be ignored and excluded from the trad
12. Time Scale Mode Chart Export Date 21 12 1999 Equity 341 700 415 Symbol GTP Trade Log Index 346 D Link Charts X axis Value at Focus Symbol at Chart Focus Chart Preferences Y axis Value at Focus Trade Log Index at Chart Focus Enable Disable Open Trade Inspector 2 RE FP sw a SSA The Chart Focus When the mouse cursor is moved over a chart a chart focus moves along the chart tracking the position of the mouse The focus snaps onto the nearest point on the chart and the value of this point can be read below in the status bar as the date trade number and value of the actual focal point The Trade Log Index is also displayed which corresponds to the Trade Log record with the same index value Note For users of the Professional and Enterprise editions double clicking on the actual chart point will jump to the corresponding record in the Trade Log provided that the Trade Log was enabled prior to the simulation Changing the Chart Time Scale Charts can be plotted with either of two time scales These are the Compressed Time Scale and the Linear Time Scale These two different time scale options control the way points are plotted on the chart Both Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 189 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 options have their disadvantages and advantages regarding the way information ca
13. Trade Parameters Equis Bollinger Bands Trade Parameters Initial Capital 50 000 00 Portfolio Limit 100 00 Position Size Model Equal Dollar Units Trade Size value 5 000 00 Pyramid profits No Transaction cost Trade Entry 0 00 Transaction cost Trade Exit 0 00 Trade Preferences Trading Instrument Stocks Break Even Trades Process separately Trade Position Type Process all trades Entry Order Type Default Order Exit Order Type Default Order Minimum Trade Size 500 00 Accept Partial Trades No Volume Filter Ignore Volume Information Detailed Report Tab Detailed Report Equis Bollinger Bands Simulation Summary Simulation Date 5 12 2002 Simulation Time 11 06 10 PM Simulation Duration 0 47 seconds Trade Summary Earliest Entry Date 10 02 92 Latest Entry Date 11 03 02 Earliest Exit Date 03 03 93 Latest Exit Date 01 05 02 First Trade Entry Date 10 02 92 Last Trade Exit Date 01 05 02 Total Trading duration 3733 days Profit Summary Profit Status PROFITABLE Starting Capital 50 000 00 Finishing Capital 95 084 11 Maximum Equity Date 49 716 02 05 06 98 Minimum Equity Date 5 893 05 03 03 93 Gross Trade Profit 89 515 57 179 03 Gross Trade Loss 44 431 47 88 86 Total Net Profit 45 084 11 90 17 Average Profit per Trade 524 23 Profit Factor 2 0147 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 165 http www c
14. ssssssecccccsssssceccocssssseeccoosssseseceossssssceecocsssssseseosssssssee 272 True Survivorship Bias Free backtesting with TradeSim IEE 0 000000000000000000000000 272 A Alternanye Sohlo ssrsiossa a a A a EE EE 272 Retning the Securiy Lisi sisson a E EAEE aAA E ALEE iA 273 Trading System Optimization ssssseeecoossssssecccccsssssececocssssssseeccocossssscccoosssssececeosssssseeesosssse 274 Selectine vour SCCUPINICS ss scivsnssiscenccacssevessssatansaacissunsissvastacesesansisndanselsienessieneesiasseveisniceassieteuse 275 The BIA BOX Chalino sessista 275 some Trading Tips and SuggestionS scccsssssseccoccssssecccccsssssscecoccsssssecoossssesecsosssssseeeessssso 275 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 19 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 PT ENN A e E E 277 Single Security Trade Recording Examples using a MetaStock Indicator 277 Example 1 Lone Trades Only sssini anaia ia aaaeaii 277 Example 2 Short Trades Oniy soisissa aa aaea aai 271 Example 3 Long and Short Trades aseisscesssscsescctessessaseesesiestapacestansatuanstsnssesensieivacessiaasericreiacess 278 PAPE TINUE B 555054 05600045200ceassa4atcadesseeadstasaenesessacesstesatcadsasecssssaesesegssssceayssssecegsasecatssesveseses 280 Multiple Security Trade Recording Examples using the MetaStock Explorer 280 Example l
15. All trades with symbol XXX from the popup menu 0 x p Open Trade Equity Chart for all trades with symbol CBA pa B E i To ae m noo Gb ee E e a Ge A poa PR Do S eH eH EH KUO Orr Orr E a E ea E e 3 E e 1 Ur e 1 E n A aa E aa E a E aa E a E ma S a TOC TOC TC a Tel CY CN OM CN OM ON CM a a a a m a tO Ot OO Tt G aa E n E aa E a E a E aa E maa E a E n a7 a 1 A e 1 S a 1 E o 1 S e1 E o 1 E e o E o 1 O s x E e1 B a 1 E o 1 S o 1 E o 1 O e 1 E o 1 O o s E n1 O aa 1 E o a S o1 E o 1 S o 1 E o 1 o o A n s A man A oa B mas O oa A mr E wan B m A o B oan A n A oas G oa A ma G oa E oaen G oa E man A n A ma P oa D mas G oa E oa S ma E oa S an 3 fi See US SST RTE REE ERE EHP PHAGES ease ae aes aa eae eas Yom 0 We e Se Cm N DP m A N et e fey ta e a oo Q m Te M D O A oN AD e O A NHU A ae D AA d a M zecca LT TEETE A LT TEERAA T ARARAT Aaaa TT TPS SCS SESE SSS SSEST RT SSSESs i a i ee le ee Ml eS i ee ce i ce Se i i ee O a E So O a EF Ea D Closed Trade Equity A Open Trade Equity Date 0406 1999 Open Trade Equity 4 44 Closed Trade Equity 4 55 Delta 57 42 f 0 11 Trade Status Open Trade lt Plotting the Open and Closed Trade Equity Chart for one Trade only You can plot the open and closed trade equity chart for any single trade from the Trade Log This plot only consists of the contribution to equity from this one trade in the Trade Log To plot this chart from the Trade Log right click
16. Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 52 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O lt Informational Messages Informational messages are reported to inform the user of the internal status of the plugin O te Disk processing messages Disk processing messages are reported when some internal disk functions are carried out from within the plugin as a result of calling the RecordTrades function o General purpose informational Messages General purpose informational messages do not display an icon symbol or trade position These messages usually precede and provide additional information for an iconic message Context Sensitive Help AA Help on Selected Iter Context sensitive help is available for some messages When the mouse is moved over a message for which LP help is available the mouse cursor will change to the following shape Double clicking on the item will bring up the relevant help page Alternatively if you click on any of the messages in the report log for which help is available the Help on Selected Item button will be enabled and clicking on this button will bring up the relevant help page as shown in the example below io x File Edit Bookmark Options Help Initial Stop Price Violations Initial Stop price violations can occur when the value represented by the Initialstop array parameter passed to the RecordTrad
17. Disable Delay OTe Gtry sy ONCE Al boss csencaculssctusedcscncianestiwstesasenanede E E ER 85 DisableDelayOfAllExitsByOneBat scssassccnscasesceasansacecnasdaceaiacsacueca entessaadaansanehtacatnansteannanidzaetonastaceahenenns 85 EpableDelayOFA Es x15 By OMe eral ase crescent need taeetin teeta gente ta cedincatneaetaeeneeceattanee he 85 Let 5 4 06 G88 Be 2 Seemann EA AAA er eae ne ee ee eee Ro 86 T 62 on 0 Laue meee ee re renee ene eee mee eaTeC Tepe Te tren ZT Cte ant ear anT ere tee ON an tr aare neh nt Cerny etna ee ate Oeree 86 Be LE a ON oe se acer cetera a dos ence oes ease oem E E eget seceacetessueesccc 86 Pana acts cette ces tata cent oad A hae caine an vet A E Gea gaatesdt detest 86 EE ere Reet Een A Tree IN NmP EE en ar ore ree pera mNnT TT Renny sor tmreT errr Mr EE 86 BS et aS ON A cts tec ce etc sina nce ae eet eee E A A 86 2 Re E E men ee ere un Tene ney ere EN I AEA VAT EN NS Toone EA 86 BS IIT CO erecta EE A AA EAE E EAEE 87 E At E IE OAE A E O AA AO O S 87 enan iee OTN AE E E A E VN O E E I E E E E E E ET E 87 Profit Stop Conirol FOnCHOS sovisssssascsstusvsvasesspseeceeicnesvasivivesssvstistavapieiiien sve sieavseasbiatiiniinuetestens 87 BS EO GUO cee ae ate ae ace nee cecuatt aac eencece ene enantancoceceattaanatesteccueacuensitancancueeeenceteseecearacee 87 i EAA sacar cina eae ean a ante dan ut OA E AEE AOS E E A T 88 L Profit Stops on the Long Side a coos seca aso cuel nae dnd a dae iew ste ne adeno aniace
18. Last updated on 26 March 2009 Final Release Version 6 4 1 Cross Referencing Summary Trade Database Window Only a single direction link exists Sea oa earn ee _ AME between the Trade Log and the fll seer BHP TBAUEVISa7 oe TAE om 676 pIa 1A Trade Database Window W2 Long SHF Iwar iair ward Hiii ao Ti Jes i n 1 To jump to a record in the Trade Database Window el Lorg BHP IS05 1897 O04 1SE HIED 7560 MIAD 227 i demanen ENAN GE M20 EGE bET ES E7 Long AFI SUNEN 7 TEL 1 2297 m 88 igh 1 50 from a record in the Trade ea bil Long AA giii iig The Bad amo aay ooo Bes wa Lorg MEY ozrli B 28 09 1599 1 200 1 030 14100 Ibm lit Long ADP AT ET BE Ei Be Lammi tT Eazi ao 2 ABR will Lang CTs Laia 5E J071 er ae 2 000 2 203 2000 0 00 FE Long SGP TET ER 2512 ab io a NE Eimi gai Ei Lim OFS a ad 017117159 2 5500 24331 20000 ELSI lia Long AGL SUS Da a Kimi EnG tami BURLE wS Corg FT 20er gE J4sr SS 1 43000 1 7345 1 7E00 22a RIB Long CAA SVE ME 21 e h angel RADE Oo aars Sil Long SAF 21 12198 230819 1 a600 1 BBA boo TESA HJE Long OA STE BG giie i wi maw wah TWHABS w15 Lorg CAA 2al Zerl ei SE 2 7500 2 5593 2 7500 0 00 20 Long AFI SEER Sec h 245 ti 20H6 243 gdr m21 Lorg AFI 2412198 23 15158 1257 1164 1297 1 00 Long SGF SESE S06 eo Eie ea eh Hint GT mi3 Lorg CAA JD sE 2571171530 2 7500 2 05E 1 6500 400 Fl24 Long AFI JOT 2 BAB 25 907 Be
19. The Suppress FileProcessing function is obsolete and no longer has any effect SetReturninfoType ExtFml TradeSim SetReturniInfoType INFO TYPE By default the RecordTrades function returns the trade tally This enables the total trade tally for each security to be reported in the exploration report when a trade database exploration 1s run However when overlaying the RecordTrades function as an indicator on a chart the trade tally is of limited use A more useful indicator would be to plot the actual entry or exit triggers or create an expert which can be overlayed on a chart The RecordTrades function can be made to report back the trigger information instead of the trade tally and long with the SuppressFileProcessing can allow the RecordTrades function to be used as an indicator or expert without actually creating a trade database file Please refer to the TB 1 document for more information on the usage and application of this function The INFO_TYPE parameter can be one of the following four values o TradeTally The RecordTrades function returns the total trade tally o EntryTriggers The RecordTrades function returns the actual entry triggers A value of 1 denotes an actual entry trigger and a value of 0 denotes no entry trigger o ExitTriggers The RecordTrades function returns the actual exit triggers A value of 1 denotes an actual exit trigger and a value of 0 denotes no exit trigger o All Trigger
20. edipa rE eq DE re edi Da re edr Dare edipa re ed DE re e402 edr Dare D4 Ri of Open Z Cancel Smart Charts z Help Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Created with MetaStock by Equis 2001 http Awww compuvision com au Last updated on 26 March 2009 Page 79 Final Release Version 6 4 1 Before we run the exploration we need to specify how many records of data we are going to analyse for each security that is scanned by the Explorer We can change this by going into the Explorer Options dialogue box where we change the Data Loading parameter from the default of 300 days to a much larger value If our security database file does not contain much information beyond 300 days worth of data then there is not much point increasing this parameter Note that there are only about 250 actual trading days in each year so that if we are interested in the last two years of trade data then we need to explore over 500 records The Explorer ES Equis Performance Monthly Close Equis Erica anrd volourmo Prost aut Eguis Ea e LLE x Eguis l New Gil Rat Data Loading gt Robert eee l TA Tu p E SUES TR TU Load Minimum Records Cony Trace fF P Trade f r Securities Help Tale Trade fF Trade f M Aways Promptfor Securities eerie Print JradeF Reporting j Organizer Trade M Notit hen Exploration is Done Trade F Help Ex
21. i tat Trade Profit Distribution Trade Statisties Ci TradeSimPatat Mach Crossover trb B M Charts Closed Trade Trades Taken 250 260 v F Equity Total Net Profit 957 65 95 SE PRE Equity E eet ege Trade Eee 73 42 7a Ar P Maximum Trade Profit 2873 18 257 Weekly Profit Minimum Trade Profit 516 66 5 25 PE Weekly Feturn Break Even Trades Z Z ag HE Monthly Profit Winning Trades 101 101 M FE Monthly Retum Losing Trades 177 177 g E Yearly Profit Profitable Trades 3e O7 36 au et Yearly Return Losing eS 63 21 3 Sr PF Rel Drawdown Average Winning Trade Profit 225 77 P22 Average Losing Trade Profit 123 42 1 Sr fot Underwater Equity fort Capital in Trades I Be winning Trades po F Losing Trades ar FE Number of Trade Positi Net Profit Security Printing the Report To print the report click on the Print Preview button The whole report is divided into pages so each chart fits on one page The printer is automatically configured for Landscape page orientation so that this allows the charts to easily fit on the page The Print Preview toolbar contains a number of buttons AIA H E Fage 1 of19 GI fs Click to print the document Click to setup the printer Click to view the first page Click to view the preceding page age 1 of 13 Displays the current page number Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 26
22. 06 09 2000 18 09 2000 04 10 2000 29 09 2000 06 10 2000 29 03 2000 na in 2nnn oOo E O 4 1 1 1 p 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 SD oOo GOG OG GOD GOGODOGO 2 oa 2 D O O O ODO 2837 trades selected from a total of 2837 trades The Trade Database Inspector will automatically be displayed docked to the Trade Database Manager Each time you select a trade from the Trade Database Manager the Inspector will be updated with the trade data You can scroll the Inspector to view the parts you can t see or you can undock it from the Trade Database Manager by dragging its docking bar away from the Trade Database Manager ioii Trade SysID Pos Symbol Periodicity CE SBFTE __Entry Date Time_ Exit Date Time P Grca Start Entry Date 23708 2000 Stop Entry Date 10703 2009 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 0 Long NWSLV Daily Yes Yes 23 08 2000 24 08 2000 1 0 Long ORG Daily Yes 24 08 2000 29 08 2000 1 0 Long QBE Daily Yes 24 08 2000 29 09 2000 1 Symbol NCM 0 Long TLS Daily ae mabe 1 a A E E erage ero Daily 0 Long Daily es 5 08 2000 28 0 i 1 Tce Te 0 WFT Daily Yes Yes 30 08 2000 27709 2000 1 R 0 WSF Daily Yes 30 08 2000 03 10 2000 1 95 08 2000 0 AMP Daily Yes Yes 31 08 2000 09 10 2000 1 99 08 2000 0 NCM Daily Yes 31 08 2000
23. AGLEMG AGLIAA AGLIDA AGLIDH AGLIGL AGLIGF AGLIGH AGLIGJ AGLIGE Page 127 Final Release Version 6 4 1 Loading a Trade Database file To load a trade database file there are two methods you can choose from You can either select the File menu item File gt Open Trade Database or simply select the Open File icon from the toolbar After choosing the appropriate option you will be greeted with an Open trade database dialogue box c EJ Turtle Breakout System trb Indicator examplel Trade Data TextTradeDatabase TRT hs Equis CMO Expert trb Rand Entry Bollinger Bands Exit trb NA Equis CMO Expert Money M MACD Crossover trb aha Equis Bollinger Bands trb MACD Crossover Reversed trb Indicator example trb Look in TradeSimD ata do fel Type Tradesim Binary Trade Database File Date Modified 6 06 2002 6 39 PM Indicator Size 2 54 KB File name Files of type Al files trb trt se Cancel The trade database files are stored in a default directory set up by the installation program This is always the c TradeSimData directory Files with the extension trb are trade database files and files with the ses extension are session files that contain user settings that are associated with a particular trade database file Both file types can be selected from the dialogue box by selecting the appropriate filter from the Files of type combo box Session files are created u
24. C Program Files Equis MetaStock External Function DLLs Note The actual location of the files may differ depending on how you have installed the software Installation for BullCharts Users BullCharts users can install the TradeSim support files for use with BullCharts The setup installation program will automatically detect if BullCharts is installed and automatically configure the installer to install the necessary support files to use BullCharts with TradeSim If necessary you can enable or disable installation of the TradeSim support files for BullCharts from the installer itself by clicking on the Select Components and Install button from the main installation window If you already have BullCharts installed it is advisable to check to see if this option has been enabled as shown in the example screen grab below Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 41 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Compurision Australia TradeSim Setup i 0 x punnnnnnnnnnunEnNNENEENNN Awi Trade Fatale Files TradeSim support files for BullCharts users Installation will use 16 11 MB That is 1 of the available disk space fay te _ sa _ At the end of the installation and if support for BullCharts has been enabled the TradeSim dll DLL file should have been installed in the BullCharts directory 1 e C Program Files BullSyst
25. ES O Toggle Tags This button enables and disables chart tags When this button is clicked a popup menu displays all of the options Mone Display Price Values e Display Pyramid Information Display Exit Status Turn OFF clipping O None Turn off tags o Display Price Values Displays a tag which indicates the price at each trade Entry Exit and Initial Stop point if appropriate o Display Pyramid Information Displays a tag which indicates pyramid information such as re entry status pyramid group and pyramid level for each trade in the pyramid o Display Exit Status Displays a tag which indicates the exit status for each trade at the trade exit point o Turn off Clipping By default the tags are clipped to the chart border so that if tags overlap the border they are hidden If you turn off clipping then you can see the whole tag even 1f it overlaps the chart border sat O Show Trade Vectors This button enables and disables trade vectors Trade Vectors are use to clearly identify the entry and exit points of a trade when there are several trade pairs on the chart at the one time E g wettest te p rr I 4 a Ls wr see eee ew ee ee ee 1 4 4 l see ee ee ew eee ee eB eB eB eB eB eB A A see ee eee eee AeA The Status Bar The status bar is divided up into the two rows Date 20 Apr 2001 Open 13 3332 High 13 3332 Low 13 1505 Close 13 1993 vol 7 529 201 The top row disp
26. EntryTrigger Ref Cross MACD Mov MACD 9 E 1 EntryPrice OPEN ExitTrigger 0 No exit trigger used ExitPrice CLOSE Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 91 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 InitialStop 0 No Initial Stop used ExtFml TradeSim Initialize ExtFml TradeSim SetVariableProfitStop ATR 10 0 ExtFml TradeSim RecordTrades Test Variable Profit Stop Trade Database Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Optional Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Recorder Control Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Page 92 Final Release Version 6 4 1 Initial Stop Control Functions The Initial Stop Control Functions are used to modify the way the RecordTrades function treats the InitialStop parameter They can be used to give more control over the InitialStop parameter than can be obtained using the MetaStock formula language Protective Stops are handled according to the following flowcharts Protective Stops on the Long Side The following flowchart illustrates the procedure used when analysing the price information for a breach of the prote
27. ExitTrigger Cross MACD Mov MACD 9 E ExitPrice CLOSE InitialStop 0 optional initial stop ExtFml TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Short example Trade Data Filename SHORT Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 277 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 InitialStop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Example 3 Long and Short Trades This is the LONG trading part of the recording process LongEntryTrigger Cross MACD Mov MACD 9 E LongEntryPrice CLOSE LongExitTrigger Cross Mov MACD 9 E MACD LongExitPrice CLOSE LongInitialStop 0 Optional initial stop ExtFml1l TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Long and Short example Trade Data Filename LONG Trade Position Type LongEntryTrigger Entry Trigger LongEntryPrice Entry Price LongIinitialStop Initial Stop LongExitTrigger Exit Trigger LongExitPrice Exit Price START Trade Recorder Control This is the SHORT trading part of the recording process ShortEntryTrigger LongExitTri
28. Mso NABOSG NABI MABIOD HABIA HABIZE HABWGC HAB MD NAB A ey Mess NABDSH NABIGY MABIOE NABIWE HABIZF NABWGD NAB WME NAB M2 Mes DA NABOSO NABIMA NABIOF HABWE HABIZG NABWGE NAB WME NAB OA MYO HABDSA NABIME NABIOG NABI D HABIZH HABWGF NAB WMG NABMWOB Mal NABECE NABIMC MABIOH NABIWE HABIZJ NABWGG HAB MH HABWOC NABEEA NABIMD HABIOI HABIWF HABIZE MHABWwGH NAB hI NAB OLD HABDDA HABE MF HABIMF HABIOJ HABIWG HABIZL HABwGI NAB WM NABWOE NABODH NABEMG NABIMG NABIOK NABIWH NABLZM NAB Gd NAB ME NAB OF NABOMC NABHA NABIMH NABIPE NAB NABLAN NAB GR NAB ML NABWOG NABOMD HABIAA HABIMH HABIFD NAB HABIZO NAB GO NAB YY MM NABH HABDMF HABIDA HABIMO MHABIFF HABIL MHABIZO NAB GP NAB MM NAB YO NABOMG NABIDH NABIMS NABIPG HABI HABSMS NAB GO NAB MO NAB WO NABOMM NABIGE NABIMT NABISA NABI NABSMT NAB GR NAB WMP NABWOR NABOMO NABIEC MABIMU MABISF NAB NAB SWA NABWGS NAB WMO HABOL HABDMS HABIGF NABIMY HABISG NABISE NAB WAH NAB YG T NAB WMA NAB OM HABD M HABIGG HABIMW HABISH HABIE NAB WAL NAB GU NAB SMS NAB WON HABD MW HABIGH ABIHA HABISO HABIB HAEA NAB WEY NAB WMT NABWOO Display Chart h Close Last updated on 26 March 2009 Click Display Chart button and then click Yes from the following message box Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Page 217 Final Release Version 6 4 1 101 NAB NATIONAL AUST BANK Price qi
29. Portfolio Heat Maximum Heat Open Trade Positions P E This chart displays the number of currently open trade positions at any one time A blue line indicates an entry into a trade which results in an increase in the number of open positions A red line indicates an exit from a trade which results in a decrease in the number of open positions Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 203 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 204 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Linking Charts E In some cases it is more convenient to stack or tile multiple charts on top of each other in order to visually associate points on different charts Not all charts can be linked for obvious reasons For example you cannot link charts with different time scales For example it is not possible to link the Monthly Return chart to the Equity chart because of the different time scale However it is possible to link the Monthly Profit to the Monthly Return chart and link the Equity Chart with the Underwater Equity chart As an example to link the Equity Chart with the Underwater Equity Chart first select the Equity chart tab and then left click on the Linked Chart tool button and select the appropriate linked chart from
30. Report Simulation Log Distributions Monte Carlo Report MACD Crossover Simulation Summary Simulation Date 9 09 2002 Simulation Time 4 47 47 PH Simulation Duration 3 99 seconds Trade Parameters Initial Capital 2550 000 00 Portfolio Limit 100 00 Position Size Model Equal Dollar Units Trade Size value 5 000 00 Pyramid profits No Before we talk about the Statistics Summary Report we shall take a look at the Simulation Log by clicking on the Simulation Log Tab Simulation Log The results of the Simulation Log are shown in the table below This table contains summary information for each of the simulations Instead of generating a single report page for each simulation all of the results are recorded in tabular form Note that only a portion of the columns and lines in the table are displayed in the report below To see the other columns and lines you need to scroll the window using the horizontal or vertical scroll bars respectively Report simulation Log Distributions Trades Executed Winning Trades winning Trades x Variance Losing a 1 768 247 32 164 0 22 5 3 765 217 25 37 0 21 5 C O Eee Column Description The following are descriptions for each of the columns in the Simulation Log Note that descriptions are given to columns even though they are not visible in the example above Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 233 ht
31. The left and right mouse buttons offer advanced control over the display of information in the chart windowpane The left mouse button supports zooming of a user defined window The right mouse button supports accurate panning of the chart pane The operation of the buttons is described in more detail below Panning using the right mouse button function When the mouse cursor is within the chart windowpane clicking and holding down the right mouse button allows the chart to be panned by moving the mouse This allows detailed viewing of any part of the chart without having to repeatedly click scroll bars Zooming using the left mouse button function When the mouse cursor is within the chart windowpane clicking and holding down the left mouse button and tracing out a rectangle on the chart by moving the mouse pointer downwards and to the right will zoom the contents in the rectangular window to fit the chart pane when the left mouse button is released Dragging the mouse cursor in the opposite direction will reset the chart axis Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 194 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Chart Descriptions Equity or Charts This chart displays the equity versus date trade number Compared to a single profit figure the system s equity curve can provide additional insight into its performance The equity curve plots t
32. This column entry displays the trade profit at trade exit before transaction costs have been deducted Column Net Trade Profit Formerly Trade Profit This column entry displays the trade profit at trade exit after both the entry and exit transaction costs have been deducted Column Gross Trade Profit This column entry displays the trade profit at exit as a percentage of the position size for the trade before transaction costs have been deducted Column Net Total Profit Formerly Trade Profit This column entry displays the trade profit at exit as a percentage of the position size for the trade after both the entry and exit transaction costs have been deducted Column Total Capital This column entry displays a running total of the total capital The total capital is equal to the Total Profit plus the initial capital Column Drawdown P E This column entry displays the current relative drawdown as a percentage of retracement in equity from the previous equity high Column Drawdown P E This column entry displays the current relative drawdown as a retracement in equity from the previous equity high Column Trade Rank This column entry displays the trade rank Column Point Value Commodities only This column displays the actual Point Value used in the trade and 1s only valid for commodities otherwise N A is displayed Column Initial Margin Commodities only This column displays the actual Initial Marg
33. To do this click the right mouse button on the Trade Preferences window and select the Set to Default Parameters menu option from the popup menu Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 161 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Running a trade simulation Once you have loaded your trade database and set up your trading parameters and preferences you are now in a position to run a trade simulation To run a trade simulation just click on the Start Simulation button on the Main Toolbar Simulation Status Window When a simulation is run a new window opens up and overlays the main window This window is called the Simulation Status window and contains information regarding the status of the current simulation Single Trade Simulation Status Simulation Time 00 00 03 Simulations Completed Total Trades Processed 54 Trades Processed 54 Trades Executed 112 Trades Rejected 471 Fartial Trades Total Capital 102 523 08 single Trade Simulation in Progress Minimize Abort Simulation Status Parameters QO Simulation Time HH MM SS The time display is a measure of the current simulation time and is reset to zero at the start of a simulation and increments by 1 second for every second that passes during a simulation Simulations Completed Specifies how many simulations have been completed This parameter is
34. Top Level Security Directories Metastock Master Database Files Display Securities m Selected Folder List all Summbols Click on the Select Top Level Security Directories button You will be greeted with the following dialog box Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 124 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Select Top Level Security Directories x Top Level Security Directorie Add Director to List N Remove Directory trom List Remove Al Direchones tron List X conc Click on Add Directory to List button and select the top level directory that contains all of the data directories of interest Browse For Folder x Select Top Level directory E Trading Data gt Backup E Stocks E 0 ase Make Mew Folder Click OK and TradeSim will scan all directories below for any MetaStock index master files Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 125 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Select Top Level Security Directories l x Top Level Security Directories D Trading DataStocks Delisted Securities Add Director to List Remove Directory trom List Remove All Directories from List X cance Once you have selected all of the top level directories click OR
35. Trade Simulation Report l loj x Trade Simulation Report Trade Statistics Detailed Report Trade Database Filename Ci TradeSinbata TradeSimbatayEquis Bollinger Bands trh Simulation Date 17 04 2008 Simulation Time 11 10 35 PH Simulation Duration 0 81 seconds Earliest Entry Date in the Trade Database lo o 2 f1992 Latest Entry Date in the Trade Database 11 03 7002 Export Trade Parameters Earliest Exit Date in the Trade Database O3 03 1993 w Export Detailed Report Latest Exit Date in the Trade Database O1 fos 7002 Export Performance Summary Start Trade Entry Date 10 02 1992 Export Combined Report Stop Trade Entry Date 11 03 2002 First Entry Date lo o2 1992 eee Last Entry Date 1103 2002 mapy selected i First Exit Date 03 03 1993 o Last Exit Date O1 fos 7002 Total Trading duration S733 days Profit Status PROFITABLE Starting Capital 450 000 00 m 4 H Trade Parameters Detailed Report Performance Summary Combined Report Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 288 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 S Trade Simulation Report 2 5 x Trade Simulation Report Trade Statistics Detailed Report Ci TradeSimPatalTradeSimPatalEquis Bollinger Bands trbh Simulation Summary Simulation Date Simulation Time Simulation Duration rade Summary AET ct ct irst Ent
36. are processed when loading a trade database Enabling the Ignore Open Trades option ignores any open trades in the trade database so they do not appear in the trade database manager and is subsequently not included in any trade simulation Ignore Pyramid Trades This option controls the way Pyramid Trades are processed when loading a trade database Enabling the Ignore Pyramid Trades option ignores any pyramid trades in the trade database so they do not appear in the trade database manager and are subsequently not included in any trade simulation To test or evaluate a pyramid trading strategy you need to first create a trade database that includes pyramid trades and then you need to make sure the Ignore Pyramid Trades option is unchecked disabled For more information on Pyramid Trades and Pyramid Trading Strategies see the relevant documentation ref AN3 Testing Trade Pyramid Strategies using TradeSim Check for Duplicate Trades This option will force a check for duplicate trades when a trade database is loaded Duplicate trades occur when there is more than one trade with an identical symbol name and entry date Note Correct checking for duplicate trades assumes that the trade database has been sorted so that duplicate trades are ordered in a contiguous manner This can only happen if the Sort by Symbol and Check for Duplicate Trades options have been enabled before a trade database is loaded If the Sort by Symbol option is not ena
37. as either a fixed cost or a fractional cost that depends on the size of the trade When the transaction cost is specified as a fixed cost the transaction cost is always the same for both sides of the trade When the transaction cost 1s specified as a fractional cost the transaction cost depends on the position value which can be different for each side of the trade O Use Transaction Cost from Trade Database Refer to the column description in the trade database manager QO Portfolio Limit This parameter sets a limit on the total amount of capital that can be allocated to all open trades at the one time and 1s specified as a percentage of the total trade capital available at the time If the Profit Pyramiding option is enabled then the portfolio limit will increase as the total equity increases and decrease as the total equity decreases O Pyramid Profits When this parameter is not checked then we aim to maintain the total trading capital at an amount specified by the Initial Capital parameter However in the course of trading we may have a situation where we have many losing trades so that the total capital has fallen below the initial capital in which case the total trading capital will be less than the initial capital If the trading system produces too many losing trades so that the total capital falls below what can reliably be traded then any simulation in progress will abort and a bankrupt condition will be reported If there are enough p
38. data displayed in the Initial Stop column of the trade database To enable protective stops when generating a trade database please refer to the section in the previous chapter Using the Initial Stop as a Protective Money Management Stop for more details on how to do this A non zero initial stop value means that you can use position size models that rely on the initial stop in order to calculate the position size for each trade O Column Price o Status Trade Entry When a trade is entered this column represents the target entry price per security and is identical to the value contained in the Entry Column Trade Database for that trade o Status Trade Exit This column represents the target exit price per security and is identical to the value contained in the Exit Column of the Trade Database for that trade O Column Actual Price P E o Status Trade Entry The actual entry price is the actual entry price per security If no slippage is incurred on entry then the Actual Entry Price will be equal to the Target Entry Price o Status Trade Exit The actual exit price is the actual price at which the trade was exited If no slippage is incurred on exit then the Actual Exit Price will be equal to the Target Exit Price O Column Slippage P E o Status Trade Entry The slippage on entry represents the difference between the Target and Actual Entry Prices Irrespective of whether a trade position is long or short a negative slippage value at entry
39. database For exporting into Microsoft Word use the RTF format When exporting as a HTML format all of the original text formatting displayed in the reports 1s preserved and charts are exported as individual JPEG images The HTML files can then be downloaded to a server for others to view on the net ey Ea MACD Crossover Trade Parameters ATF bsm30v Detailed Report rtf MACD Crossover Composite Report RTF Ei bsm30w Monte Carlo Report rt MACD Crossoveri Monte Carlo Report RTF PA bsm30wi Trade Parameters rtf MACD Crossover Combined Report RTF bsm30vw Combined Report rtf bsm30w Performance Summary t rtf Save in Espos e amp H File name MACD Crossover Composite Report Save as type Rich Text Format rtf Lancel Rich Text Format rth Hypertext markup language file Fri hs Test Format txt Ze Exporting to Excel See Appendix F Exporting reports to Excel for more details Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 271 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Miscellaneous Issues The Question of Survivorship Bias When testing a portfolio of securities over a relatively long period of time the question of survivorship bias should be addressed Survivorship bias comes into play because not all of the securities that were originally in a portfolio say 10 years
40. gt 0 5 EntryPrice CLOSE InitialStop CLOSE 3 ATR 10 ExitTrig Abs 13 BarsSince Ref C gt BBandTop C 20 S 2 1 AND H lt Ref H 1 AND Ref H 1 gt Ref H 2 AND Ref RSI 14 gt 65 1 lt 7 AND Ref C gt BBandTop C 20 S 1 25 1 AND Ref C lt BBandTop C 20 S 2 1 AND H lt Ref H 1 AND Ref H 1 gt Ref H 2 AND Ref RSI 14 1 lt ValueWhen 1 Ref C gt BBandTop C 20 S 2 1 AND H lt Ref H 1 AND Ref H 1 gt Ref H 2 AND Ref RSI 14 gt 65 1 Ref RSI 14 1 AND BarsSince C lt BBandTop C 20 S 1 25 lt BarsSince Ref C gt BBandTop C 20 S 2 1 AND H lt Ref H 1 AND Ref H 1 gt Ref H 2 AND Ref RSI 14 gt 65 1 AND BarsSince C gt BBandTop C 20 S 2 gt BarsSince C lt BBandTop C 20 S 1 25 ExitPrice CLOSE ExtFml1l TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades Rand Entry Bollinger Bands Exit LONG EntryTrig EntryPrice InitialStop ExitTrig ExitPrice START Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 252 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 We shall do a Monte Carlo analysis using the following parameters Pye E Yes Initial Trade Capital 50000 Number of Simulations 5000 Comments From the results of the analysis which are shown on the next pages you will note that this system returns a v
41. that point in time Open Trade Equity Chart for all trades H a K m E fii E E Lu t bara neal ot Si yn i D co e e Pe Pe Pe a a ae aor Daaa l e he ns ees aes es ee aA SRF RFR TAATTSSHSRSRSRSRSRSESSES So ao oOo a8 8 0 8 8 8 SOB 8 82 6 G a D D A A A A A A A DAADAA Al amp Ie jaa eae ea eee See Ss eS Ss SoS ae fel ed eel el felted ee ted de Pel ee tel ee ey cy od M m iy Pr m i D m D oe me m O O Mm O we Ome A GO we Ai d aA G e A TT F252 SSS SESS SSE SESS ESE Se see SS SER SEES m WD O Oh Oo Go Pe e YO CU yn Co Gf fF e Oo tf A amp T oD a gt ot Oo 02 02 w Sy me ae a m So Te N Oo Nor aS oO H a io a m O el y Pr A Oo TT H Oar goga TmT p TmT i m m E Closed Trade Equity A Ope pai DL im m ja Cc E y lili Trade Log ioj x a E a A 1251 514 wow Exit Long 1tOSst2000 3 6 9530 6 9530 0 00 l 1223 alz 0 MCF Exit Long 2Orosr2000 43 24 0000 24 0000 0 0 1284 B31 BHP Exit Long 25032000 17 5 7285 5 7255 0 00 Exit Long OF More 000 Long Tor 000 Exit Long adizio Long aiddi Long SOMA 000 Long Aiidh Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 224 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 A blue marker indicates the entry to a trade that is currently open A red marker indicates the exit to a trade that is currently open Open Trade Inspec
42. 0 0 0 0 1 75 06 24 on 0 OC 1443 trades selected from a total of 1443 trades From the Trade Log In the Trade Log window right click on the respective trade and then select from the popup menu Display Trade on Chart followed by Daily or Weekly Chart Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 214 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Hill Trade Log Jump to Trade Entry Locate in Trade Database Select all trades in Trade Database Locate in Chart Highlight all currently open trades Preferences Export Trade Log Plot Open Equity Chart For Dis A o Trade on Chart OF fMoe1996 Weekly Chart lt TENTER 11 7000 aN T Enst Long Orona SCS Long The Security Chart The security chart displays a candle or bar chart of the security data If you have chosen to display the trade data superimposed on the chart then the chart will automatically zoom to the date extents of the trade so that all bar information relevant to the trade will be displayed within the chart window Zoom In Chart Toolbar Zoom Out Ti trade Chart Oy Zoom All Zoom Trade Extents E Automatically Resize Price Chart LIK Automatically Resize Volume Chat gt T Horizontal Price Grid P p ky it iit at Vertical Date Grid a Display Trade Entry E Information X Display Trad
43. 171 Final Release Version 6 4 1 The Trade Statistics Tab This tab contains a collection of information pertaining to the securities encountered in a trade simulation It is divided into two tabs The first tab contains a table that provides tabulated information on all of the securities encountered in a trade simulation The second tab provides a graphical means of evaluating security performance by comparing accumulated trading profits of all of the securities encountered in a trading simulation As a cautionary measure one should always be wary of the statistical relevance of such information particularly when it contains information that applies only to such a small sample space of only a few trades for each security as would be obtained when running a simulation using a broad portfolio containing many hundreds of securities To alleviate possible sampling errors due to inadequate sample space TradeSim provides a basket tester which tests every trade that is enabled in the trade database manager and applies an equal amount of capital to each trade independent of every other trade This usually results in significantly more trades and hence more reliable and unbiased statistics but at the cost of being a more unrealistic or a true to life trading scenario since the total capital used for each trade always remains constant Trade Statistics Table This tab contains a table that provides tabulated information on all of the securities encountered i
44. 262 Final Release Version 6 4 1 Average Relative Percentage Drawdown Stats The Average Relative Percent Drawdown is the average value of all the percentage drawdowns for one single simulation It is equivalent to averaging all points on the Relative Drawdown chart for a single simulation When running a Monte Carlo Simulation each simulation produces its own unique value for the Average Relative Percent Drawdown in much the same way as it produces a unique profit outcome We can derive useful statistics from this set of outcomes just as we did for the Profit Winning and Losing Trade outcomes 0 Maximum of the Average Relative Percent Drawdown This is the maximum value found for the Average Relative Percent Drawdown for all of the simulations in the Monte Carlo Analysis O Average of the Average Relative Percent Drawdown This is the average value calculated from the Average Relative Percent Drawdown for all of the simulations in the Monte Carlo Analysis It is calculated by summing all of the Average Relative Percent Drawdown outcomes and dividing it by the number of simulations Q Minimum of the Average Relative Percent Drawdown This is the minimum value found for the Average Relative Percent Drawdown for all of the simulations in the Monte Carlo Analysis QO Standard Deviation This is the Standard Deviation of the Average Relative Percent Drawdown Average Relative Dollar Drawdown Stats The Average Relative Dollar Drawdown is the averag
45. 295 EX DOE CN n Baris PE en E O E A 295 Exporting the Chart as an Image File ssssssssseeeccccccccsssssssesececececocoossssssssesececcoccossssssssssssssseeee 295 OTA A OWA S E E E A E E E E AE EE AS 296 w A E T a E EEA E EEEE AA EEO I E O ANA T R eens 296 R E ae i E E EE E tas E AE A EE OEA A E A E T 296 E E i E EEA E ETEEN A I OEA AAA AT a pets E A E NOE A EA E AE TAA 296 E E a rer et een eee rece ero ey Te ene eeT Reeer eee Eee centenary eer Remy Te tet Serine eee eRy Teer 296 E RI soccer eevee EA E E E ore 296 Exporting the Chart as a Numeric Piles accessiccssscscsccccsdscetssceacesavecsssatetsdhstesnssecteetaceecieusawiatecestuarsts 296 Series seleccion Men s a a E A arai 296 e E T e T E N 296 ces ccc sar E E AA E E AE A E TEA E E E E TEA tes 296 E lt 5 E EPIA E ANEA I NN ONE EE AANE S I E A TASAA 296 Er TEME Table eaer E E E EEEE EE TS 296 EL RR 2 ol a A E E E mere 296 REFERENCE CHERA TURE sessss cssensetecteresssesssasesssesssessssessbessessssssssstseseivssvessissssbsesouesesisss 297 Recommended Readini iicissscsinnccscceciivessnntastacucsscatsaevssncdasdicasonsidetedeviecesindsceccestsnessteldsodeossaes 297 TradeSim Application Notes ssssssssseeeccccccccosssssssececcceccccooossssssssecececccocssssssssesseeeeccecoosesssssssssssee 297 PradeSmi Technine all Brie Eae 297 General Reading and Rete CIiCES cies ciswccccnesacustcusecsenersncesveccevvasonvesavsteacvsnensbenssctsncesvesseensuctuve 297 Magazines and Jour
46. 3 1 Profit 14 5 761232 4 CML 0 Long Daily 20 Aug 2002 5 9800 23 Oct 2002 6 4100 3 0 Base 46 5 613256 5 CML 0 Long Daily 27 Nov 2002 6 4200 09 Dec 2002 6 3500 4 0 Base 8 5 883530 6 CML 0 Long Daily 06 Jan 2003 6 4900 22 Jan 2003 6 3600 5 0 Base 12 6 088612 T CML 0 Long Daily 06 Mar 2003 5 6300 07 Mar 2003 5 5200 6 0 Base 1 5 128261 8 CML 0 Long Daily 08 Apr 2003 6 4700 15 Apr 2003 6 3600 7 3 Profit 5 6 031560 9 CML 0 Long Daily 27 Mar 2003 6 2500 15 Apr 2003 6 3600 7 2 Profit 13 5 642129 10 CML 0 Long Daily 17 Mar 2003 6 0400 15 Apr 2003 6 3600 7 1 Profit 21 5 175015 11 CML 0 Long Daily 14 Mar 2003 5 5600 15 Apr 2003 6 3600 7 0 Base 22 5 074462 12 CML 0 Long Daily 30 Apr 2003 6 8800 06 May 2003 6 5500 8 1 Profit 4 6 308216 13 CML 0 Long Daily 17 Apr 2003 6 4800 06 May 2003 6 5500 8 0 Base 10 6 055758 14 CML 0 Long Daily 12 Jun 2003 7 1600 24 Jun 2003 7 0800 9 2 Profit 8 6 645840 15 CML 0 Long Daily 05 Jun 2003 6 9500 24 Jun 2003 7 0800 9 1 Profit 12 6 482296 16 CML 0 Long Daily 27 May 2003 6 7300 24 Jun 2003 7 0800 9 0 Base 19 6 331480 17 CML 0 Long Daily 16 Jul 2003 7 3000 23 Jul 2003 7 2200 10 0 Base 5 6 947215 18 CML 0 Long Daily 15 Aug 2003 7 4600 18 Aug 2003 7 3700 11 0 Base 1 7 083935 19 CML 0 Long Daily 22 5ep 2003 7 7800 08 Oct 2003 7 5300 12 1 Profit T2 7 310933 E20 cM O0 Long Daily 18 Sep 2003 7 4700 08 Oct 2003 it en 7 146460 21 CML 0 Long Daily 21 Oct 2003 7 9600 2
47. 31 Average Absolute Dollar Drawdown 11 946 76 Minimum Absolute Dollar Drawdown 9 177 45 Standard Deviation 3 620 72 Average Relative Drawdown Stats Maximum of the Average Relative Dollar Drawdown 982 52 Average of the Average Relative Dollar Drawdown 715 10 Minimum of the Average Relative Dollar Drawdown 510 79 Standard Deviation 95 57 Maximum Absolute Drawdown Stats Maximum Absolute Dollar Drawdown 36 117 43 Average Absolute Dollar Drawdown 21 326 65 Minimum Absolute Dollar Drawdown 12 763 91 Standard Deviation 4 255 58 Report Description O Simulation Summary O Simulation Date This is the date at which the Monte Carlo Simulation was carried out Simulation Time This is the time at which the Monte Carlo Simulation was carried out Simulation Duration This is time for the complete duration of the Monte Carlo analysis O Trade Parameters and Preferences These parameters mirror the parameters setup in the Trade Parameters and Trade Preferences window O Simulation Stats O Number of trade simulations This is the total number of complete trade simulations carried out Trades Processed per simulation This is the number of trades processed per simulation which is always the same number for each simulation Average Number of Trades executed This is the average value ofall of the values in the Trades Executed column of the Simulation Log The equivalent percentage value is shown in parenthes
48. 4 1 SetValue ExtFml1 TradeSim SetValue ATTRIBUTE VALUE Valid Attributes are PointValue InitialMargin MaxLoss TransactionCost SystemID TradeRank MarginReq A call to this function sets the value of any one of the extended data values irrespective of symbol ExtFml TradeSim InitializeValues always include this call ExtFml TradeSim SetValue PointValue 30 sets Point Value to 30 ExtFm1 TradeSim SetValue InitialMargin 4300 sets the Initial Margin to 4300 ExtFml TradeSim SetValue MaxLoss 5000 sets the Maximum Loss to 5000 ExtFml1 TradeSim SetValue TransactionCost 25 sets the Transaction Cost to 25 ExtFml1 TradeSim SetValue SystemID 2 sets the System ID to 2 ExtFml1 TradeSim SetValue TradeRank 80 sets the Trade Rank to 80 ExtFml1 TradeSim SetValue MarginReq 50 sets the Margin Requirement to 50 AssignValue ExtFml1 TradeSim AssignValue ATTRIBUTE SYMBOL VALUE Valid Attributes are PointValue InitialMargin MaxLoss TransactionCost TradeRank A call to this function sets the value of any one of the extended data values depending on the symbol For example this is a useful way of assigning a different set of commodity values to different markets symbols ExtFml1 TradeSim InitializeValues always include this call ExtFm1 TradeSim AssignValue PointValue ABC 4
49. 4400 43 5 700 7 96 Stopped Out 2984 Long SGP 10 12 01 14 01 02 4 1657 4 3620 4 1720 4 36 Stopped Out W 2965 Long BIL 10 12 01 16 01 02 4 2b5 4 9500 10 1600 2 11 Open Trade w 2986 Long OTT 10 12 01 16 01 02 O 047 0 0 740 0 0 740 0 00 Open Trade w 298 Long SWS Tiele O 04 01 02 2 0629 2 2000 2 4600 11 62 Normal w 2998 Long HLY 12 12 01 18 0102 4d 6216 4 9500 5 0000 1 01 Open Trade 2999 Long TAB dale 16 01 02 2 50 70 2 7 300 2 5640 4 91 Normal Ww 2990 Long CBA 14 12 01 10 01 02 z26 0956 25 207 z29 5280 4 bo Normal W239 Long PHY 14 12 01 16 01 02 93 7407 4 0600 4 1 600 2 46 Open Trade v 2992 Long IOF 16 12 01 16 01 02 1 1211 1 16800 1 1 700 0 85 Open Trade Ww 2993 Long ENE 20 12 01 1801 02 5 4 700 6 3100 6 6920 6 05 Open Trade E Controlling how much data to trade with When we insert the RecordTrades Indicator onto our chart it only uses the data that has been loaded into the chart to trade with and no more even though the particular security that we are interested in may contain much more data than this When we load a data file MetaStock allows us to control how much data is loaded By default this is set to 300 days so that when we run a Trade Recording over the chart we only generate trades for the most recent 300 days worth of trade data If we want to change the period of trading we need to change how much data that is loaded This can be done from the Load Options dialogue bo
50. 5000 Position Size Limit Simulation Type Monte Carlo Analysis Number of Simulations 5000 To analyse this system load up the MACD crossover reversed trb trade database file Switching to the Trade Database Window and scrolling through the database list with the color coding option switched on you will immediately notice that there now are a relatively larger number of trades that have a positive percentage change compared to the original MACD Crossover system This provides a rough indication that the modification of reversing the entry and exit triggers has improved the proportion of winning trades Now run a Monte Carlo analysis with 5 000 simulations Monte Carlo Report MACD Crossover Reversed Simulation Date Simulation Time Simulation Duration Initial Capital Portfolio Limit Position Size Model Trade Size value Pyramid profits Simulation Summary Trade Parameters Transaction cost Trade Entry Transaction cost Trade Exit Trading Instrument Break Even Trades Trade Position Type Entry Order Type Trade Preferences 26 07 2001 12 07 54 PM 277 43 seconds 50 000 00 100 00 Equal Dollar Units 5 000 00 No 0 00 0 00 Stocks Process separately Process all trades Default Order Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Page 249 Final Release Version 6 4 1 Ex
51. 88 770 68 70 88 70 68 15 42 15 4276 15 424 25 70 4r 70 58 12 99 44 o0 14 90 4 40 7S Se Note An inadequate number of trades for each security can often make the results statistically insignificant and prone to error so bear this in mind when you are trying to objectively evaluate the strength of a trading system with a particular security For example 4 winning trades out of a total of 5 trades for a particular trading system is not conclusive evidence that a trading system has a high win ratio nor would a positive total profit necessarily indicate a successful trading system The rule of thumb 1s that at least a total number of 30 trades is required for each security are required before you can draw any conclusions about the security performance This is the reason why a True Portfolio system test is a much more accurate and statistically significant test of a trading system compared to a basket tester which tests each security in isolation from each other Column Description O Symbol This column represents the symbol of the security Q Total Net Profit This column represents the sum of the net profit for all of the trades with the same security name irrespective of the capital used in each trade Note Because the net dollar profit for each trade depends on the amount of capital invested in the trade the results will be biased or skewed toward the trades that have the greater trading capital invested in the trade so th
52. A E A N A A A A S TE T E 253 Case Study Trading with limited capital cccccccsssssssssscccccccsssssssssscccccssesessssssccsooes 255 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 18 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 MACD Crossover Reversed system with limited Capital ccsssscssscssccccccccccsssseeeeeeeees 256 Random Entry Bollinger Bands Exit system with limited capital cccsssssssssssssssseseees 258 COMMING INES derinse sovevnsecescsAeaeeseessecesaausessvsnnnecusestacsssoenbasecaueseueneanvetarssnneeoseesseraeees 260 POPPI HVA D TA E E E A E E EE E E A E 261 Addendum to TradeSim Enterprise sseccsccosssssececocssssseececccosssssecceocossssseeccossssssseceosssssseee 261 Monit Caro REPON aei E E A 261 Average Relative Percentage Drawdown Stats nnnnnnnnnnennennneneeererrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrreen 263 Q Maximum of the Average Relative Percent Drawdown cccccccssccssscceesseceessecesssecesseecesseecesseecnseeeeesaeeeens 263 LI Average of the Average Relative Percent Drawdown ccccccccccesssccsssceessseeesseeeeesseceessecesssecesssecesaeeceeseeess 263 LJ Minimum of the Average Relative Percent Drawdown cccccccssccssscccssscecsseecesseceesseceesseceesseceesaeceesaeeens 263 H Standard DS VOM erreina E E E EEE ie emesis ena 263 Average Relative Doll
53. AE T E N 174 Q Minimum Profit seeeeeeneseenssessesssnesssesssresserssersssssnsessrressresstessttssntesstsssttssttesstesstessttssrtessresstessossneessne 174 FR Pront O cerais scsguses es ean r SEENE EANA EA O E AEAEE NETE EREET 174 m E a Go E coe cian E AEA EAE E E EA S E EA E TA 174 H Nimberot Trades gap tu ete wince AATE AEEA ES EEEN EE AAE 174 E AN A E E EOE A ETTE ee 174 O Winning TES earenicasiecesonsharesieuehocgnadenannonensaddan vanaaieshannaideanas G aeaaea AANA EANAN ENANS AAAA 174 G Corme Tride ceranae recat eE E AES EET EEE 174 Ei St Trade o hesnecan a aN R A AE E EAEE eee 174 a 3 ga oso Todes orii aa E E eee EEE AEREE EE ene E A EAE EGE 174 Ty TAUS a sen ces cron dav EA A A S 174 LY Minimum Days in Trades aasiacinerniiiinonnnan a a AN A Ti 174 E Ave DS a T eaa A O E AS 174 ED Maximum Days m Trades cessaria rine aina EAE AR EEA AA EN AT 174 OaE To EE e a E E E E 174 Exporting the Trade Statistics Table 4 PB cccccscsccreccesncvecedensanenncsnscenecenecunncsaadenmcennnenddseceaicenetuatdcnnesses 175 pecutity Profit Chart Tab sssccccscccsetssetcaccascsasaccdeneccicsss sa scadiacsdesdcscdacancdcun aiaiai eaaa aided sinters 175 LJ Minimum Percentage Net Profit versus Security ccc cccsccesscecesscecsssecessseecesseceesseceessecessseceessecesseecenseeess 175 Q Average Percentage Net Profit versus Security ccs jsacscasiacaccessaswsdsnauatd edayasaapsnencsenanas shes ines tecsseneud ieeuassndyentitnds 175 LJ Ma
54. AssignValue and SetValue statements and the rest of the system formula would be placed in the filter tab For example add all AssignValue and SetValue function calls to the columns starting with column A Note The InitializeValues function should only be used once in column A and should be placed first at the top of the column before any other calls Column A Column B Column C Column D Column E Column F Filter BFztPml TradeSim InitializeValues BetPmli TradeSim AssignValue PointValue HG _ C Co 250 Col Name JExtFml Tradesin AssignYalue InitialMargin HG rt ECS erop Add your normal system formula in the Filter Tab Column A Column B Column E Column O Column E Column F Filter EntryTrigger Cross MACD Mowi HACIO 9 Eid EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACDOC U1 EgitPrice CLOSE InitialStop 0 Ho Initial Stop used Make sure that the Use Filter option is checked in the Exploration Options Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 107 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Exploration Options x Exploration Date Most Recent Date Specific Date Date E T 23 09 2004 Exploration Periodicity C Intraday Tick Minute f Daily C Weekly C Monthly C Quarterly C Yearly Ok
55. CLOSE InitialStop 0 ExtFml TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades Rand Entry MACD Long Example LONG Trade Data Filename EntryTrigger Trade Position Type EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 68 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Refining the entry and exit conditions So far in all of the previous examples we have executed the trade transactions at the close of the market This is okay in theory but in practice this is not really practical since the closing price is not known until the market is closed in which case we cannot place a trade until the next trading day Also our securities database will not have today s trading information until the market has closed and we have updated our securities database in which case the data is usually only available several hours after the markets have closed Once we have a signal to enter the market we can make the simulation more realistic by entering the market on the next trading day There are two ways of achieving this One 1s to insert a delay using the REF function the other is to use two newly introduced functions in the TradeSim plug in function library 1 Using the
56. Control Tally adding this line will display the correct number of trades written to the trade database Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 282 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix C Implementing Volatility Trailing Stops the Correct Way This article has now been moved to the reference library folder in your TradeSim installation folder Please click here to view this document Note If this article is missing it can be downloaded from the following website location http www compuvision com au DownloadTradeSim htm Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 283 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix D Statistics and Frequency Distributions Statistical data generated in large masses can be very useful in studying the behaviour of a random process if the data is presented in the form of a relative frequency distribution For those that are not familiar with probability statistics and random processes a frequency distribution is a way of correlating random data and plotting the resulting data in a graphical form Such an arrangement is obtained by grouping the data into classes and determining the proportion of measurements in each of the classes For instance if we were interested in studying the life expectancy of
57. DS hares W4u 45204G6 master DS hares Va un485204H master DS hares Wa u4453 4 master DO Shares Wau 45204 master OS hares Wau 5346 master OS hares Wau44524L master l l D ASharestAu ASAM Amaster security Top Level Directory O S hares Wu S244A master DS hares Vauna524 0 master TAREE kaa O Shares au S Pmaster D ASharestAr ASA master Parel DO Shares W4u 45204F master OS hares aun 5245 master DA Shares Wau445245 master DO Shares Wau 45204U master OS hares Wau Se master OS hares MALA SAV master D ASharestAn ASe master DO Shares Wau ASer master DS hares Wau SA master NOTE Security data files are only used to display security and trade data on a chart and if you are uzing the Enterprise Edition you can also plot Open Trade Equity after a simulation is run Data files are not needed or used in any simulations To specity security files you only need specify the top level directory and all files below and including this directory will be scanned for any Metastock master database files Display Securities m Selected Folder List all Symbols Click on the file specification icon Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 212 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Security Top Level Directory D SharesAuAS a Select the top level directory from the appropriate drive Select Directory Ely shares ce ASX
58. Drawdown of 50 was caused when equity was reduced from a maximum equity of 10 000 to a minimum equity of 5 000 or a 5 000 drawdown or reduction in equity From the same equity curve you could also have a maximum Peak to Valley Dollar Drawdown of 400 000 when the equity was reduced from 1 000 000 to 600 000 even though the percentage reduction is only 40 and less than the 50 maximum Peak to Valley Percentage Drawdown caused when the equity was reduced from 10 000 to 5 000 Q Max Absolute Percent Drawdown The Peak to Valley percent drawdown is calculated by searching for an equity high and low point that result in the largest percentage reduction in equity and by subtracting the equity low point from the equity high point The equivalent dollar drawdown is displayed in brackets as a reduction in equity Note that the Capital Peak Date This is the high point peak value in equity from which the P V Dollar Drawdown is computed Capital Valley Date This is the low point valley value in equity from which the P V Dollar Drawdown is computed Performance Summary Report Tab P E The Performance Summary Report provides a way of comparing the performance between all trades long trades and short trades by comparing a number of important parameters and statistics Note that at any time when there is zero trades the remaining statistics are invalid such as in the following example for Short trades Performance Summary Re
59. Function Dlls Note The actual directory where the plugin is installed may vary depending on how you have installed BullCharts on your PC Installing WinHelp for Windows Vista TradeSim uses WinHelp to display some context sensitive help Windows Help WinHIp32 exe is a Help program that has been included with Microsoft Windows versions starting with the Microsoft Windows 3 1 Operating system However the Windows Help program has not had a major update for many releases and no longer meets Microsoft s standards Therefore starting with the release of Windows Vista the Windows Help program will not ship as a feature of Windows If you want to view 32 bit hlp files you must download and install the program WinHI1p32 exe from the Microsoft Download Center Click here to install WinHelp for Windows Vista http www microsoft com downloads details aspx FamilyiId 6EBCFAD9 D3F5 4365 8070 334CD175D4BB amp displaylang en Quick Start Before you do anything we suggest that you read the introductory chapter of this manual and familiarize yourself with the concept of TradeSim You can run TradeSim straight away and familiarize yourself with its operation by using some of the example trade database file examples that were installed during the setup procedure At this stage it 1s not necessary to understand the mechanics of generating trade database files to use the example database files with TradeSim For a rundown on the operation of TradeS
60. Last updated on 26 March 2009 Final Release Version 6 4 1 Coum FE e 09 tae terest E E E E E 133 a Coumi Trade ID en enti ncree etter Sten trent nie meatn nines nertt ett erntenertanenee renee nent 133 E Column systemi Meerssen serine pienia aN Eaa N SECEPAT NANN ASTE ENANS ETEA Ea AiE 133 G Colomn Trade POSON saeia aae E T A E E EA E E uceeele 133 G Column Stock Symbol sec ace dace veges aein cece odio atest R AEA a aaa a a 133 Os Column Periodicity a AE nc icccsssssssscstssssucessessessesessrsnssesessusatsessnsnseesessncessesansess 133 O Column Entry Date Time Se ii cccssssssssssssssessssssnssssssessesessesuesessssesersesaesnes 133 O Column Exit Date Time Se i iciisssssssssssstsssssssssssssstsssssssnsaensenees 133 GG Ui E E AE A E tes E Sir cer on ceed ate A OE A 133 LI Column Pyramid Re entry Status 0 ss cccecss cciasscccavesscvsusisdoasshussedevsdsavavebebendeedsienesebeccssncaapdetauessssdeeandessonusyee 133 Ei Column Bars m Tade orenian na dune AEE E E A EAAS 134 G Column Days Gn tadej assein ia rE aA EEN N EEA aAA EAA i 134 G Commo aa O S E en rE ne ee a eee eer 134 O Column 8 0 42 wo eee ee ee reo eR E crn eee ee eee en 134 G S o estore mp alia aig ic eee emer ner mre rere Sartre name ce teem Te erty ie eeenr ee EA EELEE EEE 134 Go irate E aM cn ec ta ce ketene esc sense A AEEA LATA AT 134 H haa aval Exi SaS en nd ee ee nT nD enn RENT Mn enn AA AE DAE EAEAN 134 GE olumo ii Vea create cheese ee dees
61. Maximum Absolute Dollar Drawdown This is the maximum Absolute Dollar Drawdown found from all of the simulations Average Absolute Dollar Drawdown This is the average or mean value of all of the Absolute Dollar Drawdown values from all of the simulations a Minimum Absolute Dollar Drawdown This is the minimum Absolute Dollar Drawdown found from all of the simulations Standard Deviation This is the standard deviation of the Absolute Dollar Drawdown for all of the simulations Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 263 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Maximum Absolute Peak to Valley Percentage Drawdown Stats The Absolute or Peak to Valley Percentage Drawdown is the worst case percentage reduction in equity from an equity high point The Absolute Percentage Drawdown 1s described more fully in the following section Absolute Peak to Valley Percent Drawdown parameters Maximum Absolute Percentage Drawdown This is the maximum Absolute Percentage Drawdown found from all of the simulations O Average Absolute Percentage Drawdown This is the average or mean value of all of the Absolute Percentage Drawdown values from all of the simulations Minimum Absolute Percentage Drawdown This is the minimum Absolute Percentage Drawdown found from all of the simulations Standard Deviation This is the standard deviation of the Absolute Percentag
62. MetaStock REF function You can delay your entry condition until the next day by using the REF function to look back at the previous day to see whether you have an entry trigger and take the trade at the opening price on the next trading day Similarly when your trading system produces an exit trigger you want to exit the trade on the next day at the opening price Taking our previous example of the MACD crossover on the long side we can rewrite the formula as follows EntryPrice CLOSE EntryTrigger Cross MACD Mov MACD 9 E ExitPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD InitialStop 0 optional initial stop NewEntryPrice OPEN entry price at next days open NewEntryTrigger REF EntryTrigger 1 NewExitPrice OPEN exit price at next days open NewExitTrigger REF ExitTrigger 1 ExtFml TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Long example Trade Data Filename LONG Trade Position Type NewEntryTrigger Entry Trigger NewEntryPrice Entry Price InitialStop Initial Stop NewExitTrigger Exit Trigger NewExitPrice Exit Price START Trade Recorder Control 2 Using the TradeSim Plug In function library You can use the EnableDelayOfEntryByOneBar and EnableDelayOfAIExitsByOneBar external functions to delay the entry and exit triggers by one bar This is preferable and less confus
63. O ExitPricel Exit Price Tally ExtFml TradeSim RecordTrades Multiple System Example Trade Data Filename LONG Trade Position Type EntryTriggerl Entry Trigger Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 74 http www compuvision com au Last updated on 26 March 2009 EntryPricel InitialStopl ExitTriggerl ExitPricel START EntryTrigger2 EntryPrice2 InitialStop2 ExitTrigger2 ExitPrice2 Final Release Version 6 4 1 N a w O Trading System 2 m w w Entry Price Initial Stop Exit Trigger Exit Price Trade Recorder Control Entry Trigger Entry Price Initial Stop Exit Trigger Exit Price Tally Tally ExtFml TradeSim RecordTrades wry LONG EntryTrigger2 EntryPrice2 InitialStop2 ExitTrigger2 ExitPrice2 CONTINUE EntryTrigger3 EntryPrice3 InitialStop3 ExitTrigger3 ExitPrice3 m A oo Trading System 3 w O Trade Data Filename Trade Position Type Entry Trigger Entry Price Initial Stop Exit Trigger Exit Price Trade Recorder Control Entry Trigger Entry Price Initial Stop Exit Trigger Exit Price Tally Tally ExtFml TradeSim RecordTrades wry Trade Data Filename SHORT Trade Position Type EntryTrigger3 Entry Trigger Entry
64. Parameters f Use system date format C dd MM yy eg 01 02 03 C dd MM yyyy feg 01 02 2003 O Mh dd yy eg 02 01 03 C MM dd yyyy feg 02 01 2003 C dd MMM yy eg 01 Feb 03 C dd MMM yyyy eg 01 Feb 2003 Sort Options Sort by entry date first then By C Default f Symbol 4 first Z last C Rank Lower rank first C Rank Higher rank first Chart Print Onentatio f Landscape C Portrait Miscellaneous Remember Screen Settings Monte Carlo Option Remember Settings Trade Ertry E sit Orderin f Last In First Out LIFO O First In First Out FIFO M Create Simulation Log W Create Scatter Charts I Save Preferences on Exit Global Parameters Miscellaneous Q Date Format This radio group allows the selection of date display format Note that changing this selection will only have an effect after a database is loaded o Use system date recommended This option follows the date format as set in the Regional Settings accessible from the Windows control panel o dd mm yy European short date format 1 e 19 7 00 o dd mm yyyy European short date format 1 e 19 7 2000 o mm dd yy US short date format 1 e 3 26 99 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 120 http Awww compuvision com au Last updated on 26 March 2009 O Final Release Version 6 4 1 mm dd yyyy US long date format 1 e 3 26 1999 Q Chart P
65. Pty Ltd All Rights Reserved Page 154 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 trade It is important to limit the traded volume otherwise a large position size in a small or mid cap stock can move the market quite considerably If volume information is not included in the trade database then this section will be grayed out o Ignore Volume Information This is the default setting and trades are taken irrespective of whether there is enough volume to fill the trade o Reject Trade if Position Size is greater than xx When this option is selected the position size for a trade is compared with a specified percentage of the traded volume and the trade is rejected if the position size exceeds this threshold o Limit position size to a maximum of xx When this option is selected the position size of a trade 1s limited to a maximum of a fraction of the traded volume for the trade in question This allows a more realistic position size to be taken that takes into account the actual traded volume For example if a trade of stock ABC requires a position size of 20 000 and only 100 000 shares have been traded then the position size will be limited to XX of 100 000 If xx 10 then the position size will be limited to 10 000 shares Note If any of the options are grayed out then this is because the trade database used does not contain volume information All trade databases generated with the latest MetaSt
66. Recommended Readings section of this manual Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 23 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Author s Comment Within the last few years the advent of the Internet has revolutionized the way traders place orders into the market place However the concept of trading has not changed since the days of the South Sea Bubble and the Dutch Tulip mania During that time some people made a lot of money whilst others lost their life savings Recently the same pattern repeated itself during the Dot com market mania just as it did nearly three hundred years ago with the South Sea Bubble The technology used to trade may have changed during this time but the human mind still possesses the same frailty it did when Sir Isaac Newton was caught in the collapse of the South Sea Bubble Just as Internet technology has brought trading onto the desktop computer a whole new breed of private traders has emerged along with all of the lack of education and understanding of the true nature of the market place One can be sure that the traders who have survived the recent Dot com market correction are those who implemented a proper trading plan and stuck with it all of the way whereas those that didn t are probably licking their wounds in disbelief of the market s behaviour For those that somehow fluked a profit without any trading plan my sug
67. Reserved Page 289 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Margins Paper Size Paper Source Layou Paper size review Letter Width 27 94 cm Height 21 59 cm Apple to hole document Default Cancel To paste into Word first position the mouse cursor in your document and either hold down the Ctrl V key selection from the keyboard or select Paste from the Edit menu Pasting into Excel If you copy and paste any parts of a text report into Excel you may notice that column formatting is lost and everything is put into one column To preserve the column formatting you need to enable Append tabs to columns in the Report Option tab of the global preferences dialog before you run a simulation Miscellaneous Chart Preferences Report Options E S Report Once this is done just select the desired cell in Excel where you want to paste the report and either hold down the Ctrl V key selection from the keyboard or select Paste from the Edit menu Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 290 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 eoo O OOOO _ _ You will note that the pasted information looks congested and confusing so you need to follow these steps to clean it up Select the whole work sheet if i
68. Stop as a Protective Money Management Stop QO Column Heat P E For the risk based position size models the Portfolio Heat value is a running total in dollars of the total risk exposure at any time a trade 1s entered or exited The Portfolio Heat follows from Ed Seykota s definition of Portfolio Heat which is a measure of the total risk of a portfolio at any given time As trades are entered the portfolio heat increases as there is more risk exposure When trades are exited the portfolio heat decreases as there is less risk exposure Note Even though the initial stop value may be present in the trade database the portfolio heat and trade risk only have relevance when a protective stop is used to exit a trade if the initial stop has been violated To enable protective stops when generating a trade database please refer to the section in the previous chapter on Using the Initial Stop as a Protective Money Management Stop If a non risk based position size model has been selected then N A will be displayed indicating that the value is not applicable to the position size model used Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 182 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Column Heat P E E m E For the risk based position size models the Portfolio Heat value is a running total of the risk exposure as a percentage of the tota
69. The key to generating the trade data from MetaStock lies in a custom external function called RecordTrades which is part of an external DLL Plug In that was installed when TradeSim was installed on your computer By incorporating this function into your indicators or explorations this external function can be used to generate a trade database for a single security or for multiple securities A flow diagram of the whole process is shown in the following diagram TradeSim dll RecordTrades External Function Indicator or Exploration Trade Database file Security Data Windows Messaging ToolBox TradeSim exe Application Security data is read into MetaStock either by loading up a chart or running an Exploration MetaStock then calls the RecordTrades external formula which writes the trade data to a trade database file which can be later read and used by TradeSim for analysis Note that this aspect of the whole process is probably the most difficult and tedious of all since MetaStock does not provide us with the most streamlined interface to the outside world However we have taken the drudgery out of creating a trade database so a bit of perseverance patience and some elbow grease will go a long way The rewards to the user being that things start getting easier after you have mastered this aspect of the whole process The TradeSim External DLL MetaStock Plug
70. Trade Entry Information aa ccccssdeose ves clear saivonacescdencteadevsersatcadeusaiduaiaaaveetlaataseunailaiecanaiasadaanelees 216 E Display Trade Exit Information aciiexistessares nee acessiaxsseiatiteants asada iesisneectapewessdindaealaniesntees 216 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 16 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 E Display Initial Stop Information ccccccccccccessscceesscceceesssececsessececeessececseseeceesseeeceeseeeeceesseeeeesaeeees 216 E Display Trade Maximum Minimum Information ccccccccesscceeessececeesseceeeeseeeceesseceessseeeeesseeeeees 216 r E Display Chart for any SyMbol cccccscecsssccesssccesscecssseccsseecesseeeesseecessecceesseceesseceeseeceeseecessseeeseecess 217 Display img ANY SECUTI ananena aE aA RE 217 Displaying Open Trade Eguity E j isssisssesseiscutscesestscsiisessncasasvenciivbeesnasssssextesssssasisentensacavass 218 Tie Opemrade ggu Line a EE AE TER AE EEEa 219 The losed trade equity Line eiirssicicininiidinsirisi anina ainiaan aaa aiaia aaa biradan aara raa a aeaiiai 220 MTS SUS E E E SL I E AE E A EE NE O A E A A E EA AA 220 Tae C hk oo lban see E EEE 220 E ZO a A E E E E E E E NAR 220 E FSM O e E E E E sal isan wlan aed steal td sea picalystobs esseattaeeouietes 220 E Zoom Alenas Rr rreT enna Tene T tT Cr rater tree pine nymMnn Teeentr tT Reon Teeter tren wena Trr
71. Trades Distribution chart along with the Losing Trades Distribution chart can give us further insight into why a trading system may not be performing very well In the case of the MACD example above we can see that Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 241 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 it has a relatively low percentage of winning trades and a high percentage of losing trades Later on in this chapter we will see how we can improve this aspect of the trading system by using a simple modification Changing the Distribution Chart display defaults Right clicking on any of the distribution charts will produce a popup menu like the one shown below Frequency Display Bars in display HL Cumulative Distribution Frequency Display You can change the distribution chart display format by selecting the Frequency Display submenu item Absolute Frequency Relative Frequency Relative Frequency 3 O Absolute Frequency This option generates a distribution chart that displays the actual number of samples Relative Frequency This option generates a distribution chart that displays each distribution chart bar as a fraction of the total population size total number of simulations ee nannn eer ee ee ees ee es O Relative Frequency This option generates a distribution chart that displays each distribu
72. a trading system The Enterprise edition of TradeSim incorporates proper statistical analysis through exhaustive testing using a Monte Carlo analysis where we aim to evaluate every possible trading route and then analyze and correlate the resulting data This is done by repeatedly simulating a trading system where each simulation uses a random selection of trades that satisfy our trading rules Because the outcome of each simulation will be different we can say that the outcome of each simulation is a random event that has a mean value and other associated statistical parameters As a result of this a statistical profile of the trading system can be generated In the end the user is presented with a tabulated and graphical representation of their trading system in terms of profit and trade statistics thus an objective evaluation of the trading system can now be achieved This trade analysis is like a footprint or signature of the trading system It gives us a multi dimensional view of our trading system Rather than display a rat s nest of equity curves overlaid on top of each other it makes more sense to do a proper statistical analysis and display the results in terms of a frequency distribution of total equity winning and losing trades as well as trade expectation if it is applicable to the position size model used Deducing a correct statistical hypothesis As stated in the introduction one of the biggest myths in trading is an inco
73. are the producers of TradeSim and have a website at http www compuvision com au Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 298 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Trader Forums Reef Capital bttp www reefcap com This is an Australian forum by run Nick Radge with a high level of content and discussion covering a broad range of issues from software to Futures trading Trader Club www traderclub com This is an American Traders forum by Chuck Le Beau It covers a broad range of topics and most of the contributors are heavily into trade system design and testing Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 299 http www compuvision com au Last updated on 26 March 2009
74. as per CMC Markets is 5 50 over night cash rate 2 0 premium 3 5 See http www cmcmarkets com au en content cfd what is a cfd jisp section overnight for more information on CFD interest rates Note No Interest will be charged for Margin Requirements of 100 Specify Daily Interest Rate This checkbox determines whether or not the interest rate for margin positions specifies a daily or annualized yearly 365 days interest rate Select Position Size Model from the trade database E 4339 This checkbox allows you to use the extended values in the trade database to dynamically select the position size on a trade by trade basis For more information see Dynamic Selection of the Position Size Model and Dynamic Position Size model data 1 The Equal Dollars Position Sizing Model In this model we allocate an equal amount of capital excluding the transaction costs to each trade This amount is determined by the Capital per Trade parameter and is specified in dollars When a trade position is taken the actual position size may be slightly less than this amount because only a whole number of shares or contracts can be purchased thus rounding off the total position size to a value which accommodates a whole number of shares or contracts If the total capital allows multiple positions to be taken then each position will be an amount that is close to the Capital per Trade and the maximum number of positions that can be taken at one tim
75. at a price which is determined by the ExitPrice array parameter of the RecordTrades function Typically the ExitPrice would be the closing price on the day the stop is breached However there may be some circumstances where your trading routine requires you to exit exactly at the InitialStop price on the day the InitialStop was breached and not wait for end of the day or the next day to exit the trade See the flowcharts above for the exact operation Example The following example sets up the RecordTrades function to exit a trade at the InitialStop price on the same day the InitialStop is breached ExtFml TradeSim Initialize ExtFm1 TradeSim EnableProtectiveStop 0 ExtFml1 TradeSim SetExitPriceToInitialStop SetStopGapPrice ToOpen ExtFml TradeSim SetStopGapPriceToOpen The SetStopGapPriceToOpen function is obsolete and no longer has any effect Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 95 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 UseClosingPriceAsStop Threshold ExtFml1 TradeSim UseClosingPriceAsStopThreshold Calling this function changes the way the price is compared to the InitialStop value when protective stops have been enabled using the EnableProtectiveStops function If this function is called and protective stops have been enabled using the EnableProtectiveStops function then for a trade on the long
76. by moving the Trade Inspector over the left or right hand docking sites and releasing the mouse button when the drag outline has locked into position To undock the Trade Inspector so that is floating just drag the thin title bar at the top of the trade inspector whilst pressing the left mouse button and move the outline away from the docking point and release the mouse button so that the Trade Inspector window is now floating Alternatively you can dock the Trade Inspector at the alternate docking site by undocking it and docking it at the alternate docking site Lefthand Docking Site Thin Title Bar Righthand Docking Site kK x E 4 a0 eed 0 Bhi Exit Long 12708 1997 0 147 2 3289 2 9350 2 9350 0 0000 Enpa Alt m ao Bo pan Mormal Exit 50 000 00 50 000 00 44 990 91 HA HA HA HA 1568 Paypi Y Date 12 08 1997 Equity Pi 45 986 797 Symbol Bry A Trade Log Index 80 2 Q Open Trade Inspector E When clicked down displays the open trade inspector The Open Trade Inspector shows all currently open trades at the chart focus point A blue rectangular border surrounding the trade indicates an actual trade entry condition at the chart focus point whilst a red rectangular border surrounding the trade indicates an actual trade exit condition at the chart focus point You can also enable the Trade Inspector at the same time as the Open Trade Inspector to give yo
77. car batteries we might conduct an experiment and gather data relating to the lifetime of a population of say 40 similar car batteries The table shown below shows the results of such an experiment where each entry in the table represents the lifetime of each of the 40 car batteries to the nearest tenth of a year The batteries were guaranteed to last 3 years Car battery life years We must first decide on the number of classes into which the data are to be grouped This is done arbitrarily although we are guided by the amount of data available Usually we would choose between 5 and 20 class intervals depending on the amount of data available The smaller the amount of data available the smaller is our choice for the number of classes For the data in the above table we will choose 7 class intervals The class width must be large enough so that 7 class intervals accommodate all of the data To determine the approximate class width we divide the difference between the largest and the smallest measurements by the number of intervals For the above example the class width would be no less than 4 7 1 6 7 0 443 In practice it is desirable to choose equal data widths having the same number of significant places as the given data For this example we shall choose a width of 0 5 If we begin the lowest interval at 1 5 the second class would begin at 2 0 and so forth We can now tabulate the data in terms of frequency of occurrence the results of which ar
78. chance of being successful with trading you need to start with a reasonable amount of trade capital and select a trading system that uses good position sizing strategies Summary We started this chapter by introducing the concept of trading a system using a portfolio of securities as a random process This led to the need to use statistical analysis in order to evaluate a trading system We introduced the concept of Monte Carlo analysis as a brute force way of exhaustively testing and analysing a trading system in order to show up any strengths or weaknesses that it may have We then analysed a number of trading systems and showed simple ways of making dramatic improvements to system performance using the simple notion of contrarian opinion By exhaustively testing and simulating a trading system using the Monte Carlo analyser you can show up any strengths or weaknesses in a trading system that would otherwise be missed if you only ran single simulations The results from the Monte Carlo analysis show up severe limitations in system testers that can only test a single security at a time The main disadvantage of these types of system testers is that they miss out on providing a lot of valuable information that is necessary in order to make an objective judgment of a system s worth In the last case study we examined the effect of using a small amount of initial capital on the two trading system examples and found that a smaller starting capital couple
79. chart legend below the chart W Trade Entry Price Y Trade Exit Price ff Trade Initial Stop InitialStop Array EnitryPrice Array ExitPrice Array o Entry Price for each trade as written to the trade database file and displayed as a blue cross overlaid on the price chart o Exit Price for each trade as written to the trade database file and displayed as a red cross overlaid on the price chart o Initial Stop Price for each trade as written to the trade database file and displayed as a yellow cross overlaid on the price chart A yellow dashed horizontal line spans from the stop point to the trade exit point thus clearly indicating the Initial stop level o _InitialStop array as passed to the RecordTrades function EntryPrice array as passed to the RecordTrades function o ExitPrice array as passed to the RecordTrades function O o Raw EntryTrigger Data as passed to the RecordTrades function Displayed as a series of narrow blue spikes on a separate axis Each spike represents a value in the EntryTrigger array passed to the RecordTrades function o Raw ExitTrigger Data as passed to the RecordTrades function Displayed as a series of narrow red spikes on a separate axis Each spike represents a value in the ExitTrigger array passed to the RecordTrades function o Volume Data Displayed as a separate axis on the bottom of the signal chart When the chart cursor thin vertical dotted green line hovers over any
80. compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Setting up a MetaStock Exploration with the RecordTrades function We are now in a position to set up up a MetaStock Exploration to generate a multiple security trade database If you are not familiar with running a MetaStock Exploration then we suggest that you consult the user manual that came with your MetaStock software for more information on how to use the MetaStock Explorer Using our MACD crossover example the MetaStock code for the exploration can be written as shown below EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE InitialStop 0 optional initial stop ExtFml TradeSim RecordTrades ExitPrice Exit Price MACD Long example Trade Data Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger START Trade Recorder Control Bring up the Explorer editor and add the code above into Column A Note No other Columns or the Filter are used in the exploration The resulting Exploration Editor window should look similar to the one below Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 77 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1
81. currently open trades Highlights all currently open trades To activate this feature right click on the trade of interest and select Highlight all currently open trades from the popup menu All currently open trades that overlap the selected trade will be marked using rectangular markers A blue rectangular border surrounding the trade indicates a trade entry condition whilst a red rectangular border surrounding the trade indicates a trade exit condition Note that all trade entries will always match their trade exit and vice versa however some marked open trades may not be visible unless the Trade Log is scrolled down or up The marked trades are not permanently sticky which means that the open trade markers will be reset as soon as you click on the Trade Log lili Trade Log Ioj x in Trade 0 Symbol Status Pos TransDate Level Days InitialStop Price a Long ELENE Plot Open Trade Equity Chart Click here to see more information Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 186 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Display Trade on Chart Click here to see more information Exporting the Trade Log P E It is possible to export the data from the Trade Log in a variety of formats which include e Hypertext Markup Language html and htm format e Comma Separated Values file long dates csv Note In this
82. dataneddlde won nan tained lane eaenncdeeansiousand 89 O Pro t Stops on the Short StS assdspaicccasenascnaawantesdnsswshatypisucieiepuwtisdoudwandaee spac saan NAAN aa shes van ON rE EAN anA 90 SetProfitStopInactivity Delay cccccceesssssesseseseesseeeeeeeeeeeessseseesssessessssssssssssssssesseesssesssessessaesagaaaas 90 DG te SIP TICe OP LOM ODore E E E E 90 GV Ar Ge Os OOS eee E EEO TE EE 91 2 RRS gt lt 0115 een ee Ne E Ree MPC er Pon ote er E E EPA ere Pe een ee nr Ceara 91 A E anp eeen 91 m RE E aa E A EET ENE A A E EA E OA EEE A E N E 91 Initial Stop Control FunttHoriS cccscctesccntescccscccccatecdecescacecacstccdacesccsacsiatentedaatacestesdacanedscscesteedecesccccaneat 93 LE Protective Stops on the Long Side sssessisieaicccsssesesssaavvevsssiorsnyisassoraseen saspereres htossetiakeccataaenaseveacasaannanaariaes 93 LE Protective Stops on The Short Side visctiesiaseeccssuvessesenes elecvswansvoaacmasia i AEEA A AEA ANA ia 94 Enable Prolcthive SOD noran aniaui A EEA E EERE EEEE A E E EERE 95 DisableProtecti ve StoP anra IEE SEERNE EE EEEREN EAAS ENEE aN EEEE E 95 FR e E np seen E E A EE A AE E 95 PELE XIVP MCSD OMIA Siop pacii EE E 95 Si E lt a 2 AE AAE EAA N E ESA E AA A NENT EN AITE NE E A A EA 95 SeS apre ToP i asee scemnctusceuecebeoumtenctamecte coun J5 Use losie PriceAsstop Threshold rerai EE i 96 WIS ANOS NOS UN SCO CLA sirenerne eE EEEN AEEA Gomemeaneecbecdecneancementecueuentae 96 Trade Pyrami
83. double click the left mouse button on the relevant entry in the rejected trades window and the trade database manager window will be brought to the foreground with the relevant trade entry highlighted Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 188 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The Charts Window The Charts Window contains a number of charts that are plotted after the completion of a single trade simulation Each chart can be viewed by clicking on the appropriate tab Some charts may not be included depending on which Position Size model is chosen For example the R multiple or Reward Risk chart will not be present if a non risk based position size model is used Chart Tabs Reset Zoom apital in Trades Reward Fisk ratio Forttolio Heat Portola Heat 14 winning Trade Losing Trades 3 Equity Monthly Protit Monthly Return Yearly Profit Yearly Return Rel Drawdown Underwater Equity Lefthand Docking Site Righthand Docking Site Zoom In Zoom Out aS Cursor Mode Enable Disable Auto Tags Enable Disable Auto Markers Chart Focus Enable Disable Chart Grid Enable Disable 3D Bottom Axis Label ____ Mode 13 2 EJN re ca Bottom Axis Label Orientation Decrease line thickness Increase line thickness Enable disable Trade Inspector
84. een ene ee EEE 166 ES ein 0 a Dalee cerier E E EE E EEE ES E EEE EE E E E 166 Q Simulation AN a ae steer ete cect tes ges heats tee peed ESPEP E PEPEE ase nete ance secoasas ee er eens 166 LY Simulation Duration wo ccc ccccsssssscscccceccececsessssssssceccseseccessesesssssssseseseseeseesesssssssaessesessesesesssssseaeseeseseesees 166 TAGS UMMM AE Vrs esc EEIE E AE N AAEE A EAE AA A AEE E A 166 ED APIS SE BY D0 GIG E E E E E EE E 166 a Eae oy Da aAA N E ATA A A AEA AAAS 166 n D EET a ELA E D ET ease cero des cs ten Sarena thee cesses manera cae ta cobcaseasceasanecedien coon ascatedeeanesiauauentuenrous 166 AE Bi A 166 a Steed Wee tel iiy DiE eee ec E ner ee eee eee ee ere 167 L Last Trade Exit Date cccssssssssssccccccessssesssssssorcccccscesecsescssscceesesscssscsesessssscsseccssececscesesssssscesessccsessessess 167 EP LT re WD ea ehh serais ssc hss scence es cc a ae dao eases aes aaa iaee es 167 PEO TG Min tially oe 2asccesccne cease cacenasccnceceec EESE 167 Q Profit StatUS sacaessecssseccceecince Senasascsteedec uae asciasgancbemraGanociasoucmeutagnostuauabeeseeaioseesaisdeusagaoomacacdbeniediocuaatennentenesiusciaas 167 be E e E sures rae oiso tte sscou A A evuans tosuoeni cue E E E 167 EI eS C apal seansa A ENEA A ator a seen ed wees 167 G Mirm Guy IUE fions anan e EO T A EN AA AAE 167 ED Miom Edin DiE oerein a AT AE RRE ARETAN ORATORA 167 tA ISG AO A ge stesetsce tn siosnntos rote occu etleeaea detec taste ncaa d
85. for each value of the optimisation variable of interest and then use TradeSim to analyses the resulting trade data For example you could generate multiple trade databases for the MACD trading system by stepping the MACD period from 4 to 30 and then use TradeSim to analyse each database to see which stepping yields the best performance Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 274 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Selecting your securities In all of the examples used in this manual we have generated trading data using securities from the top 200 stocks on the Australian Stock Exchange ASX The main reason for doing this is simply liquidity which gives more validity to the trading data than if we were using the whole 1500 stocks from the ASX which includes many low liquidity small cap stocks The choice of securities is of course entirely up to the individual and their style of trading but the main reason for using liquid stocks is to avoid any erratic trading behaviour caused by illiquid stocks The Black Box Challenge In the Introductory chapter we talked about black box trading systems and why they were appealing to the uninitiated Even without a proven trading track record people are still prepared to hand out thousands of dollars of their hard earned money in return for something that presumedly allows them to make much more money with very li
86. function would be inserted in the filter section of an exploration as in the following example More Information can be found from the section on Generating a Security List the Easy Way Note It is recommended that this function should only be used by itself in an exploration to create a security list It should not be used as part of a trade database exploration Example This following example can be used in the Filter section of the Explorer to filter out securities with 4 or more characters in the symbol name ExtFm1 TradeSim GetSymbolLength lt 3 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 98 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 SetCurrencyMultiplier ExtFml1 TradeSim SetCurrencyMultiplier MULTIPLIER This function is used to multiply all currency values by a constant value before they are written out to the trade database The multiplier parameter determines the amount by which the currency values are scaled Only positive MULTIPLIER values are accepted The default value for the multiplier is 1 0 which is also the value that is set when the Initialize function 1s called Example The following example is used to multiply all currency values by 0 01 same as dividing by 100 ExtFm1 TradeSim SetCurrencyMultiplier 0 01 SetVolumelnfoType ExtFml TradeSim SetVolumeInfoType VOLUME TYPE By def
87. hard to produce a trading system that is historically speaking unconditionally profitable and has a high winning number of trades in the vicinity of 70 However without using TradeSim Enterprise Edition it would be virtually impossible to measure this performance Not all Monte Carlo analyzers provide useful results Wie The TradeSim Monte Carlo analysis is unique in that it provides a true portfolio Monte Carlo analysis rather than a Monte Carlo analysis based on time series shuffling or synthesis of trades using random generators and price distributions When thousands of simulations are run in a TradeSim Monte Carlo analysis each simulation represents a real world portfolio trading scenario which uses real trades that occurred from the historical trade databases Unlike other software TradeSim does not synthesize trades by time series shuffling or price synthesis using questionable price distributions Looked at it another way when TradeSim runs a 10 000 run Monte Carlo simulation on the top 200 stocks it is like having 10 000 traders trading from the same portfolio or universe of securities and using the same trading rules If there are a large number of trades with the same entry dates then you would expect each trader to come up with a different result as each trader would not choose exactly the same trades even though they are obeying the same set of trading rules Because of this capability we believe our Monte Carlo analysis is unique and
88. in Typically a trading system will consist of entry and exit triggers and prices as well as an optional initial stop loss parameter These five parameters basically define a framework for a trading system The function used to record the trade data is contained in an external DLL function called TRADESIM DLL and is Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 46 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 stored in the MetaStock external function directory after it has been installed The syntax of the RecordTrades function is shown below ExtFml TradeSim RecordTrades 1 Name of external function TRADE FILENAME 2 Trade Data Filename TRADE POSITION 3 Trade Position Type EntryTrigger 4 Entry Trigger EntryPrice 5 Entry Price InitialStop 6 Initial Stop ExitTrigger 7 Exit Trigger ExitPrice 8 Exit Price START 9 Trade Recorder Control Note that because we are calling an external formula we need to use the ExtFml function that is part of the MetaStock indicator language for Version 7 and above If you are using an earlier version of MetaStock before Version 7 then you will need to contact Equis or the vendor you purchased the software from in order to upgrade to a later version A detailed description of the parameters for the RecordTrades external function is given in the table below Para
89. indicates that this option is enabled U Rejected Trades Clicking on this menu item has the same effect as clicking on the Enable Disable Rejected Trades button on the main toolbar A checked item indicates that this option is enabled O Preferences Clicking on this menu item brings up a Preferences dialogue box which contains settings for the global preferences These preferences are saved automatically when exiting from TradeSim Window Menu The Window menu controls the way that windows are displayed Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 117 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Cascade fe Tile Horizontally Cf Tile vertically Arrange Minimize All Size 1 Message Log 2 Trade Database 3 Trade Parameters 4 Charts 5 Trade Log w 6 Trade Simulation Report O Cascade Cascade windows O Tile Horizontally Tile Windows Horizontally across the screen O Tile Vertically Tile Windows Vertically across the screen Arrange Arrange Windows O Minimize All Minimize all Windows Size This submenu allows the main window to be reset to a default size This helps when capturing screen shots of a fixed size to incorporate into your documentation 640 x 450 Pelle alz a00 x 600 There are three default sizes o 640x480 This resizes the main window to a default size of 640x480 pixels o 720x512 This resizes the main wind
90. initial stop to behave as a protective stop that is only active after the third bar of the trade ExtFml TradeSim Initialize Initialize internal variables ExtFm1 TradeSim EnableProtectiveStop 3 ExtFml TradeSim RecordTrades Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 73 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 MACD Long example Trade Data Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Volatility Trailing Stops Volatility trailing stops are useful in developing trading systems that adhere to strict money management and position sizing guidelines The main benefits of a trailing stop is that it moves in favour of the trade whilst minimising risk and maximising profits A detailed discussion of this type of stop can be found in Appendix C Generating Multiple System Trade Data Note Prior to TradeSim Version 5 3 0 plugin some users were experiencing problems when running multiple system trade database exploration Previously if an unrecoverable error occurred in a call to the RecordTrades function this would stop Metastock running any proceeding code including further calls to additional RecordTrades functions If there were price errors or anything
91. left Looking at the results from the Monte Carlo simulation is there any way we can improve its performance One obvious way of improving its performance would be to improve the percentage of winning trades With an average winning trade percentage of 29 86 and an average losing trade percentage of 67 45 the most obvious way of improving the winning trades percentage would be to swap the entry and exit triggers in the original MACD Crossover trading system In the next section we will see the effects of such modifications and their effects on the trading system performance Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 248 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Case Study Reversed MACD Crossover Trading System To swap the entry and exit triggers in the original MACD Crossover trading system we can rewrite the exploration indicators as follows EntryTrigger EntryPrice ExitTrigger ExitPrice CLOSE CLOSE Cross Mov MACD 9 E MACD Cross MACD Mov MACD 9 E After loading the trade data for the Reversed MACD Crossover example we shall do a Monte Carlo analysis using the following parameters Trade Parameter M Initial Stop Used NO Position Size Model Equal Dollars Units Pyramid Profits NOU Initial Trade Capital 50000 Portfolio Limit 100 0 Transaction Cost Capital per Trade OO
92. may play a part A thorough in depth analysis of optimisation theory and techniques 1s way beyond the scope of this document however Katz and McCormick provide a thorough in depth explanation The most important issue that needs to be kept in mind when optimising a trading system 1s to avoid over optimisation or curve fitting because trading systems based on over optimisation usually perform poorly when they are actually traded Using TradeSim to back test or simulate an optimised trading system will most likely alert you to discrepancies between theoretical performance and actual performance because TradeSim can back test a trading system over a portfolio of securities whereas most optimisers only optimise over one security Because TradeSim is primarily a trading simulator and back tester on its own it does not have any inbuilt support for trade system optimisation This is left to other packages such as MetaStock However using TradeSim to simulate your optimised trading system opens up a whole lot of new issues Firstly simulating a pre optimised trading system using TradeSim may not produce the spectacular results produced by the MetaStock optimiser and back tester This is primarily because simulating a trading system with a portfolio of securities usually produces completely different results than simulating it with one security alone The best way to optimise a trading system using TradeSim is to use MetaStock to manually generate trade databases
93. means exhaustive 14 Jeffery Owen Katz Ph d amp Donna L Mc Cormack The Encyclopedia of Trading Strategies 15 Ronald E Walpole and Raymond H Meyers Probability and Statistics for Engineers and Scientists second edition Collier Macmillan International Editions Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 297 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 16 Morris Hamburg and Peg Young Statistical Analysis For Decision Making 6th edition The Dryden Press 17 Martin Pring Breaking the Blackbox Wrightbooks 18 Dr Alexander Elder Trading for a Living John Wiley amp Sons 19 Steven B Achelis Technical Analysis From A to Z McGraw Hill 20 John J Murphy Technical Analysis of the Financial Markets New Y ork Institute of Finance 21 G S Rehill amp R McAuliffe Reasoning and Data MacMillan Education Australia 22 Perry J Kaufmann Trading Systems and Methods John Wiley and Sons 23 Ed Seykota and Dave Druz Determining Optimal Risk V 11 3 122 124 Technical Analysis of Stocks and Commodities published by Technical Analysis Inc 24 Robert P Rotella The Elements of Successful Trading New Y ork Institute of Finance 25 Catherine Davey Making Money from CFD trading Wright Books Magazines and Journals These are some of the few trading magazines or journals that I would recommend There are probably other magazines av
94. ncaduss taste A EE 135 a Colomo Trade hy cl coeeenemere reer ee ener Eee ne rena N N et erence eer 135 Q Column Point Value Commodities only sicsadcsisescsastsisasssapspusdaddvesdaedsyadsaddecetceryuntedaabonotentvesdiasavientsenavennateads 135 Q Column Initial Margin Commodities Only ccccccccsscccssscccsssecesseceesseceesseceesseceesseceesseceeseeceeseecetseeeesaeeens 135 AT Column Transaction Cost soos iictaand ouswesntihcactscencn cust eena A Ea aaa eaii aaa EAA a a iaaa aandaa 136 A Column Marein RB NI a cdiscaca caress cede tenensavcsn enone sGesoans diciosu dean cms RN ASTANE EAR NTAAS 136 G Column TASS SE sessa T eE E aN AAAA ETATE 136 O Column Date SPI a o ccccsccssesscsccstsessscssaccnscssssesssasetncocenveseedensesstsvnveesveutsusacsvveveeddgudeondvausnuvsuntvanscveavonusdneys 136 RR Sie ena tava LOWE reer ert penne pene E E wer eentrene einer tree tnt 136 O Colum Date 938 ccccsccssccesaeisvdiescas lt aaessacinses iiss snsadotatoesuigusaudoabesealacbsseisaatstetesadaesseaaaaasninceteasseueees 136 Dynamic Position Size model columns 930 ooo ccc ccs ceccescesccescssessssssesessseesesseeeeenss 136 U Columa PS Mode eeeeeneneneeeneeee neue crereeret er tome erae a a anni ttre idsi 136 G Column SECT crne eE E EEES E TENE AEE a Eare 136 GI Column Portion 0 enairar a AA AAA NA KEANE 136 d Colom Mar Tridon eeri aE A NGA EN E AAGE EEA EE 136 E RTT E a E E E E E EE 136 POr E S e E E E E E E AES 136 Enabling and
95. not affect the outcome of a simulation but rather it determines how the statistics for a trade simulation are generated Breakeven trades are those trades where there has been no net gain or loss during the course of a trade E Process Separately When selected this option tells the simulator to keep the breakeven trades separate from both the winning and losing trades Include with winning trades When selected this option tells the simulator to include the breakeven trades with the winning trades Include with losing Trade When selected this option tells the simulator to include the breakeven trades with the losing trades Trade Positions This radio selection group determines how trades are processed during a simulation based on the trade position for each trade Note that a similar filtering process can be achieved in the database manager However this method offers a much quicker way of filtering out trades based on the trade position type E m Process all trades This option tells the simulator to process all trades whether long or short positions Process long trades only When selected this option tells the simulator to process trades which are on the long side only Process short trades only When selected this option tells the simulator to process trades which are on the short side only Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 152 http www compuvision com au Last updat
96. number of losing simulations 48 40 16 6 110 Probability of loss Total number of losing simulations Total number of simulations 110 200 0 55 or 55 This is exactly the same as the figure that is reported in the Summary Statistics report An easier way to calculate the probability of a loss once the probability of a profit is known is to subtract the probability of profit from 1 1 e Probability of loss 1 Probability of Profit 1 0 45 0 55 55 What are we looking for Ideally we would like to develop a system that is 100 profitable This means that we would be confident in trading with a profitable system Although there is no guarantee of future performance we can only really talk in terms of the most likely outcome rather than the absolute outcome In terms of the Profit Distribution chart we are looking for a distribution that lies exclusively on the right side of the 0 mark with all green colored bars In the MACD example above we can see that there are more outcomes for simulations which lie on the left side of the zero mark than there are on the right side This is also reflected in the larger probability of loss figure compared with the probability of a profit What this ultimately tells us is that if we trade this system we may end up with a net profit or net loss with the bias toward a net loss since we have a larger probability of loss Even worse 1s the fact that we have not even taken into account t
97. o ASX 200 Earliest Entry Date 6 Dec 1996 Latest Entry Date 9 March 2001 Position Size Model Equal Dollars Units Pyramid Profits Initial Trade Capital 5000 Capital per Trade 1000 Portfolio Limit 100 Transaction Cost Position Size Limit 100 Simulation Type Monte Carlo Analysis Number of Simulations Monte Carlo Report MACD Crossover Reversed Simulation Summary Simulation Date Simulation Time Simulation Duration Trade Parameters Initial Capital Portfolio Limit Position Size Model Trade Size value Pyramid profits Transaction cost Trade Entry Transaction cost Trade Exit Trade Preferences Trading Instrument Break Even Trades Trade Position Type Entry Order Type Exit Order Type 27 06 2001 1 00 32 PM 17 25 seconds 5 000 00 100 00 Equal Dollar Units 1 000 00 No 20 00 20 00 Stocks Process separately Process all trades Default Order Default Order Minimum Trade Size 0 00 Accept Partial Trades No Volume Filter Ignore Volume Information Simulation Stats Number of trade simulations 200 Trades processed per simulation 6773 Maximum Number of Trades Executed 331 Average Number of Trades Executed 171 Minimum Number of Trades Executed 114 Standard Deviation 31 26 Profit Stats Maximum Profit Average Profit Minimum Profit Probability of Profit Probability of Loss 2 005 38 40 11 3 964 56 79 29 4 645 28 92 91 0 00
98. of hard knocks Every trader will have his or her own stories and a whole book could be devoted to such a topic e Ifyou have developed a trading plan and start changing the plan midway because you are experiencing a string of losses then you are not emotionally prepared for the roller coaster ride that trading can bring Stay out of the market until you get this part of your psychology sorted out Drawdowns are a natural part of any trading strategy e Bea black sheep and don t follow the herd This statement is a corollary to the fact that the majority consensus of all of the market participants are wrong and if you follow the majority you will most likely be wrong as well How many people bought stock during the roaring bull market of the recent dot com mania and are still holding onto these securities at a much reduced equity because they had followed the herd and bought in when the smart players were selling If you need more evidence of this the previous chapter on using TradeSim Enterprise Edition provides plenty of quantitative proof of this fact Referring back to the example of the simple MACD crossover trading system and look at how we dramatically improved its performance just by reversing the entry and exit conditions That is we changed the system so that we were selling when everyone else was buying which is contrary to what most literature and common beliefs espouse In actual fact in the majority of cases where a trading system has a p
99. of these options falls below a minimum threshold then the minimum threshold is used for the transaction cost Trade Pyramiding Enabled Disabled A different set of options is displayed in the preferences tab when pyramid trades are enable or disabled Please refer to the AN 3 application note on pyramid trading for more information regarding these settings Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 153 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Position Size Rules The position size rules are used to control the position size and value of each trade Position Size Aule Minimum Trade Size the higher of 0 00 OR 0 00 OR limit the masimum position size to lo Accept partial trades if inadequate capital Volume Filter i gnore volume Information Reject trade if Position Size is greater than fi 00 00 of the Maximum Traded Volume Limit position size to a maximum of fi 0004 of the Maximum Traded Yolume Round Lot Size to i O Minimum Trade Size This parameter specifies the minimum possible trade size before a trade is taken If the position value for a trade is less than this value then the trade is automatically rejected This allows the simulator to take into account the minimum share parcel size in accordance with the rules specified by your exchange For example the minimum parcel size is 500 dollars for the purchas
100. on the next day matches or betters the previous day s entry trigger price We can modify the above example and rewrite a NewEntryTrigger formula as follows NewEntryTrigger REF EntryTrigger 1 AND OPEN lt REF EntryPrice 1 Note that the Entry trigger is now qualified with the opening price so that the trade is not taken unless the opening price is less than or equal to the previous day s closing price This will have the effect of reducing the total number of trades however it is a means of more accurately modelling your entry conditions and thus producing a more accurate trade simulation Order Type and Slippage TradeSim includes the ability to model slippage through order control Four types of orders are available with each type affecting the amount of slippage generated during ordering These can be selected from the Option tab of the Trade Parameters Window See the next chapter on TradeSim for more details Adding an Initial Stop The previous examples that we have used did not use an initial stop and this parameter was set to zero This is fine as long as we do not wish to do trade simulations that use position size models that depend on the initial stop in order to calculate the position size for each trade Just like the entry and exit conditions there are an infinite number of possible initial stop formulas that could be used A description of all of the popular stops is beyond the scope of this manual some examples inc
101. parameters as in this function Note If the symbol specified represents the same data as the underlying data then the function does not attempt to re access the data from the security file but returns a copy of the underlying data specified according to the Data Array parameter Directory Path Used to specify the path that contains D Shares Au AS X C the Metastock Master files D Shares Au ASX X Symbol Used to specify the symbol name of the XAO security ANZ Data Array Used to specify which data is returned from this function O Open Price Data H High Price Data L Low Price Data C Closing Price Data V Volume Data Example The following example returns the closing price data for the Security with symbol CBA Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 103 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ExtFml TradeSim Security D Shares Au ASX C CBA C UseSecurityName ExtFml1 TradeSim UseSecurityName This function is used to replace the Symbol name with the Security name As for symbols the trade database only allocates fourteen character places so that names longer than fourteen characters will automatically be truncated It is possible that using the security name may inadvertently create trade aliases or duplicates For example News Corporation have many different issues availab
102. parameters of which we are only concerned with four of them in this example To use this indicator in MetaStock make a new indicator using the Indicator Builder in MetaStock and call it TradeSim Examplel Cut and paste the above example into the new indicator If you are unfamiliar with doing this refer to the user manual that came with your MetaStock software Now load up a chart with at least 300 bars worth of data Shown below is the chart of BHP with the Equis MACD Expert overlayed on top of it just so we can see the trade signals Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 62 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 MetaStock for Windows TradeView Examplel mwc BROKEN HILL 19 0200 0 5200 Daily BEE B Eile Edit View Insert Format Tools Window Help 2 x c Ce el SQ t BB Oo e A tradeViewExamplel H A fa B Bh A tins nara a ta m BROKEN HILL ojx m 22 5 22 5 me 22 0 22 0 mm 21 5 n 21 5 a 21 0 T Fe cD 21 0 Hy 20 5 ii rile 20 5 h MACD yo N ak i iia 3 i jhe h aa H i iM i i Mo i i peli i 19 0 i i Wy y ida xf 19 0 g 185 a i a 7 ie It 18 5 18 0 i i h Ny Signal uy on 18 0 175 h i f bis i W at 1 ial uy signa oe 17 0 17 0 16 5 i fats 16 5 16 0 i 16 0 15 5 ie 135 15 0 Buy Signal 15 0 ANNANN ENAA ANAS SSN AINAN NAAN
103. problem accessing the update information from the web then a message box will appear indicating the problem Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 123 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Security Information E 44805006E The Enterprise Edition allows you to display trade data on a bar chart for the associated security as well as generate open and closed trade equity plots on a bar by bar basis To do this requires access to the security data Note TradeSim only supports security data in MetaStock data format TradeSim provides a simple method of accessing security data by only requiring the top level security directory upon which TradeSim will search out all of the MetaStock master index files E Selecting the top level security directories From the global preferences click on the Security Information tab Global Parameters Update Manager Securty Information Host Application Settings MOTE Security data files are only used to display secunty and trade data on a chart and if you are using the Enterprise Edition you can also plot Open Trade Equity after a simulation is run Data files are not needed or used in any simulations To specity security files you only need specify the top level director and all tiles below ard Including this director will be scanned for any Metastock master database files Refresh
104. regarding what is the actual truth is usually not so obvious Typically you often hear the following comment that goes something like this Tve been trading this system for one year now and I am ahead I can honestly say that this is a profitable trading system Yes you may have traded this system and it may have been profitable for you but one year is hardly enough time to draw any conclusions Even worse is the fact that someone else could have traded the same system for exactly the same amount of time and just by selecting a different set of securities the result may have yielded a net loss after the same period of time What conclusion can you possibly draw from these two experiments Absolutely none yet some traders will draw conclusions about their trading system from only trading it one time with only twenty or so active trades The hypothesis of trading a system once and concluding that it is a profitable system is a fallacy without some sort of in depth quantitative analysis to back up the hypothesis that the trading system is a historically profitable one To prove a point we took the following trading system based on a 9 day MACD crossover and simulated it over 5 years using a portfolio containing the ASX top 200 stocks EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE InitialStop 0 no initial stop used We used the Equ
105. rejected during a simulation Winning Trades Total number of winning trades specified as an actual count and as a percentage of the Trades Taken Losing Trades Total number of losing trades specified as an actual count and as a percentage of the Trades Taken Breakeven Trades Total Number of breakeven trades specified as an actual count and as a percentage of the Trades Taken Winning Losing Trade Stats E Q Largest Winning Trade Date The largest winning trade in dollars and date of occurrence Largest Losing Trade Date The largest losing trade in dollars and date of occurrence Average Winning Trade The average winning trade in dollars Average Losing Trade The average losing trade in dollars Average Win Average Loss The ratio of the average winning trade value to the average losing trade value Trade Duration Statistics E Average Days In All Trades The average number of days spent in a trade for all trades There is no distinction between trading and non trading days Average Days In Winning Trades The average number of days spent in a winning trade There is no distinction between trading and non trading days Average Days In Losing Trades The average number of days spent in a losing trade There is no distinction between trading and non trading days Consecutive Trade Statistics E E Maximum Consecutive Winning Trades The maximum number of consecutive winning trades before a losing tr
106. running If there is a newer version available then additional message boxes will appear prompting the user to download the newer version from the web If there is a problem accessing the update information from the web then a message box will appear indicating the problem O Automatically Check for Final Release Updates from the Web With this checkbox ticked the availability of a new version of TradeSim is checked from the web every time TradeSim is run However to avoid repeated checking of updates from the web every time TradeSim is run the current date is compared to the date the program was last run and only if there is a difference will a check will be made If there is a problem accessing the update information from the web then a message box will appear indicating the problem Automatically Check for Pre release Beta Updates from the Web With this checkbox ticked the availability of a new beta pre release version of TradeSim is checked from the web every time TradeSim is run However to avoid repeated checking of updates from the web every time TradeSim is run the current date is compared to the date the program was last run and only if there is a difference will a check will be made If there is a problem accessing the update information from the web then a message box will appear indicating the problem UY Check for Update Now When this button is clicked the availability of a new version of TradeSim is checked from the web If there is a
107. samples in the population that produce an outcome that lies in a specific range of net profit For example out of the 200 simulations in the example only 31 produced a profit between 0 and 13 86 Similarly only one simulation produced a profit between 83 16 and 97 02 whilst 48 simulations produced profits that ranged between 13 86 and 0 Like any frequency distribution chart for any random process the area under the curve is a representation of the probability of obtaining an outcome that falls within that region For example if we wanted to work out the probability of the system generating a profit then we would add up all of the samples that produced positive net profit results the green part of the distribution chart In this example we have Total number of profitable simulations 31421 19 114 5 2 1 90 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 239 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Probability of a profit Total number of profitable simulations Total number of simulations 90 200 0 45 or 45 This is the exact figure that is reported in the Summary Statistics report Likewise for the simulations with a net loss the probability can be calculated in a similar way to the profits by adding up the total number of simulations that produced a loss the red part of the distribution chart So repeating the exercise we have Total
108. saved to the Export directory which is inside the TradeSim Data directory 1 e c tradesimdata exports Depending on which mode you are running TradeSim will determine which reports and charts are available Not everything can be included in the report Currently any text report and chart can be included in the composite report Tables such as those included in the Trade Statistics Trade Log Trade Database Simulation Log cannot be included in the report and have to be printed or exported independently This is because the table is usually much bigger than its screen container so it is better to export these individually by right clicking on them Invoking the Composite Report Generator To invoke the composite report generator you need to first need to load a trade database and either run a simulation or Monte Carlo analysis Once you have done this you access the composite report generator form the Tools menu as illustrated by the following screen grab File Tools Window Help Start Simulation amp Display Trade Log Display Rejected Trades E a Generate Composite Report he Plot Open Equity Chart Display Trade on Ghart j dh Preferences g mtl Tade sss Sumbe P o 1i 0 SN After doing this you will be greeted with the Composite Report Generator manager screen The Report Manager consists of two windows and a main toolbar The left window contains a tree view and faci
109. side a protective stop is generated when the closing price of the days trade is less or equal to the initial stop value Similarly for trades on the short side a protective stop is generated when the closing price of the days trade is greater or equal to the initial stop value See the flowcharts above for the exact operation Note If a stop has been breached then the trade will always exit at the opening price on the next bar if UseClosingPriceAsStopThreshold has been called See the flowcharts above for the exact operation DisableClosingStopDelay ExtFml1 TradeSim DisableClosingStopDelay This function is used in conjunction with UseClosingPriceAsStopThreshold to disable the one bar delay so that when the closing price breaches the InitialStop level the trade exits on the current bar at the closing price instead of exiting on the next bar at the opening price Note In reality the closing price is not technically known until the market closes in which case it is not possible to close the trade until the next opening However some traders may wish to participate in the last minutes trading where it is possible to roughly guess the closing price and hence exit the trade before the market closes Trade Pyramid Functions Enable TradePyramiding ExtFml TradeSim EnableTradePyramiding TRIGGER TYPE PROFIT THRESHOLD MAXIMUM PYRAMID DEPTH For more information on Pyramid Trades and Pyramid Trading Strategies see the relevant
110. size may be slightly less than this amount because only an integer number of shares or contracts can be purchased thus rounding off the total position size to a value which accommodates an integer number of shares If the total capital allows multiple positions to be taken then the maximum number of positions that can be taken at any one time will depend on the total trading capital and the Portfolio Limit When trading commodities the Fraction of total trading capital per trade determines the number of contracts purchased The number of contracts purchased is calculated by dividing the Capital per Trade by the Initial Margin and rounding the result to the lowest integer value UO Fraction of total trading capital per trade This parameter specifies the fraction of total trading capital that is allocated to each trade For example if this parameter is set to 10 and the total trading capital including existing positions is 50 000 then we would allocate 5 000 to the trade irrespective of any existing trade positions that have already been taken 3 The Fixed Dollar Risk Position Sizing Model In this model a fixed amount of capital is risked on each trade This should never be confused with the actual position size which is calculated from the amount risked This model requires an Initial Stop parameter to be included along with each trade in the trade database that was generated with the MetaStock plug in If valid Initial Stop data is not detecte
111. software offers portfolio optimization as some sort of fancy 3D color coded surface chart either does not understand the problem or are purposely misleading the public with their hyped up claims Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 230 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Advanced Statistical Analysis using TradeSim E The Enterprise edition of TradeSim allows you to evaluate the statistical performance of a trading system TradeSim Enterprise Edition automates the process of running multiple trade simulations on the same trading system and then using the results of each simulation to build up a statistical profile of the system This statistical profile is like a signature or footprint of the trading system It is a way of fully characterising the historic performance of a trading system Setting up a Monte Carlo Simulation To enable Monte Carlo analysis just select the appropriate option in the Simulation Type group box on the Trade Parameters window as shown below simulation Type C Portfolio Simulation To enable Monte Carlo analysis select this Radio Group item Checkbox C Portfolio Simulation ignore Dates C Basket test Simulation Options This group box contains two parameters as shown below simulation Options Number of Simulations ao l Reset Ordering es in database 30148 QO N
112. symbol name Minimum Days in Trades This column represents the trade with the minimum number of days from all of the trades with the same symbol name Average Days in Trades This column represents the average number of days spent in all trades with the same symbol name Maximum Days in Trades This column represents the trade with the maximum number of days from all of the trades with the same symbol name Note The number of days in a trade should not be confused with the number of bars in a trade For a more complete description see the definition for Days in trade Sorting the columns By default the Trade Statistcs Table is sorted alphabetically by symbol However clicking on the column headers activates a sorting routine that resorts the list according to the information contained in the respective column For example clicking on the Total Profit header will sort the list in ascending or descending order based on the numeric value of the total profit Likewise clicking on the Symbol will sort Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 174 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 the list based on the alphabetical ordering of the symbol column Alternately clicking on the same column will resort the list in the opposite direction 1 e Z to A instead of A to Z Exporting the Trade Statistics Table P E It is possible to export
113. that the Maximum Peak to Valley Dollar Drawdown is distributed Losing Trades Average Rel Drawdown Average Rel 2 Drawdown Max Peak to Valley Drawdown Mas Peak to Valley Drawdown 4 t Maximum Absolute Percentage Drawdown Stats This distribution illustrates the way that the Maximum Peak to Valley Percentage Drawdown is distributed Losing Trades Average Rel Drawdown Average Rel 2 Drawdown Max Peak to Valley Drawdown Mas Peak to Valley 4 Drawdown ae Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 266 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Composite Report Generator Enterprise Edition 12 The Enterprise Edition features a brand new report generator which can be used to easily construct a composite report consisting of any combination of written reports and graphical charts at the click of the button The reports can either be printed copied and pasted into another application or simply exported in a variety of different formats including RTF rich text format HTML hypertext markup language TX T standard text format When exporting as a HTML format all of the original text formatting formats displayed in the reports are preserved and charts are exported as individual JPEG images The HTML files can then be downloaded to a server for others to view on the net By default all files are
114. the Extended Data Utility in TradeSim Please see document AN 7 for a detailed example on how to do this A Note on Point Value Point Value refers to the amount of one Big Point A big Point would be 1 point on the SPI SP or Dow or 1 point on the ED To get the value of the big point simply use the following formula Big Point in s 1 tick size tick value So for the ED 1 0 005 12 50 2 500 EMini SP 1 0 25 12 50 50 00 Description Extended Data p and Field Name Comments PointValue Point Value x InitialMargin Initial Margin MaxLoss Maximum Loss TransactionCost Transaction S Cost SystemID Used to indentify the call to the RecordTrades function TradeRank Used to S assign a rank to a group of trades MarginReq Margin Y Requirement InitializeValues ExtFml TradeSim InitializeValues Default Value after Allowable Values a call to InitializeValues pres TradeSim gt TradeSim 0 0 0 0 0 Commodities x lt S YJ NAVAS 0 use default value in TradeSim i Ea 0 100 0 use default value in TradeSim CERMEDRAA yS yY yyy fea Initializes all extended values to their default value This function should be called before any calls to SetValue or Assign Value Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 105 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6
115. the contents of the chart windowpane are zoomed out so that all of the chart data is displayed within the chart window O Hi Zoom Entry Dates When this button is clicked the chart is zoomed to display only the chart information which fits between the start and stop entry dates as specified by the StartEntryDate and StopEntryDate functions If these functions have not been called the start and stop entry dates will correspond to the first and last bar of the security data respectively O i Zoom Trade Dates When this button is clicked the chart is zoomed to display only the chart information which fits between the entry and exit dates of the selected trade To select a trade first double click on any of the price bars which display a valid trade price marker Alternatively you can select a trade by double clicking on any of the trades in the Trade Data tab in which case the chart tab will be displayed and the chart automatically zoomed to the trade extents O Display Horizontal Price Grid Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 56 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 When this button clicked down a horizontal grid is displayed on the price chart in accordance with the left hand price scale O a Display Vertical Date Grid When this button clicked down a vertical grid is displayed on the whole chart in accordance with the bottom date scale
116. the data from the Trade Statistics Table in a variety of formats which include Word Document file doc format Hypertext Markup Language html and htm format Standard ASCII Text file txt format Excel Spreadsheet file xls format To access this facility just right click on the Trade Statistics Table Window and select the Export file option A file save dialogue box will appear asking you to select the appropriate file and file format Select the appropriate file format from the Save as Type drop down menu and then select a file or use the optional filename given in the File Name field You do not need to specify a file extension as one will be automatically appended Security Profit Chart Tab Trade Statistics Table Security Profit Distribution Trade Profit Distribution Chart Pane Zoom In Zoom Out Reset Zoom Toggle 3D Export Chart Net Profit versus Security 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ea ae ee RS a ie i i i a i Seip Sea Se ie ie I a i a ie ie i ie 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 EF ww 671 07 671 07 671 07 671 07 13 43 ss 13 43 Detailed oo The Security Profit Chart charts some of the data contained in the Trade Statistics Table This includes the Minimum Percentage Net Profit versus Security Displays a minimum percentage net profit bar vers
117. the initial stop value and is only monitored after and including INACTIVITY DELAY number of bars from the point of entry into a trade A call to the Initialize or the DisableProtectiveStop function disables the effects of a call to this function Note Prior to Version 4 0 0 of the TradeSim dll if an exit trigger occurred at the same time the stop was breached and protective stops were enabled the trade would be recorded to the trade database and flagged as a normal exit In Version 4 0 0 of the TradeSim dll if an exit trigger occurs at the same time the stop is breached and protective stops are enabled the trade will be recorded to the trade database and flagged as Stopped Out This change will not have any effect on the simulation results as the exit status of the trade is not used in the trade simulation DisableProtectiveStop ExtFml1 TradeSim DisableProtectiveStop This function disables the protective stop however the InitialStop data will still be written to the Trade Database A call to the Initialize function also achieves the same result O Example In the following example the protective stop is enabled and is active after the fifth bar of the trade ExtFml1 TradeSim EnableProtectiveStop 5 SetExitPrice TolnitialStop ExtFml1 TradeSim SetExitPriceToInitialStop If protective stops have been enabled using the EnableProtectiveStop function then when the InitialStop is breached you automatically exit
118. to back test and simulate a trading system using the trading data that we have just created Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 113 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Back Testing and Simulation using TradeSim What is a Portfolio Simulation When trading a system using a portfolio of securities it is important to note that the outcome is no longer unique as it is when testing with one security alone This is due to the number of different permutations and combinations of securities that can be traded at any given time For example consider two traders who trade an identical trading system over the same period of time selecting securities from the same portfolio If they were both backtesting the same trading system using the same security a single security back tester such as the one built into MetaStock would produce identical outcomes and in practice you would also expect very similar outcomes Any discrepancies would be due to slippage etc Now if we allow an extra degree of freedom so that our two traders can now select securities from a broad portfolio group such as the DOW or the ASX top 200 then we can no longer expect the two traders to trade an identical selection of securities even though they are trading with an identical trading system The consequence of all of this is that Trader A could pick a different set of securities than Tr
119. trade double clicking the left mouse button will display two thin vertical dashed lines which represent the actual trade entry blue and trade exit red bars At the same time the relevant trade is marked in the Trade Data window Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 55 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 4 TradeSim DLL Plugin Signal Chart for CML i B l oj x Signal Chart Trade Data RecordTrades Parameters CML COLES MYER LTD ORDINARY L i i Te T EN ee ee T O E A E eo tie a A ern ae ER eggs Oa Cl pees erro OE DEES penton M r EAA EAE OT Exit Trig Entry Trig O 1 09 2003 2109 2003 taei se nenna 29 09 2003 J 1 4 0640 2003 4 1 4 30M 0 2003 4 2 0 2222 rami 0 30 000 epa a oa aaa a ee a a e a a a a e e a a a a O O ac R 20 000 heap eee Natl kaiaka lial lett teat alt teat ea Sata felted facta belied teat felted ltl ited Sead Aaa pts alia lata aaia aia aia aa RERE o i i i i i i i i i i i i i i i i i i i i i i i i amp 10 000 esis ates Soe anes ca as ease ee eee eee ee eee risk Libido WNL LT LI Us Ce ARETE TIL wa oer eur et M MM YMY momo mom mH A M M M oom Om yY VY onnmMm mom Om 4 oon Oo 4 a t a eb l a eal ee e a all
120. trade is to be taken 6 The Fixed Percent Volatility Position Sizing Model In this model the Volatility parameter for each trade from the trade database is used to determine the position size along with the Fraction of Capital Assigned to Trade This model requires a Volatility parameter to be included along with each trade in the trade database that was generated with the MetaStock plug in If valid Volatility data is not detected in the trade data then this model will be disabled from the radio group For more information on generating the volatility data please read the relevant section on the SetVariableVolatility function Important This model does not limit risk in anyway unless a protective stop is used When To enable protective stops when generating a trade database please refer to the section in the previous chapter Using the Initial Stop as a Protective Money Management Stop for more details on how to do this Fraction of Capital Risked per Trade This parameter along with the Volatility of the trade determines the total amount of capital allocated to each trade and is specified in dollars such that Position Size Fraction of Capital Assigned to Trade 100 x Total Trading Capital Volatility O Position Value Size Limit This parameter limits the maximum position value size of any one trade to a value that is a fraction of the total trading capital at the time the trade is to be taken Simulation Type Th
121. trade that has a positive change may not be profitable when actually traded due to transaction costs and the position size model used If the percentage change is positive then the entry in the table will be green otherwise it will be black and red for zero and negative change respectively Note that right clicking on the table and then selecting the appropriate option from the popup menu can disable the color coding Note The color coding and percentage change column will always reflect the potential profitability of the trade irrespective of the trade position type For example if a trade is long and the exit price is greater than the entry price then the record will be green in color and the percentage change will be positive Likewise the record will be red and the change negative if the exit price is less than the entry price If a trade is short and the exit price is less than the entry price then the record will be green in color and the percentage change will be positive even though the exit price is lower than the entry price Likewise the record will be red and the change negative if the exit price is greater than the entry price Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 132 Final Release Version 6 4 1 Column Description QO Column Trade ID The first column assigns a trade ID number to each trade in the database so that it
122. use to determine the performance of the trading system Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 229 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Depending on the complexity of the trading system and the size of the trade database you may have to run a 10 000 run Monte Carlo analysis each time you stepped a trading parameter This may mean running 100 Monte Carlo runs or 1 000 000 simulations Even then it is not a simple matter of inspecting a simple performance metric such as average net profit as each Monte Carlo run will be characterized by a complete set of statistics data histograms and distributions Again compounding the problem even further is the fact that not all statistical distributions produced by TradeSim exhibit a regular distribution Some distributions have double humps whilst others are completely irregular and trying to characterize this using a single metric is totally misleading and thwart with danger for any trader who takes it on face value Any vendor of a charting package who claims that there software performs portfolio optimization without proper statistical analysis obviously only runs one portfolio simulation for each set of trading parameters Trying to characterize the performance of a portfolio trading system from the results of one portfolio simulation is totally misleading and pointless Vendors who claim their
123. you the right to use the Software in the manner provided below If you do not accept the terms and conditions of the License Agreement you are to promptly delete each and any copy of the Software from your computer s This license agreement only applies to the software product TradeSim and not to any other product even if that product is similar to TradeSim and has a similar name The Vendor reserves the right to license the same Software to other individuals or entities under a different license agreement After accepting this license agreement the Licensee is permitted to use the Software under the terms of this agreement Under this license agreement the Software can only be used by those persons or entities that have purchased a license key Payment information IS available at http www compuvision com au PurchaseOnline htm The Software is provided as is In no event shall Compuvision Australia Pty Ltd be liable for any consequential special incidental or indirect damages of any kind arising out of the delivery performance or use of this Software to the maximum extent permitted by applicable law While the Software has been developed with great care it is not possible to warrant that the Software is error free The Software is not designed nor intended to be used in any activity that may cause personal injury death or any other severe damage or loss When errors are found in the Software the Vendor will release a new ver
124. 0 sets Point Value of security ABC to 40 ExtFm1 TradeSim AssignValue InitialMargin XYZ 4700 sets the Initial Margin to of security XYZ to 4700 ExtFm1 TradeSim AssignValue MaxLoss DEF 5000 sets the Maximum Loss of security DEF to 5000 ExtFml1 TradeSim AssignValue TransactionCost DEF 25 sets the Transaction Cost of DEF to 25 ExtFml1 TradeSim AssignValue TradeRank ABC 1 sets the Trade Rank of security ABC to 1 ExtFm1 TradeSim AssignValue TradeRank DEF 2 sets the Trade Rank of security DEF to 2 ExtFml1 TradeSim AssignValue TradeRank XYZ 3 2 sets the Trade Rank of security XYZ to 3 2 ExtFml1 TradeSim AssignValue MarginReq PQR 45 sets the Margin Requirement of security PQR to 45 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 106 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Using the Column and Filter tabs to expand the formula space If you add too many SetValue and AssignValue statements sooner or later you may reach the editor limit and not be able to complete your system formula if everything is stored in the Column A tab It is possible to use all of the columns as well as the filter space to expand your system formula Because the column tabs are executed before the filter tab you would use the column tabs for the
125. 0 00 Portfolio Heat 100 00 Pyramid profits Yes Transaction cost Trade Entry 20 00 Transaction cost Trade Exit 20 00 Trade Preferences Trading Instrument Stocks Break Even Trades Process separately Trade Position Type Process all trades Entry Order Type Default Order Exit Order Type Default Order Minimum Trade Size 0 00 Accept Partial Trades No Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 253 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Volume Filter Ignore Volume Information Simulation Stats Number of trade simulations 5000 Trades processed per simulation 3018 Maximum Number of Trades Executed 332 Average Number of Trades Executed 259 Minimum Number of Trades Executed 184 Standard Deviation 9 24 Profit Stats Maximum Profit 2 554 479 89 5109 00 Average Profit 599 041 91 1198 10 Minimum Profit 78 389 45 156 78 Probability of Profit 100 00 Probability of Loss 0 00 Winning Trade Stats Maximum percentage of winning trades 69 00 Average percentage of winning trades 60 69 Minimum percentage of winning trades 51 91 Standard Deviation 2 49 Losing Trade Stats Maximum percentage of losing trades 48 09 Average percentage of losing Trades 39 31 Minimum percentage of losing trades 31 00 Standard Deviation 2 49 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Re
126. 00 00 09 Maximum percentage Average percentage Minimum percentage of winning trades of winning trades of winning trades 64 57 55 70 Standard Deviation Losing Trade Stats Maximum percentage of losing trades Average percentage of losing Trades Minimum percentage of losing trades Standard Deviation Average Relative Drawdown Stats Maximum of the Average Relative Percent Drawdown Average of the Average Relative Percent Drawdown Minimum of the Average Relative Percent Drawdown Standard Deviation Average Relative Drawdown Stats Maximum of the Average Relative Dollar Drawdown Average of the Average Relative Dollar Drawdown Minimum of the Average Relative Dollar Drawdown Standard Deviation Maximum Absolute Drawdown Stats Maximum Absolute Dollar Drawdown Average Absolute Dollar Drawdown Minimum Absolute Dollar Drawdown Standard Deviation 43 34 27 oook 1 407 866 577 143 28 722 11 946 9 177 3 620 Maximum Peak to Valley Percent Drawdown Stats Maximum Absolute Percent Drawdown Average Absolute Percent Drawdown Minimum Absolute Percent Drawdown Standard Deviation Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 30 12 12 24 10 30 3 15 11 04 81 91 533 60 91 60 17 58 01 75 20 31 76 45 72 75 76 31 86 Page
127. 00 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 238 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Exporting the Reports See Appendix F for more details Statistics and Frequency Distributions Before we discuss probability distributions we need to talk about some basic concepts regarding random events and frequency distributions For those that are unfamiliar with the concepts of statistics and frequency distributions we suggest that you read Appendix D Profit Distribution The Simulation Log produced a tabular representation of the results from the Monte Carlo analysis To gain more insight into the behaviour of the trading system using the results obtained it is often helpful to look at the distribution of profit data in graphical form We can do this by using the data from the Simulation Log to construct a frequency distribution chart To view the profit distribution chart just click on the Profit Distribution tab on the Monte Carlo report window The profit distribution should look something like the following Report Simulation Log Profit Distribution Winning Trades Distribution Losing Trades Distribution The horizontal axis of the distribution chart represents the net profit The horizontal axis is divided up into a number of regions that represent a range of percentage net profit values The vertical axis of distribution chart is a measure of the number of
128. 02 Open Trade POsioms 4 PE p enansa EES EEEE 203 Linkime C hars A E aa ETE E eves 205 Dynamic WALI sccis E a 206 Pama an O a A T E ree ee eae nee 206 Closed Trade Chart Preferences i 206 COMIMION P ALTAMICLETS erered n EEEE E OE 207 w E e a NN E NNR 207 ae E e OG n AE N EE OEE ATE caste E need cu eco EE EAEE IE EE EEE EE OEE 207 EREE TE T E Col ATENT PES IE AT AES E A AAE A A E A AEA 207 Ma E E EA EA AE TA A E AE TE ENE ETE A E det epee eet 207 Cross Referencing from the Trade Log ssssssssseecccccccccsssssseseccececccoocosssssssssessecceeecocososssssssssseeee 209 Cross Referencing options eesoseseseeeeeeeeeseeeeeeeeeeeeseesessesenenessnnnsssnnnssnsssnnnnsnnnnnsnnnnnnnnnnnn ennenen 209 T Jump to Trade Entry Exit cassera aae aN EEA TAA T anion canna ATEENA EAA EENAA 209 E Locate ln Trade Dibibi naana E E EE 210 A Locatein Chart i SiN gcse cress teas auenatcansteies cai panass Metdentmnaasaccacdeguacastaoeiaandeay deen udgubiataenimniasennlactane 210 Cross Referencing from the Charts to the Trade Log ccssssssssssssssccccccccccccccccsssssseeeeeeees 210 Cross Referencing from the Charts to the Trade Database Managetr ccccccccssssssssssssscseess 210 Cross Kelercncing SUMM ANY ais sacs Geer srsacsseetensevadutissiatesdieuseuesiacdiacasasatavidassbateeadieasteasdinciaeasatiesbaes 211 Displaying Security Charts 4B sscecsssccccsctsueccevssessncsessestuessescessstectustsseossstsaevesvasesstsstsusnvccsieess 212 PC CU
129. 04 10 2000 2 P Group 1 0 ANZ Daily Yes Yes 01 09 2000 29 09 2000 1 i 0 BHP Daily Yes Yes 01 09 2000 11 09 2000 1 Fe Reentry Type Base 0 CBA Daily Yes Yes 01 09 2000 27 09 2000 1 0 CSL Daily Yes 01 09 2000 10 10 2000 1 0 MOG Daily Yes 01709 2000 18 09 2000 1 0 AWC Daily Yes Yes 04 09 2000 06 10 2000 1 0 RIO Daily Yes Yes 04 09 2000 09 10 2000 1 0 MIG Daily Yes 05 09 2000 03 10 2000 1 Entry Price 3 9672 0 NAB Daily Yes Yes 05 09 2000 28 09 2000 1 0 ORG Daily Yes 05 09 2000 02 10 2000 2 Z Change 509 0 SUN Daily Yes 05 09 2000 06 09 2000 1 0 SGP Daily Yes 06 09 2000 18 09 2000 1 a 0 WBC Daily Yes Yes 06 09 2000 04 10 2000 1 3 9487 0 CGJ Daily Yes Yes 08 09 2000 29 09 2000 1 35 08 2000 0 CMJ Daily Yes Yes 08 09 2000 06 10 2000 1 396404 0 CwO Daily Yes Yes 08 09 2000 29 09 2000 1 Rank 0 0000 n WES Naili Yes 1120922NNN NRAN 1 rf Point Value y 2837 trades selected from a total of 2837 trades Page 141 Final Release Version 6 4 1 TradeSim Enterprise Edition C TradeSimData MACD Crossover with SBF trb File Tools Window Help Kea HSL Th SRL SLL Ie AU ET H sik Daily Yes es eae 2000 Long ORG Daily es 24 08 2000 0 Long GBE Daily Yes 24 08 2000 a 0 Long TLS Daly Yes Yes 24 08 2000 29709 Entry Date Time 25 08 2000 i a pec T a Exit Date Time 28 08 2000 ER Fa i 30 08 2000 0 Long WSF Daily Yes 30 08 2000 03 10 P Lev
130. 1 Final Release Version 6 4 1 Generating trade data for a single security To get a feel for the simplicity of acquiring the trade data we shall start with a simple example For this example we shall use a trading system based on the Equis MACD Expert which is packaged as one of the MetaStock Experts To keep things simple we will only be interested in taking trades on the long side and for a single security that has been opened up and displayed as a chart in Metastock Also we won t worry about using an initial stop and will limit the trade analysis to position size models that do not require an initial stop in order to calculate the position size for the trades Later on when we use TradeSim we will incorporate a suitable initial stop into the analysis and explore its effect on position size models that require it EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE InitialStop 0 optional initial stop ExtFml1l TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades ExitPrice Exit Price MACD Long Example Trade Data Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger START Trade Recorder Control Note that the framework for the trading system consists of five basic
131. 12 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 US AS yt TCS oaei gees AE eee lesen et aa ea E E N AN E EAA 168 Wy tami LG Si Tade lA sireni eset ceed scene vases EEr NE EEE EE EEEN ARE 168 LC Largest Winning Trades Date s isscicicass ccseceetevaceossessasdiasasieveadinadleteaeanteaesreospenesnte Wusdencadaaseudsbuasecannsaentuaaiisas 168 CY Largest Losine Trade Dae Jocar anA EE NARO EEAS AANE AE NAO EAA NACS 168 O Ayerage Wionine Trod sessisseiirina nn N A EA E A A iN 168 T Avare Lorne TE peno a aces acto entender ane ease eee 168 Q Average Win Average Loss oiccccorss cs cezyssscicnsrnnasaoeedaunanvea i aaatialadaw GAGs rees Eross esses sree GHEE 168 Trade NS WGA OI SUAUS OS a ctoceteccndecanastatetemsutectnestnsctecctascivedusseiecetanceeedunestisataectcedunexteestaecpueduneniventpexitedas 168 H PR Days m acca since suture eats aera ance tan soa conden toe patency anaes 168 LY Average Days In Winning Trades cccccccccccsccesssecesscecesseecesseecesseecesseceesseceesseceesseceesseceesseecsseeeaseceesaeeees 168 EU Av Days In Losing Trad s a caters acc caret ainclus po ateoca pst sci aR aaa A aTa TEN aE EN 168 Consecutive Trade Statistics secescensececneessenadatnacoudcvascuacwadasendadadideadsbeseadatenenia ea atone senescent eee 168 LJ Maximum Consecutive Winning Trades ccccccccsccccsssccesseccesseecssseccssecccsssecesseeceesseceessecesseeceessecessesensaeeess 168 Ey Max
132. 13 12 1995 Latest Entry Date 06 10 2005 The first window on top is called the Trade Parameters window We will talk about the details of this window later on however in brief this window contains all of the trading parameters needed to set up a trading simulation The next window is called the Trade Database window and contains pre processed trading information that was generated using a MetaStock Record Trades Exploration The last window is called the Message Log window and contains informational messages that correspond to events that occur when using TradeSim You will also note that a lot of the messages that appear in the Message Log Window also appear on the bottom Status Bar Session Files Session files are used to save the current TradeSim settings and associate these settings with the currently loaded trade database file These settings include all of the trade parameters and preferences This feature adds the convenience of being able to reload the trade database files along with all of the settings associated with that trade database file at the time the session file was created Alternatively if you have a number of session files you can quite easily apply the settings in these files to the currently loaded trade database file without having to go through the motions of re entering all of the trade parameters and preferences Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 129 http Awww compuvision
133. 159 L Exit Order At Market ccscsssscossssccccosssssssssssccnccsccscesscsescssscsecesscsescossesssssccenceseccessessessvsscesensecsessovsees 159 Q Exit Order At Worst Case a cisa sd acctoxiasssusatesceictot is aceuancectevivosisaieascisuctwa nc loeb anda cage aweabeaccunsi sew seusnauctadinwacaause 160 Order Witt a TADE sescat eee aa Oa Ea arae a E OaE 160 OO O e EEE ES 161 A Allow Ay AS neisi 2a cy satse sian acastsesssseeistagi odie tun aeneaaseueusnsecsaaccia vase caustic deasudteaiaeayaialisdsucieeasdodiene 161 Default Preferentes sacs socciiesriasectestecseuces dacuwvaiaiwieiwsssssiveieuesedesssavevessiedeGoieserdveieunsevossserestsecuasteissevesees 161 Running a trade simulation visissssccccsiecssccansescceetinndcvssecieseaducecenatsssnetabicsdsasisnicoestecssavatostioneces 1 OZ Simulation Status Window eosseosseossossseoososososssosssosssosososssosososssosssosssosssosssosssosssososeooseossessssoos 162 Simulation Status Parameters ccccccecccccssecccssecccescccessccceecccseccessccceeeccessccessueeceseececeecesuecesauecess 162 LE Simulation Time HH MM SS sesscsavececacoccessassacwsus sdaccucensecssdeestussuwudb dectwoasdenuaestenislanccbestanameeisweatdeguesivecs actaaeaunans 162 G Simulations COMpPlete dss snoscssse idsiceoncaaderitesseedieneaenste vsuseansaainndeassdusenssaoansbiendedoshestacueredaceaseuaiuveddedaiensseataugets 162 ASS DS artes cece eens annesaxed eae cs cycerene rossaeanared aun caaesereteas ee
134. 3 ee eee 07 Jan 2003 10 Jan 2003 15 Jan 2003 04 Dec 2002 09 Dec 2002 12 Dec 2002 17 Dec 2002 20 Dec 2002 27 Dec 2002 4 4 20 Jan 2003 23 Jan 2003 29 Jan 2003 O3 F eb 2003 O6 F eb 2003 11 Feb 2003 14 Feb 2003 19 F eb 2003 24 F eb 2003 5 04 Mar OF Mar 1 2 Mar 17 Mar 20 Mar 25 Ma 20 Ma 02 4p OF Ap 10 Apr 15 Ap 22 Ap 20 4p 06 May 2003 09 May 2003 14 May 2003 19 May 2003 22 May 2003 27 May 2003 30 May 2003 W x Trade Entry Price A Trade Exit Price Trade Initial Stop IntialStop Array EntryPrice Array ExitPrice Ariky Date 24 Feb 2003 Open 16 0101 High 16 2205 Low 16 0006 Close 16 1632 Yol6 117 400 Trade Initial Stop 0 6525 Trade Entry FPrice 16 1632 EntryPrice Array 16 1632 ExitPrice Array 16 1632 Initialstop Array 0 6525 Miscellaneous Functions GetSymbolLength ExtFml TradeSim GetSymbolLength This function returns the number of characters in the symbol and can be used in a security list exploration to include or exclude securities with symbols that are a certain length For example if you are only concerned with the primary securities which have symbol lengths of 3 then you can easily use the GetSymbolLength function in an exploration to reject all 4 5 6 character stock options and warrants by simply filtering out securities with symbol lengths greater than 3 Like the FilterSecurity function the GetSymbolLength
135. 641 15 4177 45 4 17 7 45 Naa 0 69054 10 43294 659 29 4 17 45 4 17 7 45 Naa 0 8175 10 4329 760 70 4 177 45 9 177 45 1 60 Naa 1 0000 10 30314 ooU 6 5 1 7 45 20 505 76 0 60 HA 0 9554 10 4329 s da 22 5177 45 410 559 50 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 264 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Distributions Average Relative Percentage Drawdown Distribution This distribution illustrates the way that the Average Relative Percent Drawdown is distributed Losing Trades Average Rel Drawdown Average Rel 2 Drawdown Max Peak to Valley Drawdown Max Peak to Valley Drawdown 4 t Average Relative 2 Drawdown Distribution Equis Bollinger Bands Absolute Fre Drawdown Average Relative Dollar Drawdown Distribution This distribution illustrates the way that the Average Relative Dollar Drawdown is distributed Losing Trades Average Rel Drawdown Average Fel 73 Drawdown Max Peak to Valley Drawdown Max Peak to Valley 2 Drawdown 4 H Average Relative Drawdown Distribution Equis Bollinger Bands Drawdown Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 265 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Maximum Absolute Dollar Drawdown Stats This distribution illustrates the way
136. 8 Oct 2003 7 7200 13 1 Profit 5 7 579504 22 CML 0 Long Daily 09 Oct 2003 7 6900 28 Oct 2003 7 7200 13 0 Base 13 7 174607 23 CML 0 Long Daily 06 Jan 2004 7 6400 14 Jan 2004 7 4000 14 1 Profit 6 7 347323 24 CML 0 Long Daily 11 Dec 2003 7 4100 14 Jan 2004 7 4000 14 0 Base 21 7 139126 25 CML 0 Long Daily 20 Feb 2004 7 7800 03 Mar 2004 7 7100 15 1 Profit 8 7 437902 26 CML 0 Long Daily 03 Feb 2004 7 5300 03 Mar 2004 7 7100 15 0 Base 21 7 198304 27 CML 0 Long Daily 11 Mar 2004 8 2100 22 Mar 2004 7 9900 16 1 Profit 7 7 688123 28 CML 0 Long Daily 05 Mar 2004 7 8400 22 Mar 2004 7 9900 16 0 Base 11 7 435403 29 CML 0 Long Daily 07 Apr 2004 8 2600 08 Apr 2004 8 0700 17 0 Base 1 poo gt Tab 3 RecordTrades Parameters Window Displays a tree view of all of the RecordTrades parameters that have been set prior to calling the RecordTrades function Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 58 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 4 TradeSim DLL Plugin Signal Chart for CML Signal Chart Trade Data Record rades Parameters Delay Entry By One Bar No Exit Trigger Delay 0 Delay All Exits By One Bar Ho Exit Trigger Delay 0 Enable User Exit Encoding No Start Record Date 01 02 2007 Stop Record Date 30000101 Normal Exit if Profit Mo L Allow Invalid Price Data No Protective Stop No Profit Stop
137. 9 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Click to advance to the next page Click to view the last page Trad Parameters and Preferences Tria Ouro F ila NTF H ba ity iki ia i peli Mirgi Cetalled Report Trae Quran Flere ba H Clicking the left button whilst the mouse cursor is a magnifying glass with a sign will enlarge the printview page and vice versa for the sign Once you are satisfied with how the report looks int the print preview click on the printer button to print the whole document Copying and Pasting into other Applications Copying and pasting into Word See Appendix F Copying and Pasting into Word for more details Copying and pasting into Excel See Appendix F Copying and Pasting into Excel for more details Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 270 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Exporting the composite report The reports can be exported in a variety of different formats including RTF rich text format HTML hypertext mark up language TXT standard text format To export the composite report click on the Export button from the main toolbar A dialog box will popup where you select the export type from the Save as type drop down menu as well as the filename which will default to the name of the trade
138. All Rights Reserved Page 126 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 DA Shares Au ASY T Ioj x Index Symbol Name StatDate End Date l TBL 3D GLOBAL LIMITED 027 0171995 28711 2003 2 TAB TAB LIMITED 22 06 1998 21 06 2004 3 TABIDH TAB LIMITED DBAJN OAR 10 10 2003 2 06 2004 4 TABDODH TAB LIMITED DBAJN OAR ME O2 06 2003 02 06 2003 5 TABEMG TAB LIMITED MOBEN D a MT 217 1271999 21706 2004 E TOL TAB QUEENSLAND 167 1171999 122002 TAH TABCORP HOLDINGS LTD 26 08 1994 21 06 2004 0 TAHIZ0 TABCORP HOLDINGS LID ABNJNO 09 10 2003 16 06 2004 g TAHIZG TABCORP HOLDINGS LTD SBNMY 24 10 2002 27705 2004 10 TAHIZA TABCORP HOLDINGS LID ABNOC 20 06 2001 08710 2002 11 TAHIAA TABCORP HOLDINGS LID ANZJNO 2770672001 18706 2003 12 TAHWAC TABCORP HOLDINGS LTO ANZOC 11 04 2002 24 10 2002 13 TAHIPD TABCORP HOLDINGS LID BNPDE 11701 2002 19 12 2002 14 TAHIPA TABCORP HOLDINGS LID BNPSEO 18 12 2001 ef 05 2004 gt O List all symbols You can list all symbols in all of the security folders by clicking on List all Symbols 2 All Securities AFIR AFL AFLO AFM AFMOE AFMOL AFT AFT Al AFTAM APYHA AGA AGADA AGC Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 AGCO AGG AGGUDE AGH AG AGIN AGIR AGL AGLODA AGLODH AGLOG 4GLOMC AGLDOSE AGLOSG AGLOSH AGLOUSS AGLEME
139. Disabling trades in the database P E sssseececccccccsssssssseseccecccococssssssessseceeseoooo 137 BE aae Eo 2166 0 AE E E NE A A E A AA I AE T 137 Palabase Popup M onteren ee ee en EA RE 137 PP sie Aa Dito PE I NA E A A E A A AEA AE A access 137 Eh mene All ies IPE srein ane AAE A 138 G Check Hiehiebted Enesi P E aeee E ETES 138 Q UnCheck Higlighted Entries P E sssssssssssssssnssesssessssessrressressersseessnsessnessnresstessresstrssessnressresssrssressneessres 138 MS eA NS oane A E AE E E 138 Global date selection Mask airesin naida aeania E ARASEN AE AEAEE AANE NAERAA 138 Method A Select the entry dates from the drop down calendars ccccccccccccceceecceeeeeeeeeeeeeeeeeeeeees 138 Method B Select the trades directly from the trade database managet cccccccccccccececeeeeeeeeeeeeees 140 IR SG te Bir De M Iek esate ae caesarean i cuaecucseee N NE 140 The Trade Database Inspector n a vn en nen er 141 Exporting the Trade Database P E poscis AEA Ea E raai 142 Problems when loading Trade Database files csssssscssccccccccccsssssssssssssssccsccccccesssssesseseeess 143 Tae DIa EO er E E E EE E E E E 143 E Comoe Process ina eisrean E 143 Q Report All Errors to the Message LO cccccccsccsssscessssccesscecsssseceseccsssecesssecesseecesseceessecessseceesseeesaeceesaecens 144 ED Suppress All Erot Mossies acns E E STS EES 144 O Abort Processing snusar A a N ia aa S 144 Lop ae Tr MU
140. E OEA AAEE EAEE 119 G yiew Onek Sae Toe a A E TOIA 119 A View Readme Document ssrin ane aaa aaaea iaa a iiaia 119 a AN a E re ee ee eee eee 119 EC Version Update Manaper sds sascasevessdacnsessdaavestenesnssesuareyadnadasunstiesesiss uensastasersedasonnesad NANENANE NE Tiaia 119 E 5523 Fo oz ae o 10 102 15 ea eS E ne re ce eV Re er eee eo eee 119 FY o eg a A N st eee gta Dances gene cece strc dus namin cute eee A EAA A 119 FN Purchase Onlihe asco techn aea nd ass eens datos EE uae ate aeS 119 A Trad esim Download gs lt gee nee a ae ne ere ee ener eee 119 The SU ACES Daraan EE E EE E EE 119 Prelerences Di alo ele BOX ssecessbace stun sie iesentacacasnestweaesarinstensaes a aaa ae aaan aaa 119 Global Parameters oi ceeccscssssssesseeeesssssssssssssnnneeeseessssssssnnnnseeseeeeseesssssneeneees 120 MI Ce Uan OU a E E E 120 ER D al cos ata bs E E IA E EA AE EEA AAIE E A E EA ET 120 G Chart Print Orientation yo seascasauswoxtasievanustsusteassondaennctaseeciantnuaveisankeactuaemrenssaneeadesvanesinungeeedaatasanscousateaatonnnnateaneens 121 El Remember screen SEMI GS 3 oa cicicscacceaacucsswssensaoeeneueeiansocnsadarsuadiuadieciguensexseperspecenssemaaseasadacs wand eaenenmanetas 121 INC iO 1E arieni E A A EAEE EEE A E AAS 121 Q Trade Database Loading Options cccccccsccecsseceessecesssecesseccesseecesseccsssecesseecesseecesseccesseesesseceesseeeesseceesaeeens 121 vorlon Upda M mAn E e E EEE 123 Q Automatically Check for Fin
141. Final Release Version 6 4 1 Tradesim Advanced Trading Simulator and Back Tester For position traders using MetaStock Versions 7 8 9 and 10 Advancing the Art of Trading with Science Users Guide Standard Professional and Enterprise Editions TradeSim Version 6 4 1 Final Release Version TradeSim DLL Version 8 3 0 Last Update 26 March 2009 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 1 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Disclaimer In no event shall Compuvision Australia or its suppliers be liable for any damage either direct or indirect including without limitation damages for loss of business profits business interruption loss or business information or other losses arising out of the use of or inability to use the software The results obtained from using this software are not indicative of and have no bearing on any results which may be attained in actual trading Results of past performance are no guarantee of future performance It should not be assumed that you would experience results comparable to that reflected by the results from this software No assurance is given that you will not incur substantial losses nor shall Compuvision Australia Pty Ltd be held liable if losses are incurred Compuvision Australia Pty Ltd is not a licensed investment advisor and so the information and results obtained by using this sof
142. HH MM TTT where HH represents hours 23 0 MM represents minutes 59 0 and TTT represents Ticks 999 0 O Column Level This column represents the pyramid level of the trade More information regarding trade pyramid strategies can be found from the following Application Note Column Pyramid Re entry status This column represents the pyramid re entry status of the trade Note that only level 1 trades or greater can have a pyramid re entry status Possible values or combination of the following values are Status Status Symbol _ O Trig Pyramid Re entry was cause by an Entry Trigger o o Re entry was cause by an Entry Trigger relative to the previous entry price exceeded the profit threshold parameter Trig sai price is exceeded and the EntryTrigger is asserted at the same time entry price is exceeded or the EntryTrigger is asserted at the same time relative to the previous entry price exceeded the profit threshold parameter price is exceeded and the EntryTrigger is asserted at the same time Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 133 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Profit OR Trig Re enters a trade when the dollar profit threshold relative to the previous entry price is exceeded or the EntryTrigger is asserted at the same time Unknown re entry status because the trade database was created using the TradeSim dll Met
143. Hides all columns o Check All Displays all columns o Basic Log P E Displays only a minimal amount of information Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 185 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 o Default Log P E Displays a typical amount of information UO Display Rows This radio group allows you to control which rows are displayed or hidden By default both trade entry and exit are displayed however if you are only interested in viewing the trade entry or trade exit entries then you can select the appropriate option O Font This radio group determines the font used in the Trade Log o Small Uses Small Font size 7 o Medium Uses Arial size 8 o Large Uses Arial size 9 Jump to Trade Entry Exit Clicking on this menu item jumps to the matching trade entry or exit condition and brings the trade log entry into focus This can also be achieved by clicking on the j key Select all trades in the Trade Database Clicking on this menu item selects all trades in the trade database manager that have been used in the current simulation and then brings the Trade Database Manager window to the foreground Locate in Trade Database Clicking on this menu item locates and selects the corresponding trade in the trade database manager and then brings the Trade Database Manager window to the foreground Highlight all
144. Indices Sectors Click OK and TradeSim will scan all directories below for any MetaStock index master files Displaying all securities in a folder You can display all securities in a folder by selecting a master file from the master file list and then clicking on Display Securities in Selected Folder D Shares Au AS2 T O x nder Symbol Name i Stat Date End Date l 1 TBL JD GLOBAL LIMITED 02701 1998 2671172003 2 TAB TAB LIMITED 22 06 1998 21 06 2004 3 TABIDH TAB LIMITED DBAJNO4R 1010 2003 02 06 2004 4 TABODH TAB LIMITED DEAJN OJH 02706 2003 02 06 2003 5 TABEMG TAB LIMITED MOBEND WMT 21712 19993 21706 2004 E TOL TAB QUEENSLAND 16711719993 03 7272002 r TAH TABCORP HOLDINGS LTD 26708 1994 21 06 2004 g TAHIZ TABCORAF HOLDINGS LTO ABNJNO 09 10 2003 16 06 2004 g TAHIZG TABCOAF HOLDINGS LTO ABNMY 24 10 2002 27 05 4004 10 TAHIZA TABCORP HOLDINGS LTO ABNOC 20706 2001 08710 2002 11 TSHIAS TABCORP HOLDINGS LID ANAZINO 2770672001 18706 2003 12 TAH WAC TABCORP HOLDINGS LIDANZOC 11704 2002 24 10 2002 13 TAHIFD TABCORP HOLDINGS LTO BNPDE 11701 2002 13 12 2002 14 TAHIFA TABCOAF HOLDINGS LID BNPSEO 187 1272001 oF 05 4004 x Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 213 http www compuvision com au Last updated on 26 March 2009 List all symbols You can list all symbols in all of the security folders by clicking on List all Symbols 2 All Securi
145. LAT 1668 i 2h pais Fls Long SPF OSf01s1989 2001s a9 3410 13023 15 00 Eb E6 Long CTs ET BB 1 BAB Be Row ti 3196 Eimi ii we Lorg ANZ OSf011S89 01027159 4410 5 0375 54500 281 Fl26 Long AAG VT iai Be ENE eno ea gair S29 Long IUJ T2011 aS 09 08 1359 2 7000 2 Shar 12000 18 52 Ta Bs 27007 9 ie Hawi Hath 0400 pai Log Window first click the right mouse button over the appropriate record in the Trade Log Window and then select the Locate in Trade Database menu item Trade Log Window B e No direct link exists AAEE between the Charts and the Trade Database Windows To cross reference a point on the re chart to an entry in the SOME Be nd a trade database you first CIE need to jump to a record O T in the Trade Log and E a then jump to the ee sim corresponding record in EEC Edi Ac E EEE T TE T ETN the Trade Database ea HH TET OD Ewi Long Da3 aaO HOT PLETI P Ei ng Iaa His ae MIS ET Sar a sie ahii Aam GRAO Grm ALTA RI A bi directional link exists between ESS the Charts Window and the Trade Ban e Log Window oe s 1 Tojump to a record in the Trade Log from the Charts Window just double click the left mouse button on the chart window when the chart focus is over the correct point 2 Tojump to a point on the Charts from the Trade Log Window click the right mouse button over the record in the Trade Log and select the appropriate chart ee ee from the Locate in Chart
146. Lons Trades Only vsssccsssessccccesasiesiessecessacacdsaccedasaceasaiiietsedaccnsasncesednedsdecsaueasavescdacaneatt 280 Example 2 Short Trades Oniy sicsesovesessssuarsavestveaesiricecizsaeesaeasaceediseutuensrsaesesen saan saeversaseayaeavueniseaes 280 Example 3 Long and Short Trades sssseccecccccccosssssssssssscececcococosssssssssseececocoocssssssesssseseseseoso 281 APPEND GC naer E EE 283 Implementing Volatility Trailing Stops the Correct Way sscccccssssssssssscsscccceseeeees 283 POPP BINDING cc cx sistessecesssoncavstaivenctsssccaistssvecedssenceuseaisescisssecssssnsseseissspoonieviaesonessecesstasveseiess 284 Statistics and Frequency Distributions ccssscccccssssssssssccccccccesssssscccccssssesssssccccoess 284 Relatie Fre CIN censor A a R 285 APPIANO E oprao AOO 287 The Universal Text Trade Database File Format P E ssceeossssseecossssecocssseccosssseeoossssee 287 APP NDD E ee E E E E A S 288 Exporting the Reports into Microsoft Word and EXCel cccccccsssssssssccccccceeeees 288 Copyine mto the Cipb ardsssaisa iiair aaaea 288 Pasion mO AN Ord saei O ENEAS 289 Padon OE ee T a E E er ee eee 290 Exporting he CODON Sessea aa iTO a iaaa ANAS 292 Exporting the reparis to Excel orense EEEE EENE EROE E eaei 293 Comparing simulation reports in Excel sssssssseecccccccccsssssssssssssecececocoosossssssssseececececososssssessseeee 294 APPEND Ores ennen rO OEE RESE EN O E E RRE
147. Loui Sor Oa Hatt serrie E E A EE ET EEEREN 195 Q Total Equity Scale sasias ce cncssaicesaratinarsiagbiccen teed biseeiiiacs han ence anda oa Tes 195 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 15 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Weekly Profit SRO occ ccscesccecceccessssssssssssesseeseessussussusessessssesssseussesesseuseuseueenees 196 Weekly Return 4098k ttn cept ent sa ececteeret ine ee nce acne ae taceeceacSe tated ceesase ence tnedancecoe 196 IVT Ey EO cee bana E team eceneeeeeamiaasicsae adecntecmoiccan aaeccmscacenienteeaneecsnecntees 197 IVI CIN UNG El A ccae eceaeatendenesaceaedestacanteaaeeaeaeateuaenbiaeneeteseccauteaa cecaeanaetenacteeteunet eneneattotcudeteceeneesnercanete 198 be PO ace gare tances ce ts ence eee eels decade E E A A A T 198 Pie Ay UUM scene cecceesecteccanecaasemsecpsccaneee A E 199 Relive Te ay yy ta Chon AP E aera eee ees eee eae et meer O 199 Coderwaer 0 6 11 PE ener nn ent ane een me ored enn eens cy eRe ca ny Seer nen eer 200 Capital ln Trades Chart TPE 2 2 5 lt 2sescesbinnaauseanaucaneapsecebeataadasdeneaduabandenseecseaneadaseuasueaeeeneuceeecesnceacataccale 200 Reward Risk Ratio Chart P E Procene onh enaa e AREE tan AEEA AAEN ARRET EAEEREN 201 Winning Trades Chart PE bayonne nren EEE EEEE S E EEEE E EE T EE 201 bosne Tase EE a T 202 Portolle Heat Charis 4P E erea me enna nee esa Ne ay Sean REC Ae ana ane eer 2
148. NT Uy MLO TD AON oases sree es aaa esc co reenact satan oa nase ranean E ean ees E aaenaes 212 Displaying all securities in a TOMGST a5 ec edceeek santa recodiete ce saute seca liwcs scedcesecodeceeksaetedeonsPendeceinceivenstetsScanxeel 213 Errai SM eect acted ees ase ete ecient deete cee ects ace cease Sete ata sae sees cedar dnmeeteeaeeerees tee 214 Displaying Trade Data on a Security Chart E cccccccccssssssssssssssssssccsccccccccsscsseessssssssssscees 214 From the Trade Database Manager au ccccessssssssssssecceecceeeeeeceeeececeeeeeeeeceeeeeeeaeeeceeaseeeeeeeeeeeeeeeeeeeeees 214 Ponne Bb e 0 Laemeereee nMr nee nee E E UI eee atian ee ar ae eT 214 US ey AAI ea E E E E 215 IS ia TOOD a A A E A 216 E LOO i E N E R 216 E ZN E E E AE NEEE AEEA AEE NEE 216 E PE E a PMN AP E A EE A E P E E E E A E PT E E E 216 E Nay Zoom rade ENCIS eesmine aE ENEE EA EAE EA 216 at a T E Automatically Resize Price Chatt girs cieuctszaxacasurencheatiunndtsnarwests tanto rundioana ener eicemmmiicnatalts 216 ili E Automatically Resize Volume Chart c cccccccssccesssecesseecesseecssseecssseeeesseceesseceesseceesseceeseecesssesenaeeess 216 E Horizontal Price Grid sccsccsssssssssecscssssessssseesessssecssssesesssvecesssscessavesessusecssssesessusesesssesessssssasusessasasesesseees 216 E E Vertical Date Grid ececsscscccssecscssssesesssecsesssescssevecessusccsssvesessusecssivesssusessssusesesssesessuvessssuessasuesssssneesssneeeen 216 ON E Display
149. No Time Stop No Pyramid Trades rez Trigger Type Profit Masimum Level 100 Profit Threshold 0 03004 l Profit Threshold Detection Type Profit Threshold based on ExitPrice File Control Append Trades No Suppress File Processing Mo Disable Open Trades Mo Debugging Return Into Type Return Trade Tally El Show Chart res i Symbol CML Name COLES MYER LTO ORDINARY l Position Long J Extended Data Trade Rank 0 0000 Paint Value 0 0000 Initial Margin 0 0000 Transaction Cost 0 0000 5 x A plus sign indicates that the tree can be expanded by clicking on it A minus sign indicates that the tree can be contracted by clicking on it A green bold heading indicates that the top level parameter has been enabled and by expanding the tree will reveal additional parameters which are used by the RecordTrades function A red bold heading indicates that the parameter has not been enabled and that the additional parameters revealed by expanding the tree will also not be used by the RecordTrades function Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 59 Final Release Version 6 4 1 Entry and Exit Price Restrictions The following diagrams illustrate the limitations and restrictions on the Entry and Exit prices Bear in mind that it is desirable to restrict prices to the ranges indicated
150. PEG Image A Test PSMiComposite Report jpg 91 KE JPEG Image A Test PSMiComposite Reportt1 ipg 41 KE JPEG Image e l Test PSMiComposite Report jpg 91 KE JPEG Image Z MACD crossoveri Monte Carlo Reporti TST 7 EB Text Document MACD Crossover Monte Carlo Reporti HTM MACD Crossover Monte Carlo Reporti RTF My Documents Deskto p ZO KB Navigator Docume 13 KB Rich Text Format F 4 File name Zu My Network Lar Open E Places Files of type maa al I Merosoft Excel Hes Ca aM dt htm Hm Favorites Microsoft Excel Files xt xls owlar oodt slo sl Web Pages htm Atm Text Files prn EEF oy dane Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 293 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Now select Delimited as the data separator Text Import Wizard Step 1 of 3 x The Text Wizard has determined that your data is Delimited IF this is correct choose Mext or choose the data type that best describes your data riginal data type Choose the file type that best describes your data ir Delimited Characters such as commas or tabs separate each field Fixed width Fields are aligned in columns with spaces between each field Start import ak row l File origin windows KANSI Preview of File C Trad Equis Bollinger Ban
151. Page 111 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note When using rank to prioritize trades with a given entry date it is important to enable the Trade Rank sorting option in the Trade Database Loading Options in the global preferences This will sort the trade list in the trade database manager so that higher or lower ranked trades appear earlier in the list thus assigning higher precedence over other trades of a given entry date It is also important to note that using Random Walk or running a Monte Carlo simulation invalidates the ranking priority of the trades since the trades will be randomly arranged when a simulation is run Example The following example uses the All Ordinaries Index to assign a ranking value to each trade It requires Version 8 and above of Metastock or Version 7 and above of Metastock Pro which provides the Security function If you don t have the Security function in your version of Metastock you can use the one built into the TradeSim library XAO Security C My Metastock Data Au ASX X XAO Close ExtFml TradeSim SetVariableTradeRank XAO Using the Security function built into the TradeSim library XAO Security TradeSim Security C My Metastock Data Au ASX X XAO Close ExtFml TradeSim SetVariableTradeRank XAO Example The following example is the complete trade database exploration code for an MACD trading system which
152. Price3 Entry Price InitialStop3 Initial Stop ExitTrigger3 Exit Trigger ExitPrice3 Exit Price CONTINUE Trade Recorder Control rem ice ee eee Trading System 4 s 4 2e s 47 EntryTrigger4 Entry Trigger EntryPrice4 Entry Price InitialStop4 Initial Stop ExitTrigger4 Exit Trigger Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 75 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ExitPrice4 Exit Price Tally Tally ExtFml TradeSim RecordTrades ae Trade Data Filename LONG Trade Position Type EntryTrigger4 Entry Trigger InitialStop4 Initial Stop ExitTrigger4 Exit Trigger ExitPrice4 Exit Price CONTINUE Trade Recorder Control Tally adding this line will display the correct number of trades written to the trade database Note that only the first reference to the RecordTrades external function has the Trade Recorder Control parameter set to START In subsequent calls to the RecordTrades function the Trade Recorder Control parameter should always be set to CONTINUE This allows additional trade data to be appended to the existing trade database file without overwriting existing data The first reference to the RecordTrades function opens or creates a trade data file and generates the first set of trading data Generating Multiple S
153. Pty Ltd All Rights Reserved Page 139 Last updated on 26 March 2009 Final Release Version 6 4 1 Method B Select the trades directly from the trade database manager In this method the starting and ending entry dates will be selected directly from the trade database manager Scroll the trade database manager down and select the first trade with an entry date of the year 2000 Right click on the trade to select it and then click on the following menu item Set Entry Dates Set Start entry date to this trade entry date ini xi fate al lo J po embe T Emppae EstDae Lee Bas Dos viisist Ery Pice pari O Long APN 04 01 2000 check Allentves 3 30 0000 35000 3361 0 Long CTX 0420172000 4 Uncheck All Entries 28 0 0000 2 4800 2 39 0 Long GTP 0420172000 Sheck Higmighted Entries 40 0000 44 4000 4 100 0 Long HL 0420172000 Uncheck Highlighted Entries 1 0 0000 3 4700 3 30 0 Long PEL 040172000 Set Entry Dates Set Start entry date to this trade entry date 1 461 0 Long PRI Up U Set Stop entry date to this trade entry date ai a 25 D Long STO 040172000 Elor Coding ioe 4 220 0 Long ADS 05 01 2000 Export Trade Database PTO epee be AAL 0 Long NEV 05 01 2000 ies nee een nna 2 0 0000 3 1890 3 060 0 Long WPL 05 01 2000 Broperties 1 0 0000 11 3600 11 10 0 Long ADB OG 01 42000 j a 0 0000 45 2300 5 180 0 Long CAA 0770172000 Display Trade on Chart H 3 40 0000 41 9600 2 06 ci bond GD on 42000 Di
154. Pty Ltd All Rights Reserved Page 206 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Global Parameters Update Manager Security Information Hiscellaneous Chart Preferences Equity Chart M Display Total Equity Scale Date Filte f Display All Dates C Display Date on the first trading day of the week C Display Date on the first trading day of the month Closed Trade Charts Open Trade Equity Chart Time Scale Abreviated Time Scale C Linear Time Scale Common Parameters The following parameters apply to both Closed Trade charts as well as the Open Trade equity charts O Equity Charts Controls the way the Equity Charts are plotted o Display Total Equity See Total Equity Scale Q Date Filter Controls the frequency at which dates are displayed on the date axis of a chart o Display All dates Attempts to display all dates as long as there is enough room to display them o Only display date on the first trading day of the week Attempts to display the date only on the first trading day of the week and only if there is enough room to display it o Only display date on the first trading day of the month Attempts to display the date only on the first trading day of the month and only if there is enough room to display it Specific Parameters The following parameters apply to the Closed Trade charts only O Time Scale This option selects which time scale to use
155. Risk or R multiple ratio Average negative reward risk ratio Ideally for a trading system with a 1 R maximum risk this figure should average out to around 1 If this figure exceeds this by a considerable amount then you may have to investigate the cause which could be due to excessive slippage at exit or too many trades closing well outside the money management stop Relative Drawdown parameters Relative Drawdowns are retracements in equity from previous equity highs in short losing periods Relative Drawdown is calculated using the following algorithm Scan across the equity chart for rising equity The point on the equity chart at which the following point is lower becomes the equity reference peak and is assigned a zero value on the drawdown chart For each of the following points on the equity chart that is lower than the previous equity point the percentage reduction in equity from the reference point is calculated and plotted on the drawdown chart When the following equity point is higher than the previous point this indicates an equity reference peak and the drawdown chart is reset to zero again and the whole process is repeated Ideally we would like to have no drawdown in equity but in reality this is part and parcel of trading There will be periods where traders experience a string of losses that outweigh any recent gains The main implication of drawdown is the psychological effect that this will have on the trader A large string o
156. SMParml BHP 100 100 risked per trade for BHP trades ExtFml TradeSim AssignValue PSMParm2 BHP 50 50 position value limit for BHP trades ExtFml TradeSim RecordTrades ExitPrice Exit Price Test PSM Trade Database Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Optional Initial Stop ExitTrigger Exit Trigger START Recorder Control Provisional Trades and Signal Ranking using TradeSim lt 3c gt Please see document AN 6 for a complete discussion of Provisional Trades and Signal Ranking IncludeAllSignals 30 Please see document AN 6 for an indepth discussion of using this function Provisional Trades SG Please see document AN 6 for an indepth discussion of using this function SetVariable TradeRank ExtFml TradeSim SetVariableTradeRank ValueArray Please see document AN 6 for an indepth discussion of using this function This function assigns Trade Ranking based on the ValueArray parameter This allows additional scope in assigning trade rank values unlike the Assign Value function which only allows a constant rank value to be assigned to a symbol so that every trade can only have the same rank The ValueArray can be a numeric constant or can be any numeric or Metastock formula expression The value assigned to the rank Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved
157. See the section on the The TradeSim Function Library for more information o Profit Stop Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 134 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 This type of trade exit was caused when the SetProfitStop external function was used to force a trade to exit after a certain profit threshold has been reached See the section on the The TradeSim Function Library for more information o User Exit i By using exit encoding it is now possible to assign a user exit status to each exit trigger thus allowing one to distinguish between different exit triggers when you load the trade database into TradeSim You can assign up to 16 User Exits which will appear in the Trade Database Manager and Trade Log as User Exit nn where nn can be any whole number from 1 to 16 n Column Traded Volume This Column which displays the Traded Volume is the minimum of the trade volume at the time of the entry and exit triggers TradeSim can now use this information to determine whether or not there is enough traded volume for the trade to be taken Note If the trade database does not contain volume information then a dash will appear to signify that the volume data is not present All trade databases generated with the latest MetaStock Plug In will contain volume information QO Column Trade Rank In this column the trade rank is assigned t
158. September rsplit eel4 gt 6 For Help press F1 2070172000 21 3353 ae NUM a Created with MetaStock by Equis 2001 As can be seen from the expert there are a number of trading candidates Now we need to record these trading candidates so we can analyse them later using TradeSim We do this by using the RecordTrades indicator that we have just created and overlaying it in a separate window above the main chart As we overlay this indicator an internal process writes all of the trading data to a file called MACD Long Example trb which is located in the default data directory The trb file uses a compact binary database format that is used by TradeSim Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 63 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 MetaStock for Windows TradeView Examplel mwc BROKEN HILL 19 0200 0 5200 Daily BRIE File Edit View Insert Format Tools Window Help 8 x Dee Sa amp a Ka e A E Tradeview Example1 x a fo amp B gh h d E TradeView Examplel ojx gS 8 8 E 7 7 6 6 BE 5 5 4 4 3 3 2 2 1 1 w a 0 A Pan ojx E 22 0 22 0 Mi 21 5 Se ini MACD D z 21 0 cai 21 0 20 5 20 5 200 f h SelSianal siisige l i e 0 0 19 5 Nt qehi l yi i Sind Pf _ 19 5 19 0 h MACD MACD i Lit o aco i ae t 19 0 S K Siggali ignal jl WL gl Biy Sign
159. Set Entry Dates gt Reset Entry Dates Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 140 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The Trade Database Inspector 433 Sometimes it is not possible to see all of the columns in the Trade Database Manager To facilitate this you can switch on the Trade Database Inspector which displays all of the trade data for the currently highlighted trade in the trade database manager To switch on the Trade Database Inspector right click on the Trade Database Manager and select Trade Database Inspector from the popup menu iix eT Sie E FOE SE E Die eet et a PE 23 08 2000 24 08 2000 24 08 2000 ntl e O O oO oO Long Te we Gheck 4ll Entries Uncheck All Entries Gheck Selected Trade Entries Uncheck Selected Trade Entries Select All Trades Invert Selection Set Entry Dates Color Coding Export Trade Database Show extra price information Properties Display Trade on Chart Trade Database Inspector Load Table 08 03 2000 WES i 14 nav2nnn Start Entry Date 23 08 2000 Stop Entry Date 10703 2003 D BE DO O DOO GOG G G ODODO O CGO OG O DO OG O a 24 08 2000 29 08 2000 29 09 2000 29 09 2000 28 08 2000 27 09 2000 03 10 2000 09 10 2000 04 10 2000 29 09 2000 11 09 2000 27 09 2000 10 10 2000 18 09 2000 06 10 2000 09 10 2000 03 10 2000 28 09 2000 02 10 2000
160. TA R 234 m E a A E E A T O EE O E IAA EE O shecuseteecdenemmenatariees 234 E R eE Oe ee eee 234 a a R R E T NE cucsccas ered tnssrnonem eencie gonueeet 234 FM A 0 LO aa E E E T 234 Ee RR 0261 o a E EEE EEE E er EE E AETA E EAEE EAE AAN 234 Q Maximum Relative Drawdown cccccccccccsscceesseceessccesscccesseccesseecsseecsssecesssecesseecesaeeceseceesseceesseceesaeceesaeeess 234 Sorina Ne COMINS reie ae Se Sw ee a Nr eee ee 234 Expornne he Simi atO mt 150 0 ea can scaae cameacaneiecmtencdamensdedenansncammaccoeneecnens 234 Statistics Summary Report T aM sccsccscsscscesecscesssccacccnicatsesnacccesssecasescesaastswecasucecsecasdanecsenssevasaxeseneseas 236 Repor DGS Cr OM es E 231 J Simulation Summa yeca akaa aA AEA EAA EENAA AAA A ENANAR ETAN KENNA EEA 237 O Trad Parameters and Preferentes csccacinns sates jnantancoasesdatiavaceuladwwnideudnen ated wud seas ETERA SA SAKSAN 237 Q Simulation Stats eee ete ee eee stts eee EEES SEAS SESSE ee esseere nene 237 E POR AUS a e E E E E E E E ss 237 E SW mone Trade DAD seesinane E E S A E AE 238 G 3 Losme Trades A ceca oe ai eae incepta ian aTi SNE E EENE INAANO EN ARROA EEA A 238 My a a E EE EN E ane E EE EEE 238 Epor o ie E PO ea E E ee eee 239 Statistics and Frequency Distributions cccccccccssssssssssssssssssssscsccccccccssssesssssssssssssscccccsssseees 239 PPE OCIS CEM NUN IA aa T N ous casnsava teas sas taser oansevs asses 239 Wiara We lookin TO gener ene earner re eee n
161. The Fixed Dollar Risk Position Sizing Model cccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 148 ED aT ISO iS osrin an E AN AA AE AAA AAAS 148 Bm e te L a AEO 148 w Ponoho Hedes a Uantene netet Rent enn es raeerer en at Rre nt tte here inner eny erty 148 4 The Fixed Percent Risk Position Sizing Model ccccccsceccccececeeeeeeececeeecceeeceeeeeeeeeeeeeeeseeeeeees 149 Ly Fraction of Capital Risked per TAG 6 sos cccccdssnersdeencansionansudeoasvsuadesasevansnascnepeawdievaceisaceraestanwascsnsiaadseanstorsedosaee 149 LI Position Value Size Limit ccc cccccccssccecseceessecesssecesssecesseecesseecesseccsssecessecesseecesseecesseceesseceesseceessecessaecens 149 BL Poo 1c eee et mre eee eee ene nee cere ny renee nar mre ee ee eee eee 149 5 The Fixed Dollar Volatility Position Sizing Model ccccccceeeeeeseeeseseseseeseeeeseeeeeeeeeeeeesseeeaas 149 I Capital Assigned to Trade saos cesseysicaunnansineshionnnnsnin satediwavasiiesionesielsanincaadediusatensteanndassnutvanshnabatadeaiannuanovienwadsayneuaionss 150 E POI yae Size LIT ana A 150 6 The Fixed Percent Volatility Position Sizing Model ccccccceseseesesseseeeeeseeeeeeeeeeeeeeseesseeeeas 150 LI Fraction of Capital Risked per Trade ccccccccscccessccesssecesseecesseecsseccsseeecssseceesseceesseceesseceeseeceeseeeesaeceeasecess 150 G POSTON Are 1 AN da ected act E SE 150 Saon Type saia EE aaa 150 Sea e E E ES 151 Te rn Or
162. Tools m E Horizontal Zoom In Expands the chart in a horizontal direction O 5 Horizontal Zoom Out Contracts the chart in a horizontal direction m Reset Zoom Resets the chart zoom so that the whole chart contents are displayed within the confines of the chart pane O afi Toggle 3D Attributes Toggles between standard 2D display and 3D perspective display mode Q Export Chart P E You can export the chart graphics and information in a variety of formats Please refer to Appendix G for more information regarding this feature Detailed Statistics The detailed statistics window below the chart mirrors the information contained in the Trade Statistics Table As the chart focus is moved across the chart the detailed statistics window is updated to show detailed statistics for the security Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 176 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Advanced Chart control using the Left and Right Mouse Buttons The left and right mouse buttons offer advanced control over the display of information in the security profit chart windowpane The left mouse button supports horizontal zooming of a user defined window whilst the right mouse button supports horizontal panning of the chart pane The operation of the buttons is described in more detail below Note The security profit chart can only be panned and zoomed in the h
163. TradeSim answers the simple question What would have happened if this system had been traded in the past using an arbitrary portfolio of securities Sounds simple but is extremely complex if not impossible to do with MetaStock as it stands However with TradeSim it is just a simple matter of running a MetaStock exploration on a portfolio of securities using your own set of indicators When the exploration has finished you just simply run TradeSim and analyse the resulting trade data With TradeSim MetaStock becomes more powerful than it ever was even rivalling trading packages costing many thousands of dollars You are probably not aware that to approach the functionality and power that TradeSim adds to MetaStock you would need to spend many thousands of dollars more than the combination of both packages put together Even then competing packages fall quite short when it comes to analysis power and options as well as simplicity of operation TradeSim was built right from the ground up with with the professional trader in mind TradeSim dispels the myths of indicator performance Your system may look good with an expert overlayed on a single chart But what about its real world trading performance Typically your system will consist of entry and exit triggers and prices as well as an initial stop loss These five parameters basically define a framework for a trading system The trouble with trying to back C
164. a Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 156 Final Release Version 6 4 1 O Entry Order At Stop This option enters the market at a stop price The stop or target entry price is defined by the EntryPrice parameter in the RecordTrades function and a random algorithm determines the actual entry price If the actual entry price is equal to or worse than the stop price then the trade is taken otherwise it is rejected If the Unconditionally Enter Trade option is enabled then the price is adjusted so that the trade is always taken The slippage is defined as the difference between the target entry price and the actual entry price See the following diagram or summary table for more details Target Entry Price ET as defined by the EntryPrice parameter in the RecordTrades function Stop Order Trade Entry High EH Valid Actual Entry Price EA Range on the Long Side ET lt EA lt EH Valid Actual Entry Price EA Range on the Short Side EL lt EA lt ET Low EL O Entry Order At Market This option enters the market at a price that 1s determined by a random algorithm In this case the entry slippage is defined by the difference between the target entry price and actual entry price The actual entry price 1s always limited to fall within the high and low range of the day See the following diagram or summary table for more detai
165. a group of trades with the same entry date If your trade data has groups of trades with identical entry dates then a random algorithm will randomly choose the trades from a group of trades with the same entry date If your trade data has trades with unique entry dates 1 e there are no groups of trades with the same entry dates then this option will be grayed out Single Simulation dates ignored When this option is selected a simulation causes every trade selected in the trade database manager to be taken irrespective of date The trade entry exit dates are ignored and each trade is taken serially and consecutively As a result only one trade position will be active at any one time This mode of operation is unrealistic in practice and has only been included mainly for academic purposes Depending on the trading system and position size model used trade simulations using this mode of operation can sometimes produce astronomically and unrealistically huge profits Basket Test Selecting the Basket Test option from the simulation radio group on the Trade Parameters page will allow you to carry out a basket test of all of the securities that have been selected in the trade database The basket test simulation option allows you to test all of the selected stocks in a trade database independently of one another thus allowing you to objectively compare the strengths and weaknesses of individual securities When running a basket test profit pyramidin
166. ability of Profit This value represents the probability that this trading system will yield a profit It is calculated by taking the ratio of the number of profitable outcomes to the total number of simulations and is expressed as a percentage Ideally one should aim for a 100 probability of profit This means that no matter what securities are chosen the system will always be profitable A 50 probability of profit means that the odds of achieving a profit with this trading system is 1 to 1 or equivalent to the outcome of tossing a coin It should be noted that this figure does not give any indication as to the size of the profit but rather it is an indication of the trading system s potential to yield a profit Probability of Loss This value represents the probability that this trading system will yield a loss It is calculated by taking the ratio of the number of losing outcomes to the total number of simulations and 1s expressed as a percentage Ideally one should aim for a 0 probability of loss This means that no matter what securities are chosen the system will always be profitable O Winning Trade Stats O Average percentage of winning trades This is the average value of all of the values in the Winning Trades column of the Simulation Log ime percentage of winning trades This is the maximum value of all of the values in the Winning Trades column of the Simulation Log Minimum percentage of winning trades This is t
167. able in the long term simply because it has a positive expectation Although a trading system with two possible outcomes is a rather over simplistic Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 29 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 view of a trading system Van Tharp in his book Trade your way to financial freedom3 explores this concept in much more detail Designing a Holy Grail Trading System Before we talk about Holy Grail Trading systems we should emphasize the following point 66 othing and no one can predict the future movements of the markets If anyone tells you otherwise then they are trying to mislead you It is amazing how many traders using technical analysis think that it is a substitute for crystal ball gazing Some traders go to great efforts seeking the Holy Grail of indicators in order to outwit the markets there are none At best we can only talk in terms of probabilities and not absolutes What we are looking for is a way of giving us a market edge so that the balance of probability is in our favour whether or not we are trading in unfavorable market conditions This does not mean that we need to be concerned about exactly what trades will be profitable and what ones won t be As long as the losses are constrained with good money management strategies what we can be assured of is that in the long run we can be trading with a r
168. ade Database Simulation Log cannot be included in the report Composite Report loj x Construct Report Pritt en Select All Eopy Selected to Eliphoard Export E B Trade Simulation Report E Performance Summary a E Pat Securty Profit Distribution O AM Pot Trade Profit Distribution M Charts Closed Trade M EE Equity ly T FE Equity oo BSF weekly Profit j Ft Weekly Retur A EE Monthly Profit T FE Monthly Return 5 EE Yearly Profit an F Yearly Aetum 2 Pt Rel Drawdown Sr s Underwater Equity pee E tet Capital in Trades YB Winning Trades 7 E Poot Losing Trades oo BS Number of Trade Positi Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 268 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Once you have selected the appropriate charts and reports click on the Construct Report button NOTE The size of charts in the composite report will be proportional to the size of the chart window For smaller charts just shrink the chart window to the appropriate size before you click Construct Report i Composite Report O x E B Eonstruct Report Print Preview Select All Eopy Selected to Eliphaoard Export E V Trade Simulation Report Performance Summary Report go E Trade Parameters ee mM f Detailed Report Trade Database Filename vi S Performance Summary peen M PE Security Profit Distribution
169. ade occurs Maximum Consecutive Losing Trades The maximum number of consecutive losing trades before a winning trade occurs Average Consecutive Winning Trades The average number of consecutive winning trades Average Consecutive Losing Trades The average number of consecutive losing trades Trade Expectation Stats Risk based PS models only The following trade statistics are only available for risk based position size models such as the Fixed Dollar Risk model and the Fixed Percent Risk model Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 168 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Expectation per dollar risked This represents the normalized trade expectation and is expressed in the number of dollars returned for every dollar risked Maximum Reward Risk ratio or R multiple For risked based position size models this parameter indicates the maximum or most positive reward risk ratio that was detected during a simulation Minimum Reward Risk ratio or R multiple For risked based position size models this parameter indicates the minimum or most negative reward risk ratio that was detected during a simulation Average positive Reward Risk or R multiple ratio Average positive reward risk ratio A high average R multiple is usually a reflection of good money management principles and the use of a trailing stop loss Average negative Reward
170. ader B and both traders could come up with a completely different set of results even though they are trading the same trading system over the same period of time To understand this aspect more closely consider a trading a system that generates entry triggers for six securities on the next trading day Due to available trading capital limits only two of these six possible securities can actually be traded Which two of course depends on the trader trading the system Two traders trading the same trading system will most likely not pick identical trades on the day In the case of the Trade Simulator the two trades picked will depend on the trading algorithm in the simulator and the way it has been set up Once two of these trades are entered the others can be thrown away since the entry triggers are no longer valid after that day This also explains why all of the trading candidates in the trade database cannot possibly be traded in each simulation However the Professional and Enterprise Editions of TradeSim allow a random selection of securities from a group of securities that have the same entry date thus modelling the variability of a trading system when trading with a portfolio of securities This is a very important aspect that is usually overlooked when back testing a trading system since most back testers are usually limited to the analysis of one security alone The next Chapter on Advanced System Testing using the TradeSim Enterprise Edition del
171. ades On the Trade Database window click the right mouse button and a popup menu should appear This popup menu contains procedures that allow quick selections to be made O Check All Entries P E By clicking on this item all of the 1tems in the Trade Database list will be checked whether or not they were checked before Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 137 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Uncheck All Entries P E By clicking on this item all of the 1tems in the Trade Database list will be unchecked whether or not they were unchecked before Note that you must have at least one trade item checked otherwise you cannot run a trade simulation O Check Higlighted Entries P E If you have highlighted multiple trades then selecting this menu item will check each highlighted trade item whether or not they were checked before Q UnCheck Higlighted Entries P E If you have highlighted multiple trades then selecting this menu item will uncheck each highlighted trade item whether or nor they were unchecked before Example In this example we shall remove all of the AUN trades from our list by following these steps 1 Sort the list by Symbol by clicking on the Symbol column header 2 Select and highlight all of the AUN trades 3 Right click to bring up the popup menu and select the Uncheck Highlighted Entries menu item Hint Th
172. ago are still in existence today Alternatively if you choose a portfolio today which consists of currently listed securities then chances are that quite a few of these securities did not exist 10 years ago and some securities may have only been recently listed and therefore the effect of these securities on a simulation will be minimal compared to a security that has existed throughout the whole testing interval Some companies may go out of business in which case they are delisted or they may have a name change and excluded from the portfolio after a certain date just by virtue of the fact that data is no longer produced for the defunct symbol after a certain date The RecordTrades function does not understand this and only operates within the bounds of the security data that is supplied to it from the MetaStock exploration The consequence of this is that as securities get dropped from or introduced to the portfolio the trading results will be biased towards the securities that have existed the longest in a portfolio list and thus the trading results become biased in favour of the longest surviving securities hence the term surviviorship bias This in itself may produce erroneous results if this was not intended for in the first place Whether you make up your own portfolio or chose to use a predefined industry list such as the ASX 200 All Ordinaries NASDAQ or DOW you still face the issue of survivorship bias in your trading results One way arou
173. ailable but I have found there are more bad ones than good ones 26 Technical Analysis of Stocks and Commodities published by Technical Analysis Inc http www traders com 27 Your Trading Edge Text Media Group Australia This is the only Australian trading magazine worth subscribing too Aimed at both stock and commodities traders http www yte com au Websites The following websites are a good source of information and ideas This list is by no means exhaustive There are enough traders and financial websites to fill pages of this manual however I have narrowed the field down to a group of websites which I think are more pertinent to the topics discussed in this manual If you go to the Links page at our website http www compuvision com au you will find many more links dealing with other topics Australian Stock Exchange ASX http www asx com au This website contains a lot of valuable information relevant to the Australian Stock Market TradeSim Forums 3989 We now have our very own forum dedicated to TradeSim issues located at http www compuvision com au phpBB2 Paritech hosts a trader s forum which has a section dedicated to TradeSim and a host of other topics http www paritech com au forums cgi bin ultimatebb cgi Trading Software Equis International are the producers of MetaStock http www equis com You can jump directly to the MetaStock home page at http www MetaStock com Compuvision Australia Pty Ltd
174. al Dollar Units position size model with 5000 dollars allocated to each trade and started with an initial capital of 50 000 and allowed for a total transaction cost of 20 Our first simulation yielded a net profit of 27 93 Although this is nothing to write home about it is a profit none the less What conclusions can we make about this trading system Historically speaking can we conclude that this trading system has always been a profitable one If we were back testing one security then we could be fairly confident with the single outcome since the outcome would be unique that is repeated back testing would always yield the same results However since we are now trading a portfolio of securities this opens up the possibility of selecting many different permutations and combinations of trades that meet our trading criteria Thus we are no longer faced with a unique outcome when trading the system across a portfolio In actual fact the outcome from the first simulation was just one of the many possible outcomes from the many different simulations with each simulation producing a different outcome What about the other possible outcomes When trading with a portfolio of securities most technical analysts don t realize that the trading system no longer produces a unique outcome or that any other outcomes will yield similar results this is because they usually back test their trading system with a system tester that is limited to only one securit
175. al I nat Wah hyj 18 5 I thy Ay f f pi li J tt W 18 5 jia I ue hy t ji hh d Lycee wal betes 17 5 hy b ge hl Ja i j it y Sig Buy Signal 17 5 1704 eae 17 0 16 5 ny h i MACD 16 5 16 0 Huy signal 16 0 15 5 aa 15 5 15 0 MACD 15 0 2000 UL UU x10000 x10000 NN SNEEN AANEEN BRANSON TTNA NEENA AN 1999 December2000 February March April May June July August September November Decembe 200 T ris Dit e 0l4 gt 8 iia a A aaa For Help press F1 20 09 2000 7 9046 as NUM 5 Created with MetaStock by Equis 2001 When overlaying the RecordTrades indicator onto a chart it always looks like an upward staircase with each step corresponding to a trade exit condition This is because the RecordTrades function returns the trade tally as it finds new trades In the above example you will note that the trade tally only increases when an exit trigger has been detected on the long side as in this example This is because incomplete trades will not be logged if an entry condition is not subsequently matched by an exit condition The RecordTrades function will also filter out multiple entry conditions that occur before the exit condition has been reached Closing and Recording Open Trades By default the RecordTrades function closes and records open trades Typically these trades represent currently open positions that have not been closed by a valid exit condition When using the RecordTra
176. al Release Updates from the Web c cccccccccsscceessecesseecesseeceseeeeesseeeesseeeens 123 Q Automatically Check for Pre release Beta Updates from the Web cccccccccsccesseccesseeeesseeeeseeeesseeeens 123 E e heek Or ENON erar A T E ENEO 123 Security Information E SCE eeeeeeeresrerisrerrerisrerierisrerisresrerisresrsresreresn 124 Q Selecting the top level security directories cccccccccsscceesseceesseceesseccsssecesseeceseecesseceesseeeesseceesseeeesseceesaecens 124 A Displayine all Seems in a Tolder iariiostussiresdioioriraiinns irar ia saio EARE RATA EAREN ARORA 126 a alloy nDO e E oectslgseae nines oda Danse 127 Loading a Trade Database file oeeeeeoosssssecccccssssssccccossssssecccoosssssseecossssssssseeeosssssssesssssssse 29 jen a See seen A A AAT A EAE N TAEAE NA AEA A EE TETT 128 SESSO PES saioei aa EETAS EEAS E AAEE EAEAN EAE 129 Craine Session T E eeraa EE E EEEE EEE 130 Using a Session File with another trade database ccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeeess 130 Using the current session with another trade database file ccccccccccccceceeeeeeeeeeeeeeeeeeeeeeeeeeees 131 Te WER AUL ye 6S FON E aE A cent cacecaun E A 131 The Trade Database Manager Window ccccccccssscssssssssssssssssssscccccccssssccccsssssssssssssccccccssssssssoees 132 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 9 http Awww compuvision com au
177. alia Pty Ltd All Rights Reserved Page 169 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 points defines the maximum or absolute dollar drawdown The equivalent percentage reduction in equity for these two points is displayed in brackets Capital Peak Date This is the high point peak value in equity from which the P V Dollar Drawdown is computed Capital Valley Date This is the low point valley value in equity from which the P V Dollar Drawdown is computed Absolute Peak to Valley Percentage Drawdown parameters The Absolute or Peak to Valley Percent Drawdown is the worst case percentage reduction in equity from an equity high point peak The Peak to Valley percent drawdown is calculated by searching for an equity high and low point that result in the largest percentage reduction in equity Note that an equity valley will always follow the equity peak and not the other way around If an equity chart features a continually rising equity curve with no retracement in equity then no absolute PV drawdown will exist in which case the PV dollar drawdown will be undefined Note It is possible or normal for the peak and valley equity points that defined the Peak to Valley Percentage Drawdown not to correspond to the peak and valley points that define the Peak to Valley Dollar Drawdown For example for a given equity curve you could have a situation where the maximum Peak to Valley Percentage
178. alid exit trigger only if there is a profit condition with respect to the entry price Profit Stop Control Functions SetProfitStop ExtFml1 TradeSim SetProfitStop ProfitThreshold This function is used to automatically exit a trade irrespective of the ExitTrigger when a profit threshold exceeds an amount determined by the ProfitThreshold parameter The ProfitThreshold parameter must be positive and is expressed in percentage The profit calculation takes into account which side of the market Long or short the trade has been taken and the profit threshold is always referenced to the entry price When a trade is exited in this manner the trade is flagged in the database and is shown in the TradeSim Trade Database Manager as a profit stop A call to the Initialize function disables the effects to a call to this function For long trades a profit stop is generated when the following criteria is satisfied 100 x XP EP EP gt PercentProfitThreshold For short trades a profit stop is generated when the following criteria 1s satisfied 100 x XP EP EP gt PercentProfitThreshold where EP is the value of the EntryPrice parameter in the RecordTrades function at the point of entry into the trade By default XP is the value of ExitPrice parameter in the RecordTrades function when the above relationship 1s satisfied If SetExitPriceToProfitStop has been called then XP Daily High for long trades and XP Daily Low for shor
179. all of the support programs needed by Metastock in order to work with TradeSim It also contains some example indicators explorations and experts Warning The formula setup program will attempt to overwrite any existing indicators and explorations that were installed using a previous TradeSim setup program so if you have modified the formulas in any way it would be advisable to either make a copy or to rename them If Metastock is already installed on the system the Formula Setup program will automatically be run at the end of the installation However if Metastock is installed and and the Formula Setup program is not run 1 e the system had to be rebooted you can install it at anytime by running it from the TradeSim program directory If you need to reinstall or update the library you will need to run the formula set up program FOsetup exe which is installed in the TradeSim program directory To run FOsetup exe just run FOsetup exe from the TradeSim program menu i e Start gt Programs gt TradeSim gt MetaStock Add ons gt MetaStock Formula Setup then follow the setup instructions lg Metastock Add ons d ii Metastock Formula Setup Manually installing the TradeSim DLL Plugin If you can t get the formula setup to work you can still manually install the plugin by following the instructions below Make sure Metastock is not running Open up file explorer and copy Tradesim DLL from C Program Files TradeSim Plugins To
180. ame column will resort the list in the opposite direction 1 e Z to A instead of A to Z To reset the ordering of the list back to the default just sort the list by the trade index column The Trade Log Preferences You can customize the trade log to only display the information you are interested in This reduces the amount of screen clutter particularly on lower resolution screens that can only display a small part of the trade log at the one time To do this click the right mouse button on the Trade Log window and select Preferences from the popup menu The following dialogue box should appear Trade Log Preferences a xX Stop Loss Stop Loss 74 Exit Status Total Trade Cap Status Max Cap In Trades Pos Cap In Trades Trans Date Fisk Level Fisk 2 9 Days Heat 10 Initial Stop Heat 72 11 Price Position Size Te Actual Price Position Value 13 Slippage PS Status 4 H Uncheck Al Check All Default Log Display Rows f Display All Fon f Small Medium Large Display Trade Entry only Display Trade Exit only Apply M Cancel Display Columns You can control which columns in the Trade Log are displayed or hidden by checking and unchecking the appropriate column checkbox Alternatively you can click on the default set up buttons which quickly set up the Trade Log to display a preset column arrangement The four preset options are described below o Uncheck All
181. an be changed by exporting the trade database file Professional and Enterprise versions only as a text trade database file and then assigning a transaction cost column to the database file and then importing it back into TradeSim again Column Margin Requirement In this column a Margin Requirement value is assigned to each trade If the Use Margin Requirement from Trade Database option 1s checked then only a valid non zero value assigned to the trade will be used instead of the default value If a zero value is assigned to this column then the default value is automatically used Note Trade Database file formats prior to version 5 will have zero assigned to the Margin Requirement column This can be changed by exporting the trade database file Professional and Enterprise versions only as a text trade database file and then assigning a Margin Requirement column to the database file and then importing it back into TradeSim again Column Highest This column represents the highest value found during the trade and is used to facilitate calculation of Maximum Adverse Excursion MAE or Maximum Favorable Excursion MFE Column Date 3s Date at which highest trade value occurred Column Lowest This column represents the lowest value found during the trade and is used to facilitate calculation of Maximum Adverse Excursion MAE or Maximum Favorable Excursion MFE Column Date 4339F Date at which lowest trade value occurred Dy
182. ar Drawdown Stats ccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 263 Q Maximum of the Average Relative Dollar Drawdown 0 cccccccccsscesssceessseecsseecesseecesseeeeseceesseceesseceeseeeess 263 Q Average of the Average Relative Dollar Drawdown cccccccccccssssccsssceesseeccsseecesseceesseeeesseceesseecesseecenaeeess 263 LJ Minimum of the Average Relative Dollar Drawdown cccccccccssceesseceesseceesseceessecesseecesssecesseeeesseeeenseeeens 263 A Deviation sa sexcnsiensarsanssaonsasteonnesdaancaeotensnenssessanaicsanunaeencyunsestua one ceseanersenionae sdandeecetwencasasnntandanaensiomiens 263 Maximum Absolute Peak to Valley Dollar Drawdown Stats cccccccccccccccccccccceceeceeeeeeeeeeeeeeeeeees 263 Q Maximum Absolute Dollar Drawdown iis sicsssnicsisesassesisasevhsnsacdsuavesdasdaysdtsabsbencsenaees sibs ioantoeenanceanayinatancseatiaeans 263 Q Average Absolute Dollar Drawdown cccccccsccecsseceesscecesseccesseecssseccssseccsssecesseecesseeeesseeeesseceesseceessecessaeeess 263 Q Minimum Absolute Dollar Drawdown cccccccscccessecesssecesseccesseecssseccsseecesssecesseecesseeceseecesseceesseceesaeceesaeeens 263 E a0 210 Ml Do Oa A N E A EA A EAAS 263 Maximum Absolute Peak to Valley Percentage Drawdown Stats cccccccccccccccccceeceeeeeeeeeeeeeeeeeees 264 Q Maximum Absolute Percentage Drawdown cccccccccsssccssscessceesseceseceesecesaece
183. are you actually paying for when you hand over your hard earned cash or get stitched up to a finance company I suggest that with no past trading results to back up their claims you don t touch it with a ten foot barge pole I m not saying that these systems don t necessarily work what I am saying however is that any legitimate and ethical seller of a trading system would back up his sales spiel with a proven trading record over at least five years However a proven trading track record will no doubt include several losing or stopped out trades which goes against the Black Box sales spiel of being right most of the time even though being right all of the time is not a prerequisite for a successful trading system nor 1s it realistic as it is tantamount to market prediction Having an infallible trading record makes the black box system more attractive to the naive and experienced traders will no doubt be very suspicious of such claims The unfortunate aspect of all of this is that most punters expect to make money from the markets for very little investment of their own time and effort which is why they are quite ready to part with their hard earned cash in exchange for the promise of a money making machine that does all of the hard work for them Unfortunately such a machine does not really exist and the vendors of these packages make more money out of selling the software to unsuspecting punters than they would if they used their own software to t
184. art shown below now paints a different picture with the distribution chart lying exclusively in positive profit territory This tells us that this system has been unconditionally profitable in the past and is most likely to be profitable in the future 4 l r L l r I k l PS Ts Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 250 Final Release Version 6 4 1 The Winning and Losing Trades Distribution charts shown below now paint a different picture of the trading system with a relatively high percentage of winning trades compared to the losing trades This is why there has been a drastic improvement in the performance of this trading system l l l r I k l l L l l l r l Comments By swapping the entry and exit conditions of the original MACD crossover trading system we have improved its performance quite dramatically from being an unreliable system to a potentially profitable one Note that because we have not included transaction costs the performance will actually be worse than what we have obtained but the point of the exercise was to emphasize the relative difference between the two systems rather than their absolute performance However the important question that should be asked at this point is why should reversing the entry and exit conditions provide such a dramatic improvement in trad
185. assigns the rank to each trade based on a 10 period ATR EntryTrigger Ref Cross MACD Mov MACD 9 E 1 EntryPrice OPEN ExitTrigger Ref Cross Mov MACD 9 E MACD 1 ExitPrice CLOSE InitialStop 0 No Initial Stop used ExtFml TradeSim Initialize ExtFml TradeSim SetVariableTradeRank ATR 10 ExtFml TradeSim RecordTrades Test Trade Rank Trade Database Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Optional Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Recorder Control Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 112 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Problems and Issues using the TradeSim Plug In This article has now been moved to the reference library folder in your TradeSim installation folder Please click here to view this document It is recommend that this be compulsory reading for everyone who uses the MetaStock TradeSim plugin Note If this article is missing it can be downloaded from the following website location http www compuvision com au DownloadTradeSim htm Summary Now that we have successfully generated a trade database file we will want to do something with it In the next chapter we describe the operation of TradeSim and show how TradeSim can be used
186. ast updated on 26 March 2009 Final Release Version 6 4 1 Export Composite Report Dave in E Espos 0 e tall MACD Crossover Trade Parameters TF ft bsm3Qv Detailed Report rtf i MACD Crossover Composite Report RTF E bsm30w Monte Carlo Report rk i MACD Crossover Monte Carlo Report RTF PA bsm30w Trade Parameters rer i MACD Crossover Combined Report RTF A bsm30u0 Combined Report rtf W bsm30wi Performance Summary rtf File name MACD Crossover Composite Report Save as type Rich Text Format rtf Lancel Rich Test Format rth Hypertext markup language file Atm he Text Format bat ce Exporting the reports to Excel When exporting to Excel use the TXT format All reports are exported to the tradesimdata exports directory When loading the exported file into Excel make sure you specify All Files in the Files of Type drop down SS O Look in E Exports ax Tools Type El Equis Bollinger Bands Detailed Reporti TST SKB Text Document D MACD Crossover Composite Reporti HTM o6 KE Navigator Docume cag MACD Crossover Trade Parameters RTF 7 EB Rich Text Format Z MACD Crossover Trade Parameters TST SEB Text Document MACD Crossover Composite Report ATF 18266 KB Rich Text Format Test PSMiTrade Database Coy 16 KB Microsoft Excel To Test PSMiComposite Report HTM 47 KB Navigator Docume Test PSMiComposite Reportis jpg 41 KE J
187. astock plug in prior to version 5 1 0 More information regarding trade pyramid strategies can be found from the following Application Note Column Bars in trade This column represents the number of bars in the trade One bar is always equal to one bar on the chart irrespective of the chart periodicity Column Days in trade This column represents the number of days in the trade Note TradeSim uses the starting and ending dates of each trade to calculate the number of days between the entry and exit dates It does not distinguish between trading and non trading days Column Initial Stop This column displays the optional initial stop It is optional because if the initial stop is zero for all trades then position size models that rely on the initial stop in order to calculate the position size for each trade will be disabled and cannot be selected To use the initial stop value as a money management or hard dollar stop you need to enable this behavior in the RecordTrades function when creating the trade database see previous chapter on generating trade data A non zero initial stop value means that you can use position size models that rely on the initial stop in order to calculate the position size for each trade Column Entry Price This column displays the entry price for the trade that corresponds to the entry date and hence the entry trigger of the trade Column Exit Price This column displays the exit price for the trad
188. at control the position SIZe o Normal The position size is calculated according to the rules of the position size model such that no limiting or resizing of the position size has taken place If position size limiting has occurred then the PS status will be displayed as a combination of any of the following flags o S An S flag will be added to the PS status when the position size has been limited to an amount according to the Trade Volume Limit parameters in the Trade Preferences tab o P If the Enable Partial Trades option is selected in the Trade Preferences tab then a trade whose position value exceeds the available trading capital or a trade whose position size exceeds the available volume will be resized and a P flag will be added to the PS status o V A V flag will be added to the PS status when the position value has been limited to an amount according to the Position Size Limit parameter in the Trade Parameters window Note that position size limiting only has an effect when the risked based position size models are used o R An R flag will be added to the PS status when the Round Lot Size parameter in the Trade Preferences tab is greater than 1 and the position size has been rounded down to the nearest lot size boundary o L An L flag will be added to the PS status when the position size has exceeded an amount specified by the Maximum Position Size Limit parameter in the Trade Preferences tab Column Tran
189. at the trades with the higher trading capital will have much more influence on the result For an unbiased or objective result it is better to use the Basket Tester or use the Average Net Percentage profit figure QO Minimum Profit This column represents the Minimum Dollar Net Profit found for all of the trades with the same security name QO Average Profit This column represents the Average Dollar Net Profit per trade for all of the trades with the same security name It is numerically equal to the Total Dollar Net Profit above divided by the total number of trades for the relevant security Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 173 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note Because the net dollar profit for each trade depends on the amount of capital invested in the trade the results will be biased or skewed toward the trades that have the greater trading capital invested in the trade so that the trades with the higher trading capital will have much more influence on the result For an unbiased or objective result it is better to use the Basket Tester or use the Average Net Percentage profit figure Maximum Profit This column represents the Maximum Dollar Net Profit found for all of the trades with the same security name Minimum Profit This column represents the Minimum Percentage Net Profit found for all of the trades w
190. ate 18 11 1996 Stop Entry Date 14 03 2001 0 Long NEH 18 11 1996 06412 1996 0 0 18 0 0000 3 6700 3 62 0 Long NBH 24121996 290 7997 0 0 36 0 0000 3 6200 3 95 0 Long BTP 277121996 16 0 7997 0 0 20 0 0000 1 7400 1 720 0 Long BOD 08011997 3 01997 0 0 23 0 0000 5 5000 5 450 0 Long GHP 28 01 1997 27 02997 0 0 30 0 0000 1 1400 1 18C 0 Long RAYS 294011997 30mMA997 0 0 1 0 0000 0 0600 0 05C 0 Long PDC 300141997 04031997 O 0 33 0 0000 1 0977 1 157 0 Long RAYS Tea aa O 0 4 0 0000 0 0600 0 05C ee 06 02 1997 10 02 1997 ee ee ee a lente peel 0 Long NEH 06021997 24021997 O 0 18 E E 4 15C 0 Long BTF 07 02 1997 26 02 1997 0 19 tees ual 1 730 0 Long PWS 100241997 037041997 O a 52 Chack Pighlignited Enirizz 0 092 0 Long BOD 13 02 1997 26 03 1997 0 a 41 A eck nga ea ents 6 17C 0 Long BTF 0720341997 19031997 0 0 12 Set Entry Dates 31 740 0 Long GHP 142031997 17031997 o 0 3 x 431160 0 Long ASH 2420371997 08 04 1997 D 0 15 Cole fetal 31 950 0 Long BTP 272031997 01 04 1997 0 0 5 T E OE 1 750 0 Long NEH 272031997 01 041997 0 0 5 honera orea tiformeiton EZO 0 Long NBH 042041997 17 041997 0 0 13 o 4 140 0 Long GHP 07 04 1997 24 04 1997 O 0 Ft 00 0 Long APF 08 04 1997 09 04 1997 0 0 1 Display Trade on Chart a 1410 0 Long BOD 08 04 1997 15 04 1997 D 0 7 Display Chart for Symbol 6 30C 0 Long ASH Tea ae a O 0 2 0 0000 2 0200 5 x 41 3706 6811 trades selected from a total of 6811 tr
191. ations to get a rough idea of the system s performance and then run between 5 000 10 000 simulations in which case it would be advisable to go and have a cup of coffee because this will take some time depending on the speed of your computer This is where it would be an advantage to use the fastest PC that you can get your hands on When running a Monte Carlo simulation with more than 1 000 simulations a message box will pop up asking you whether or not you want to disable the Simulation Log Disabling the Simulation Log will increase the processing speed and reduce the memory requirements Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 245 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Initial Stop Used NO NO Pyramid Profits Initial Trade Capital 50000 Portfolio Limit 100 Transaction Cost Capital per Trade 5000 Position Size Limit 100 Simulation Type Monte Carlo Analysis Number of Simulations 5000 The Monte Carlo simulation was rerun on the MACD example with 5000 simulations The results are shown in the following report Monte Carlo Report MACD Crossover Simulation Summary Simulation Date Simulation Time Simulation Duration Trade Parameters Initial Capital Portfolio Limit Position Size Model Trade Size value Pyramid profits Transaction cost Trade Entry Transaction cost Trade Exit Trade Preferences Tra
192. au Last updated on 26 March 2009 Final Release Version 6 4 1 Main Menu Bar File Menu Open Trade Database Ld Save Session LJ Save as Default Session i Recent Files d Tal Printer Setup Print Guit UY Open Trade Database Clicking on this menu item allows a trade database file or session file to be opened and processed O Save Session Information This menu item is used for saving session files O Save as Default Session File Creates a default session file See the section on Load Default Parameters and The Default Session file for more information regarding default session files O Recent Files This submenu contains a list of the most recently accessed trade database files U Printer Setup This menu item is used to setup the printer O Print When it is enabled clicking on this menu item is used to print the current page This function is typically used to print a report or a chart QO Quit This menu item is used for quitting TradeSim The global preferences are saved automatically Tools Menu Start Simulation le Trade Log Rejected Trades dh Preferences QO Start Simulation Clicking on this menu item has the same effect as clicking on the Start Simulation button on the main toolbar This menu item will be disabled if you have not previously loaded a trade database O Trade Log Clicking on this menu item has the same effect as clicking on the Enable Disable Trade Log button on the main toolbar A checked item
193. ault when the RecordTrades function writes trade data to a trade database it also includes volume information for each trade This volume is calculated by taking the minimum of the traded volume on the day of entry and exit The SetVolumeInfoType allows you to change the way this volume information is calculated The VOLUME _ TYPE parameter can be one of the following four values o LOWEST The volume for each trade is the minimum traded volume on the days of entry and exit of the trade o ENTRY The volume for each trade is the traded volume on the day of entry into the trade o EXIT The volume for each trade is the traded volume on the day of exit from the trade o AVERAGE The volume for each trade is the average traded volume on the days of entry and exit of the trade SetVariableVolume ExtFml TradeSim SetVariableVolume DataArray The SetVariableVolume function to allow user to assign traded value using a Metastock formula rather than the predefined values Using this function will override any volume information as specified by the SetVolumelInfoType function and the value used is the value of the DataArray at the point of entry into a trade Example The following example sets the traded volume to the average of the last ten bars of the traded volume data ExtFml1 TradeSim SetVariableVolume mov V 10 S SetVolumeMultiplier ExtFml TradeSim SetVolumeMultiplier MULTIPLIER This function is used to mult
194. based on a set of indicators that define entry date price and exit date price with an optional stop loss how will this trading system perform over a period of time when trading an arbitrary group of securities e To truly evaluate the past performance of a trading system we need a trading simulator which mimics the day to day trading activities of a typical trader e Trading Simulators based on a single security are fairly limited in their ability to evaluate the performance of a trading system across a multiple security portfolio so we need more powerful analysis tools Until now this kind of software has been out of the reach of most traders who use technical analysis Important facts regarding TradeSim The following are facts regarding the capability of TradeSim that are important to any prospective trader who uses back testing as part of their system development Back test your trading system the way you would trade it using TradeSim the missing link in trading system analysis and simulation TradeSim is the first true realistic trading simulator analyser for MetaStock that can quickly back test and evaluate a trading system across a portfolio of securities With its powerful data processing capabilities TradeSim can evaluate the historic performance of a given trading system within a matter of seconds and do it with a realistic representation of a real life trading scenario Whether a single security or a multiple security portfolio
195. basic function of each tool in the Charts toolbar E Zoom in When this button is clicked down the contents of the chart windowpane are zoomed in a horizontal direction by a fixed amount P Zoom Out When this button is clicked down the contents of the chart windowpane are zoomed out in a horizontal direction by a fixed amount Zoom All When this button is clicked down the contents of the chart windowpane are zoomed out so that all of the chart data is displayed within the chart window jay Zoom Trade Extents When this button is clicked down the contents of the chart windowpane are zoomed out so that all of the chart data within the trade is displayed within the chart window Automatically Resize Price Chart When this button is clicked down the contents of the price chart are automatically resized to fit within the vertical extents of the price chart li Automatically Resize Volume Chart When this button is clicked down the contents of the volume chart are automatically resized to fit within the vertical extents of the volume chart Horizontal Price Grid When this button is clicked down a horizontal price grid 1s displayed at fixed price intervals Vertical Date Grid When this button is clicked down a vertical date grid is displayed at fixed date intervals which is dependent on the density of the chart data Display Trade Entry Information When this button is clicked down a blue horizontal dashed line 1s displayed at
196. bled and the Check for Duplicate Trades option is subsequently enabled a message box will popup with a warning allowing the user to enable the Sort by Symbol option Although it is possible to check for duplicate trades without the Sort by Symbol option enabled there is no guarantee that all duplicate trades will be detected Scale Currency Values by 0 01 When enabled this option scales multiplies currency values by 0 01 divide by 100 This is useful when your data supplier or stock exchange supplies data that is expressed in cents rather than dollars For example the London Stock Exchange supplies currency data that is denoted in pence Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 121 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Therefore to be compatible with the native denomination used by TradeSim it is necessary to scale the data by a factor of one hundred so all denominations can be expressed in pounds It is also possible to pre scale the data at the time the trade database is generated however the results are then permanent See the section on SetCurrencyMultiplier for more information on how to do this Load Default Parameters When this option is enabled the default parameters that are stored in the file default ses will be loaded any time a trade database is loaded To create the default session file refer to the section on The Default Sessio
197. by the diagrams If the entry or exit price breaches its respective range the RecordTrades function will deal with the trade in one of two ways depending on whether or not the internal price filter has been enabled 1 By default the internal price filter is switched on so that price checking and adjusting is automatically done so that all trades will always be accepted If a price violation is detected then a warning will be issued to the report log and the prices will be constrained 2 Ifthe price filter is switched off using DisablePriceFilter then price checking is still done but any price violations will cause the respective trade to be rejected and an error message will be reported to the report log Entry Price Restrictions at the point of Trade Entry Invalid Entry Prices High Close Entry High Price Valid Entry Prices User Entry Target Price Open Entry Low Price Low Invalid Entry Prices Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 60 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Exit Price Restrictions at the point of Trade Exit Invalid Exit Prices High Exit High Price Valid Exit Prices Exit Low Price Open Low Invalid Exit Prices Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 6
198. c cccsccccsssccesssecesseecesseecsseecssseeceseeccesseceesseceesseceessecessseeesaeceesaeeens 184 EN Column Cap tal In Trades aissecacsauetievesveaienatsusacanacwectudocaaaselsuagieatecadegatessseadeeniesshaveduniea eae teem ease E Eiane 184 LJ Column R multiple Reward to Risk ratio PE oo cccseccssscecssscecsssecesseecesseecesseceesssecesseecesseeceteeeees 184 Ui Pront SUS as sectarian vn EEE ues tna EE TAE A E EAE AERA 184 ar Colmo Gos Trade Pi eresas a E E EER 184 Q Column Net Trade Profit Formerly Trade Profit cccccccccccsscccsssccessseeesseecesseceesseceeseceeseecesseeceaeeess 184 EC Column Gross Trade Profit Vo sicsciscicccsvcvesstcnansyeceadsdsevasnin sasvanstovidaaetesavessusioesneveteussensadeaseussomsaansanianenasousens 184 LJ Column Net Total Profit Formerly Trade Profit c cc ccccceccsscccsssceesseccesseceesseceesseceesseceesseceesseeess 184 Cena Tal Ca ienasi aeie A EAA AE EE AENA ATEA T A aaa donee 184 Gl Colum Yara yy FE easan E ER 184 Q Column Drawdown P E ssesssnssenssesessneeseesseessessesseessiesresesstesseessesnsssnisstessessnesstessissnesnosseessesseessessrenensse 184 a aoa ale RE emer om Maer ne nee emt aretrne Ane Wen oe ewe Tene ver omen nese rr ana trT 184 LY Column Point Value Commodities Only ccc ccc cccssccesseccesseecesseecsscceesseceesseceesseceesseceessecesseecesseeeesaeeess 184 LY Column Initial Margin Commodities Only ccccccccssccc
199. can be found at Common Parameters Specific Parameters UO Plot Open trade equity Based on This radio group controls the way that open trade equity is calculated between the entry and exit points of each trade o Closing Price When not entering or exiting a trade the daily closing price is used to calculate the trade equity o Opening Price When not entering or exiting a trade the daily opening price is used to calculate the trade equity o High Price When not entering or exiting a trade the daily high price is used to calculate the trade equity o Low Price When not entering or exiting a trade the daily low price is used to calculate the trade equity Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 223 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 QO Check Entry and Exit Price with Security Data When this option is enabled then a check is made so that the entry and exit price of each trade falls within its respective daily range When a discrepancy is found the user is notified and a message is written to the Message Log Dynamic Cross Referencing Similar to the closed trade equity chart the open trade equity chart supports dynamic cross referencing to the Trade Log However unlike the Closed Trade equity chart double clicking on any point on the Open Trade Equity chart will not just highlight the one respective associated trade but will mark all open trades at
200. can be used to identify the trade A checkbox beside each trade 1s used to include or exclude the trade when doing a simulation O Column System ID This column displays the System ID that is typically used to identify the trading system Column Trade Position This column displays the trade position as was assigned when we generated trades using the external RecordTrades function in the MetaStock TradeSim plugin O Column Stock Symbol This column displays the stock symbol for the trade QO Column Periodicity 33 00 This column displays a one character symbol which represents the periodicity for the trade when it was generated using the RecordTrades function in the MetaStock TradeSim plugin Symbol Periodicity Unknown periodicity which is caused by loading a binary trade database prior to Version 6 or loading a text trade database Daily Yearly QO Column Entry Date Time 49930900E This column displays the trade entry date and time that corresponds to the time of the entry trigger If the time stamp is non zero then it will be displayed in 24 hours time format alongside the date in the form of HH MM TTT where HH represents hours 23 0 MM represents minutes 59 0 and TTT represents Ticks 999 0 Column Exit Date Time 3300 This column displays the trade exit date that corresponds to the time of the exit trigger If the time stamp is non zero then it will be displayed in 24 hours time format alongside the date in the form of
201. cannnmiacemeeeneaeauneterioeen 162 EY Trades Processed scsi scccacactesecasssaccadsnencegosaiaetiudedu sagu do ancageues ad asaisckat dann engoaoatagasauendagacomahos tetadaaiooeadeotenancadesiancsaees 163 O Trades Executed eseis omotica eE aAa s 0s aaar ENA EEEa EO Ea EE EEEE EEAS 163 G Trades ho 26 6 ene ee or ee Er aN Aa A eee EE 163 H PANNA US erreren hace aceasta ea ccea tse tec esas se asec vic E e ae oe susie sae taut 163 m E E arse ca E PEE A E I nantes ined ast E S E E EE A E E TT 163 LY The Completion Gauge secera aa A A A E AENEA EAA EATA TE 163 Eh RW seals cr a Li 0 a A N S A NNN 163 LY Pause Continue Button iccccccscssscccccccccecsssesssssssseccesccceceesessssnsssessesecceceesesssssssssesecesescecsesessssstsaseeesesseses 163 Q Minimize Maximize Button sists caccse asco ccaessecidesssveweaseneusecabsvssuaidachussosvededbsrbaiedas deadastecldeubveetetuesabovddobsdetaatacs 163 Q Abort sac octets a ee cece epee acer eee aa teewee cess tustdpinmmmecabetniceeatnneeatuabvatenteatwanseuseseaieatameubtentace 163 Results Of a simulation cccccscccscccscccscccssccssccssccscccssccsscccesccesccecscesccesccesccssccssccssscesccsscees LOG The Trade Simulation Report windOW ssssssssssssseeccccccccccossssssssececececcoocosssssesseceeeecceosssssssssssso 164 Trade Parametere al E29 eee ee nee eT ne nn EEEE ene er eee eee ee eee eee 165 DP tailed Report TAD een een a een EE ee ne ee ee 165 SU UGAUEN C8 0 m6 8180 Fs i geen
202. ccccccceeeceeccceeeceeeeeeeeeeeeeeeeeeeeees 265 Average Relative Dollar Drawdown Distribution 0 cccccccccceesssssscecceeeeessseeccceeesssseeecesesesaaes 265 Maximum Absolute Dollar Drawdown Stats cccccccccssssscccceeesssssceeceseeesseeeeceeeesssseeeeeeeeeessaaeees 266 Maximum Absolute Percentage Drawdown Stats cccccccccccccccccececeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeess 266 COMPOSITE REPORT GENERATOR ENTERPRISE EDITION ae 000000000888 H8HHHHHHHO8OO8OOS 267 Invoking the Composite Report Generator ssssscssccccccssssssssscscccccssscesssssscccossseeees 267 Phin LOUDA aE A E A EA 268 SelecHna TNE charis AM repor iSeries aiian daeina aiian 268 Printinge the REDOT aiccteccctcgeccacecstncccsciaecncscetnconccsdsvectestecsnscutecasiasistssecaddeestesisvscdcetscusiassewoeasieaueslaats 269 Copying and Pasting into other Applications ssseecceecccccsossssssssecececcecoocosssssessececceececsssesssssssoo 270 Copying and pasting mto W OL By x cicecsna nseces secede enra ne ENNEN ANENA EEEE KE eE 270 Copying and pasting into Excel sssssersicrsiisssrsrinisussisriserstunriura kat isenurien kunakin u neaa kudi aciisassdeidecsiesiinedicsi 270 Exporting the COMPOSE report ssis a a ENENKO NAE KAEA 271 MPO FU 10 F eS a E A E EE EEAS 271 MISCELLANEOUS ISSUES ssesessessesoesosscoescescsscssesoesoeocsscescesessesoesoesoescesoessssesosssessessessss 2 1 2 The Question Of Survivorship Bias
203. ccocsssesecccoscssseseeeeossssse 3 Lade mar ES serp E A A T 4 CONTENTS a E E AEE E E E EE 5 PRERACE TOY ERSION Oorcsaiserdssaoroneosioin arnon ninenin are ANE NEE SaS ANES ASE NOAR 22 BRACE eaesectes ccs se set EEEE O cen sesseseuastoc censuses EEEE EEEE EEEE NS 23 What this manual is not about xssescacssesecececsascassuscasaszeseecenascecasnensseecncssscassonsauashosensavssneseaseeuns 23 AUTOR S COMMEN sae 24 ACT NONLEDGEMI NES apren E E N 25 INI RODU TION nsr EEEE AE EE A NE E E OAE 26 THE importance of back testing iooecssnesiewek seacascseesuecscacsensidesvucdenessiucssendeccenesshcaiucsiucesusesesacersies 26 Traders NiD ea e L N A aE E E A TOE ERS 26 Designing a Holy Grail Trading System sssssseeccccssssssecccocsssseecccoosssssceccocssssseecesossssssseesso 30 Toe Tradi r o DiN mIn leen e E E EE 31 Important facts regarding TradeSim sseeecoossssseeecocosssseeccocossssseecoosssssseeccossssssssececosssssssee 31 Thinking about buying a Black Box trading System ssececcossssseeccocossssseccoocosssssseeceosssse 32 Using TE CSN essinum Ear aa E EEE 33 OG Cx AMOS EE E E A A EE EEE A E E EE E AE 34 Feature Comparison and Version Support sssssseccccsssesecccocosssssececoosssesceceocossseeceeososssssee 34 Sotware ReguiremMmeMiS ersen eaaa rana enaar aaao aa aaa 39 VET COM OU ANON saiisine 39 SOFTWARE INSTALLATI N ccaceccsvscssecscuacesarescasscecondessnvessusessondesarsscssscesoncsasevecsuscssoncesersecanes 40 Installing
204. ced losses Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 196 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Monthly Profit This chart displays the monthly profit versus month Note that for simulations that ignore entry date this chart is not produced Green bars represent months that were profitable whereas red bars represent months that produced losses Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 197 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Monthly Return The Monthly Return chart displays a cumulative profit return on a monthly adjusted basis Green bars represent months that were profitable whereas red bars represent months that produced losses Taking the monthly profit chart above the monthly return values are calculated as follows for the first 7 months only Month Monthy Profit Cumulative Total Monthly Return _ __ _ April 1993 0 0 2402 75 2402 75 0 50000 2402 75 0 _ May 1993 0 0 2402 75 2402 75 0 50000 2402 75 0 _ June 1993 0 02402 75 2402 75_ 0 5000042402 75 0 July 1993 0 0 2402 75 2402 75 0 50000 2402 75 0 _ Aug 1993 0 042402 75 2402 75 0 50000 2402 75 0 _ _ Yearly Profit This chart displays the yearly profit versus year Note that for simulations that ignore entry date
205. cing overall trading system performance The MACD Reversed trading system which looked promising when we traded it with a 50 000 initial capital base and no transaction cost is now a complete wipeout and guaranteed to lose all of your money The Random Entry Bollinger Bands Exit system fared much better due to its position sizing strategy As expected the inclusion of transaction costs had the effect of reducing bottom line profitability and shifting the profit distribution to the left but it still has an 80 chance of being profitable Note that the inclusion of transaction costs has severely reduced the percentage of winning trades in both cases In fairness to the comparison with the previous examples where we used a much higher initial capital and we did not include transaction costs it should be noted that transaction costs will have a much more pronounced effect on a trading system with a smaller initial capital base because the transaction costs represent a larger portion of each trade It would be interesting to see whether or not reversing the entry and exit triggers would improve the proportion of winning trades We will leave this exercise to the reader Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 260 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 As has been repeated time and time again in the literature and verified using TradeSim in order to have any
206. clicked on a trade exit then you will have the option of jumping to the matching trade entry trade log entry You can also quickly toggle between the trade entry and exit log entries by clicking on the j key Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 209 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Locate in Trade Database Selecting this menu item will highlight the corresponding trade in the Trade Database window and bring it to the foreground The trade can then be unchecked from the list so that it won t appear in any of the simulations Locate in Chart Submenu Note If any items are disabled in the menu it is because the Position Size Model does not support this charting option or the chart does not contain trade entry data o Equity If enabled locates the corresponding trade in the Equity Chart o Equity If enabled locates the corresponding trade in the Equity Chart o Drawdown Locates the corresponding trade in the Drawdown Chart o Underwater Equity Locates the corresponding trade in the Underwater Equity Chart o Capital In Trades If enabled locates the corresponding trade in the Capital In Trades Chart o Reward Risk Ratio If enabled locates the corresponding trade in the Reward Risk ratio Chart o Portfolio Heat If enabled locates the corresponding trade in the Portfolio Heat Chart o P
207. com au Last updated on 26 March 2009 Final Release Version 6 4 1 Creating Session Files Session files are created using the Save Session option from the file menu To create a new session file first load a trade database file Once you have adjusted all of your trade parameters and preferences for a particular session you can save this information in a session file by selecting the Save Session Information option from the file menu Once this is done you should be greeted with the following dialogue box which will allow you to save the session information along with the trade database file Save Session Information Ed Ed Save in TradeSimData fad File name MACD Crossover Save as type Session files ses Cancel ue All session files are saved with an ses extension and by default the name of the trade database file appended with the ses extension is automatically used as the name of the session file You can change the file name to whatever you like but it 1s best to stick with convention and use the name of the trade database file that it represents Using a Session File with another trade database You can use the settings of one session file with another trade database file If you have already loaded up a trade database and wish to use the settings from another session then just load up a session ses file by selecting Load Setup from Session file ses from the Files of Type menu in the Open Trade Databa
208. ctive stops on the long side Current Bar EntryTrigger 1 Yes Vv linitialStop User InitialStop Next Bar Enable Protective 7 No Next Bar No Stop Other Valid xit Trigger No Use Closing Price as Stop Threshold Low lt InitialStop Yes Set Exit Price to Close lt InitialStop Delay All Exits By One Bar ExitTrigger 1 Trade ExitPrice Close Yes Disable Closing Stop Delay Yes gt InitialStop Delay All Exits By One Bar Next Bar l Trade ExitPrice ne Open ves Trade ExitPrice InitialStop Yes Next Bar gt Weiss Sie Sg E User ExitPrice No ij Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 93 Final Release Version 6 4 1 Protective Stops on the Short Side The following flowchart illustrates the procedure used when analyzing the price information for a breach of the protective stops on the short side Current Bar 7 EntryTrigger 1 No gt Next Bar Yes y linitialStop User InitialStop y Enable Protective Nex
209. d NO No Transaction Cost dO S First load up the example trade database MACD Crossover trb Now click on the Start Monte Carlo Simulation button to start a simulation When a Monte Carlo simulation is in progress the Simulation Status screen will pop up over the top of everything else like it did in the single simulation However all of the status information is now updated at the end of each simulation not as each trade is processed The Simulations Completed indicates the total number of simulations completed and the Total Trades Processed now indicates the total tally of all of the trades processed for all of the simulations currently completed This can add up to millions of trades depending on the total number of simulations and the total number of trades selected in the trade database Honte Carlo Simulation Status Simulation Time 00 00 18 Simulations Completed 366 Total Trades Processed lt f54n4 Trades Processed FDZ Trades Executed 156 Trades Rejected 596 Partial Trades 0 Total Capital 175 456 64 Monte Carlo Simulation in Progress Minimize Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 232 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 At the end of the analysis we will be presented with a comprehensive report window as shown in the screen snapshot below Monte Carlo Analysis E Ioj x
210. d Functio iSi EEN EE E ETEA 96 Enable Trad Pyramiding virusine eaaa aAA aAa aaa TENEAN 96 FG a E AE EAN A EEA 96 Disable Frade Py Gah oors E OESE 96 SetPyramidProfitThresholdDetection ccccccccessessesssesseseeeeeeeseeeeeeseeeeeeeeeeeseeeeeseeeeeeeeessseeeseeerags 96 Debugging Functions and Aids eeeeooosssssssesssececcccccccssssssssseeccceceecccoososssssssssecececocccossssssssssseseesoo 97 SO F EPTO S A E E E EE 97 SEIR OT Vf ea cae eaueatenasae eke cosanseaeeceneeaecueaeasecuectioebe Sacueueseoubectis eoeneuneeete 97 ShowTrades formerly ShowChatt cccccccccssssssssesssesssssseeseseeeseeseeeeeeeeeeeeeeesseeseessesssessssssseeeggas 97 el Re lt 1 00 E me eRe N TRE ESEE E omen tC T E Cer re enna C eT CnnT at ee 98 Miscellaneous Funcoms seisiciscssssentesesissisceddssvetcciscsccesstecegasiseoasaasdaasteasueucecssdenesaededvesiachsscceucnecuwsastnce 98 Oy a Dal Eea E E E A A 98 Ero E a E e N E hu I EOE EI 98 SetCurreney Multiplier sesiis radii assed se 99 m E E E e EET EA E E AET E AA EET N E A SESTE T EEEN 99 EN E a EE EN 99 BO aE y OTO a E A E A E 99 E E Aa a tense N era ane N essere tae A T E ANA AE eeneseedan AIAN 99 AEN O N e E E scan E 99 E E E 215 6 0 e E E E A AAA EIEI A A E EEA EE AEA E EEEE TY 100 Enable Price FIET casnar E E meres eee 100 IDS AOS Pree FGE a E ace aero eecetae 100 MO Wy ANUP INC GAA 2a deere tea teccetea tec ce arcacae eae EEE 100 Probi poa iE 6 ce Meelis tect ce ete c
211. d because error found in trade for AMP on 17 Jan 2006 caused by Invalid Exit Price Data CAUSE Exit Price 6 438193 is less than Exit Bar Low Price 7 880000 gy HINT To see the rejected trade details call the ShowRejectedTradeDetails function in your exploration code Q 1 AMP Long Total Number of Long Trades written to the trade database for AMP is 5 which includes 0 open trades 3 trades were re E First date scanned 29 Jan 2003 Last date scanned 17 Jan 2006 i 1 AMP Long Signal Chart Displayed Q 2 ANZ Long Total Number of Long Trades written to the trade database for ANZ is 0 which includes 0 open trades 0 trades were re First date scanned 31 Jan 2003 Last date scanned 17 Jan 2006 Q 3 BHP Long Total Number of Long Trades written to the trade database for BHP is 1 which includes 0 open trades 0 trades were re First date scanned 31 Jan 2003 Last date scanned 17 Jan 2006 Q 4 CML Long Total Number of Long Trades written to the trade database for CML is 0 which includes 0 open trades 0 trades were re First date scanned 31 Jan 2003 Last date scanned 17 Jan 2006 Q 5 CBA Long Total Number of Long Trades written to the trade database for CBA is 0 which includes 0 open trades 0 trades were re First date scanned 31 Jan 2003 Last date scanned 17 Jan 2006 if Clear Log Total Number of Errors 16 Total Number of Warnings 13 Total Number of Queries 21 20 Posit
212. d enclosed in braces after the item heading For example Single Simulation is supported in all versions Exporting the Trade Database P E is only supported in the Professional and Enterprise editions Monte Carlo Analysis E is only supported in the Enterprise Edition The following table summarizes what features are supported in each version of the software A tick Win any box indicates that the feature described at the left of the table is included in the software version listed at the top of the column A cross indicates that the feature described at the left of the table is not available in the software version listed at the top of the column Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 34 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Trading Simulator Standard Edition Professional Edition Enterprise Edition F S Unlimited Unlimited Unlimited Trade Simulation Reports Standard Edition Professional Edition Enterprise Edition Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 35 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 D o Trade Database Manager Standard Edition Professional Edition Enterprise Edition Trade Log Standard Edition Professional Edition Enterprise Edition O EAR Charting Capability Standard Edition Professional Edition Enterprise Edit
213. d for every dollar risked n Maximum Relative Drawdown This column represents the maximum relative trade drawdown in dollars during the course of the trade simulation Sorting the columns Clicking on the column headers activates a sorting routine that resorts the list according to the information contained in the respective column For example clicking on the Net Profit header will sort the list in ascending or descending order based on the numeric value of the net profit Likewise clicking on the Maximum Drawdown column header will sort the list based on the numeric value of that particular column Alternately clicking on the same column will resort the list in the opposite direction To reset the ordering of the list back to the default just sort the list by the simulation index column Exporting the Simulation Log It is possible to export the data from the Simulation Log in a variety of formats which include e Hypertext Markup Language html and htm format e Comma Separated Values file csv To access this facility just right click on the Simulation Log Window and select the Export file option A file save dialogue box will appear asking you to select the appropriate file and file format Select the appropriate file format from the Save as Type drop down menu and then select a file or use the optional Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 234 http www compuvision com au Last update
214. d in the trade data then this model will be disabled from the radio group Important The initial risk is only really valid if a protective stop or trailing stop has been used to limit the maximum loss of the trade to a level that corresponds to the initial stop value To enable protective stops when generating a trade database please refer to the section in the previous chapter Using the Initial Stop as a Protective Mone Management Stop for more details on how to do this Capital risked per trade This parameter determines the total amount of capital risked per trade and is specified in dollars O Position Value Size Limit This parameter limits the maximum position value size of any one trade to a value that is a fraction of the total trading capital at the time the trade is to be taken o Example As an example say you currently have 100 000 tied up in both open positions and cash i e your total trading capital is 100 000 You risk 1 1 000 of your trading capital on a trade and calculate the position size value of the trade according to the difference between the entry price and initial stop price If your position value size is limited to 10 of total trading capital ie 10 000 then the trade will be capped at 10 000 even if the position size required is greater than 10 000 QO Portfolio Heat This parameter limits the total portfolio risk exposure to a value that is a fraction of the total trading capital at the time the trade is
215. d on 26 March 2009 Final Release Version 6 4 1 filename given in the File Name field You do not need to specify a file extension as one will be automatically appended Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 235 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Statistics Summary Report Tab Clicking on the statistics summary tab will reveal the Statistics Summary report The summary is grouped into a number of categories which are described in detail below The following is an example of the Monte Carlo Report Monte Carlo Report Equis Bollinger Bands Simulation Summary Simulation Date Simulation Time Simulation Duration Trade Parameters Initial Capital Portfolio Limit Position Size Model Trade Size value Pyramid profits Transaction cost Trade Entry Transaction cost Trade Exit Trade Preferences Trading Instrument Break Even Trades Trade Position Type Entry Order Type Exit Order Type Minimum Trade Size Accept Partial Trades Volume Filter Ignore Simulation Stats Number of trade simulations Trades processed per simulation Maximum Number of Trades Executed Average Number of Trades Executed Minimum Number of Trades Executed Standard Deviation Profit Stats Maximum Profit Average Profit Minimum Profit Standard Deviation Probability of Profit Probability of Loss Winning Trad
216. d then assigning a rank column to the database file and then importing it back into TradeSim again O Column Initial Margin Commodities only In this column an Initial Margin value is assigned to each trade If the Use Initial Margin from Trade Database option is checked in the trade parameters and the initial margin is non zero the value assigned to the trade will be used instead of the default value If a zero value is assigned to this column then the default value is automatically used This feature facilitates concurrent simulation of different markets Note Trade Database file formats prior to version 5 will have zero assigned to the Initial Margin column This can be changed by exporting the trade database file Professional and Enterprise versions only as a text trade database file and then assigning an initial margin column to the database file and then importing it back into TradeSim again Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 135 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Column Transaction Cost In this column a transaction cost value is assigned to each trade If the Use Transaction Cost from Trade Database option is checked then only a valid value assigned to the trade will be used instead of the default value Note Trade Database file formats prior to version 5 will have zero assigned to the Transaction Cost column This c
217. d with finite transaction costs reduced the bottom line profitability quite considerably to the extent of driving one system into unconditional bankruptcy As has been repeated time and time again in the literature and verified using TradeSim in order to have any chance of being successful with trading you need to start with a reasonable amount of trade capital and select a trading system that uses good position sizing strategies In conclusion a trade system is a non linear process Increasing the initial capital base does not necessarily lead to a proportional increase in the total net profit which is why traders using a smaller amount of starting capital are much more at risk of going bankrupt Addendum to TradeSim Enterprise Version 2 4 0 introduces four new statistics These are the Average Relative Percent and Dollar Drawdown Statistics as well as the Maximum Absolute Dollar and Percentage Drawdown Statistics To avoid confusion the drawdown parameter used in previous versions has now been renamed as the Relative Drawdown The Relative Drawdown is a measure of the retracement of equity from a previous equity high point This is to distinguish it from the newly introduced Absolute or Maximum Peak to Valley Drawdown The Absolute Drawdown 1s described more fully in the following section Absolute Peak to Valley PV Drawdown parameters Some or all of these statistics have been added to the Monte Carlo Report and Simulation Log as well as the Dis
218. data to be written to a proprietary trade database file where it can be used by TradeSim for further analysis This external Plug In can be used in one of two ways First it can be combined with an indicator and then overlaying it on a single chart where it will generate trade data for that chart Second it can be used as part of a MetaStock Exploration to generate trade data for multiple securities In either case its syntax use is similar to the syntax use for a normal indicator except that it 1s called using the ExtFml function that is built into the MetaStock indicator language starting with Version 7 0 and above Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 33 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 3 Finally analyse the acquired trade data by running TradeSim and using its powerful data processing analysis capabilities Code examples Numerous code examples are given throughout this manual to illustrate the concepts described Code examples are written in mono spaced Courier type on a grey background frame an example of which is shown below EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE InitialStop 0 optional initial stop To save time retyping these examples you can easily copy and paste these examples into MetaStock by first highlight
219. database exploration 3 Alternatively delete the trade database trb file before regenerating it Trade database files are stored in the c tradesimdata directory This will force the RecordTrades function to reset any internal variables and regenerate the trade database file correctly Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 48 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The ToolBox The ToolBox is an aid which assists the user when creating a trade database Although the ToolBox components are built into the TradeSim application itself the TradeSim plugin TradeSim dll communicates with it using a messaging scheme This allows seamless integration within the Metastock environment even though the functionality of the ToolBox is built into the TradeSim application itself The ToolBox contains a new Report Log Tool window which replaces the previous ErrorLog txt file In addition there is also a Signal Chart Tool window which can be brought up for a given Symbol when a trade database exploration or indicator is invoked with the appropriate symbol This can assist in debugging a trading system by carefully inspecting the trade signals it produces for a given security TradeSim Enterprise Edition File Tools Window Help TradeSim DLL ta MACL ncludes Pre Release Beta Version 5 0 0 Build 692 9 E i Jump to next error z2 Help on Selected It
220. dated on 26 March 2009 Final Release Version 6 4 1 from any trade simulations Deselecting the Ignore Open Trades checkbox in the Trade Preferences tab of TradeSim can quickly enable the use of open trades in trade simulations Viewing the trade data The only way to view the trade data file is to load the resulting database file into TradeSim Whilst we will describe the operation and use of TradeSim in a later chapter we have reproduced a snapshot of the database screen in TradeSim with the resulting trade data file that we have just generated The RecordTrades function uses a proprietary file format to store trade data This results in compact database files that take up a minimum amount of disk space Every trade database file generated with the RecordTrades function always has a trb file extension and its prefixed name is the name specified by the file name parameter in the RecordTrades function When the RecordTrades function generates a trade database file it writes the information to a file with its name specified by the file name parameter in the RecordTrades function appended with trb file extension These files are always stored in the predefined TradeSimData directory on your local C drive For the example above the RecordTrades function would have generated a file called MACD Long Example trb and saved it in the c TradeSimData directory Trade Database 2983 Long COH 05 1 2 01 12 12 01 44 2 705 47
221. de dalai sissies is scars screen dstievetes aa a aa o a 65 Controlling how much data to trade with sssseeecccccccccsssssssssseseseccccococcoossssssssseecececocosssssssssssseee 65 Using the TradeSim Plug In function library nnnnnnnnnnnnnnnnnnnunnunnuneererrrrrrrrerrrrrrrrrrrrrrrrrrrrrrrrrrrrrereen 66 m RR gt lt 111 5 epee E E OE A OEE E E E E E E A E E OENE 66 Enty and exit Conditions sissende s 67 Bandom eDi y o E E G 67 A Coin Toss Random Eniry Stale Gy scossi eona REEE 67 ATealistic Random Entty Strate Oy srren E rO EE E EERE 68 A rahdom entry example 222 22cacasccesccanesccccasceteccacesaaccbaecttacantsesacanceteananscenceencuehegcecuecetenenesantcctecettacnetoceeens 68 Refining the entry and exit conditionS sessssseeccccccccsssssssssseeecececocosossssssseceeecccccosossessssssssssseseesso 69 1 Wsine the Metastock REF Tunc oieee E 69 2 Using the TradeSim Plug In function HDrary ccc cece ccc ece eee e eee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 69 OCCT Fay Var AUIS E EEE EE E E EE EEA 70 Order Type and SU OS esseere n enneren EEE EPEA EEEREN EEEE EE a Eaa 70 Addin an Tmall SiO Eaa ENAR a aaa TEENE 70 Initial Stop Price Restrictions lt 0c0220ic0cesceececniaceonentteanacntnctnncetetesecesacnedeneaeseedndasensseeaderdevacsedeeederenedeeeseeees 71 Using the Initial Stop as a Protective Money Management Stop cccccccccccccccccccecceeeeeeeeeeeeeeeeeeeeeees 12 Q Example of how a Protective Mo
222. dered to be a realistic account of a trading record Note There is no need to use this function if you are using the price filter EnablePrice Filter as all prices will be constrained DisableOpenTrades ExtFml1 TradeSim DisableOpenTrades A call to this function does not include open trades when the trade database is generated TrailingStop ExtFml TradeSim TrailingStop 1 Name of external function Mode 2 Mode TradePosition 3 Trade Position Type VolatilityFunction 4 Volatility Function RefPoint 5 Reference Point ThresholdPoint 6 Threshold Point Pe The fast trailing stop function is used to create a hard coded trailing stop function that operates significantly faster than one that is coded using the MS formula language For more information regarding this function please refer to the AN 2 Document Append Trades ExtFml1 TradeSim AppenTrades This function is used to suppress recreation of the trade database file so that additional trade data can be appended to an existing trade database file Typically this function would be used to assist creation of a trade database file based on multiple time frames or for multiple systems using different security lists For more information regarding this function please refer to the AN 4 Document SetTriggerAtDate ExtFml1 TradeSim SetTriggerAtDate Day 1 31 Month 1 12 Year YYYY This function allows you to create an artificial
223. derini oriin iida re a AE IEAA ATES 151 E R don N E a ENNE ENE AENA E AEAT EN cael 151 Single Smulaion dates 1SMOTE sorer iee err eere E a En r EEE eTe 151 B a E E E E ee ey ec eee 151 Monte Carlo Analysis 1E Persini R N 151 Detaule Trade Parameters ssnsdin aaea AEE iea saaa onasan 151 Trade Preire nees Ta Desr a OL Eae SO a E A 152 E e T OA EA EI A OO ET 152 E Eaa i EE T AE A AE A E I T E AEE O IEA AAEE E AI TAS ENT 152 Droako ven B26 cn ennn E E E re eee Sener yes lone Tee nnee 152 O Process Separately nasneusciiniagin sine n rR eee ee een eee renee ere 152 Q Include with winning trades a saccasesescasaes veancwesasiacsansvdvasschivs davs vgqaaunesidaanvegueane ronendaas ualagacacsiuaseuasbuasacanantancaaaoaeias 152 G nehode wiii losing Trade senssiesiesrnraaaniinriie aans AR AAAA RENAA IAEA ARAARA 152 Te EO O e E E E 152 E asec a E E A E E E E A E EEN A A E A AA AE NEAT 152 PPO SS ONO tades onl Yossep da e AS T ANTA EA RAS 152 A Process short CASS only oriisiniriiniericiiiiiris i nid n ire AOA AE AAAS 152 Ae Eo E EA EE E E E ER E EEO EE EEA E AS 153 m E i EE a O E O E A O A OA A OT A OA 153 G Fiac onal COs eaea E A E AEE E 153 a Pred Costper Shire Comiat oinar a renatin AAEE A EAE AAAA 153 I Minimum Transaction COSE sx ccscvescaanasinssdecsientacesa vonnsiesstaaatanayoecaenton hededeney EANAN NESANS ANNAA Aana Ea KANNE TAs 153 Trade Pyramiding Enabled Disabled nnnnnnnnnnnnnnnnnnnnnnnnneeseessessesssesesssssssssssssssssssss
224. des function to generate trading data and the last entry trigger has not subsequently been matched by a valid exit trigger before the end of the data is reached the RecordTrades function will subsequently close the trade and write the trading data out to the trade database file as though a valid exit signal was generated on the last bar of security data To distinguish open trades from trades that are closed normally by the defined exit trigger an internal data field is used to record the trade exit status Please refer to the next chapter on TradeSim regarding a description of the Exit Status Normally you would not allow open trades to be recorded because forcing a trade to terminate prematurely at some arbitrary point that has nothing to do with the actual exit trigger would introduce erroneous data into the test Remember that what we are trying to test is the effectiveness of a trading system over a period of time which means that the tests will only be accurate providing the trade data mirrors our trading system accurately However in some testing scenarios it is necessary to include open trade data as part of the test irrespective of whether the trades are terminated normally or not When a trade database is loaded into TradeSim all data is loaded including any open trades however by default open trades are excluded Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 64 http www compuvision com au Last up
225. ding Instrument Break Even Trades Trade Position Type Entry Order Type Exit Order Type Minimum Trade Size Accept Partial Trades Volume Filter Ignore Simulation Stats Number of trade simulations Trades processed per simulation Maximum Number of Trades Executed Average Number of Trades Executed Minimum Number of Trades Executed Standard Deviation Profit Stats Maximum Profit Average Profit Minimum Profit Standard Deviation Probability of Profit Probability of Loss Winning Trade Stats Maximum percentage of winning trades Average percentage of winning trades 25 07 2001 3 49 58 PM 518 33 seconds 50 000 00 100 00 Equal Dollar Units 5 000 00 No 0 00 0 00 Stocks Process separately Process all trades Default Order Default Order 500 00 No Volume Information 5000 6811 838 718 468 55 07 57 503 76 115 01 708 96 1 423 34 905 25 69 813 13 587 95 27 18 49 04 50 96 35 74 29 83 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Page 246 Final Release Version 6 4 1 Minimum percentage of winning trades 23 89 Standard Deviation 1 39 Losing Trade Stats Maximum percentage of losing trades 73 68 Average percentage of losing Trades 67 48 Minimum percentage of losing trades 61 71 Standard Deviation 1 44 Shown in the following charts is t
226. distribution chart that displays the actual number of samples o Relative Frequency This option generates a distribution chart that displays each distribution chart bar as a fraction of the total population size total number of simulations o Relative Frequency This option generates a distribution chart that displays each distribution chart bar as a percentage of the total population size total number of simulations O Bars in Distribution chart v 20 bars 30 bars 40 bars BO bars This submenu item controls the number of bars in the distribution chart display If you have a relatively low number of trades then you will need to use a small number of bars in the distribution chart display otherwise the distribution chart display will look quite distorted Alternatively if you carry out a simulation with a large number of trades then you might need to increase the number of bars displayed in order to improve the resolution of the distribution chart By default 10 bars are used The higher the number of trades used the more accurate the distribution Basket Testing Selecting the Basket Test option from the simulation radio group on the Trade Parameters page will allow you to carry out a basket test of all of the securities that have been selected in the trade database The basket test simulation option allows you to test all of the selected stocks in a trade database independently of one another thus allowing you to objectively co
227. documentation ref AN3 Testing Trade Pyramid Strategies using TradeSim Example The following example sets up the conditions which allow a trade pyramid to be built based on a minimum profit threshold of 3 gain per level and a maximum pyramid depth of 20 levels ExtFm1 TradeSim EnableTradePyramiding PercentProfit 3 20 DisableTradePyramiding ExtFml TradeSim DisableTradePyramiding Disables the trade pyramiding mechanism switched on using the EnableTradePyramiding function Also calling the Initialize function has the same effect For more information on Pyramid Trades and Pyramid Trading Strategies see the relevant documentation ref AN3 Testing Trade Pyramid Strategies using TradeSim SetPyramidProfitThresholdDetection ExtFml TradeSim SetPyramidProfitThresholdDetection PROFIT THRESHOLD TYPE Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 96 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 This function is used to determine the way that the profit threshold detection is measured when any profit threshold trigger type is used to re enter a pyramid trade For more information on Pyramid Trades and Pyramid Trading Strategies see the relevant documentation ref AN3 Testing Trade Pyramid Strategies using TradeSim Debugging Functions and Aids SuppressFileProcessing ExtFml1 TradeSim SuppressFileProcessing
228. dow Se 16C HO thizcsais sveaconsscace cuwwniey exaveasaencsencateewad es eacanacedaaaiceasteaiawteaacuawiateesacttaieeeusiemavtedderact 116 E ph Trade Parameters Window ccccccccccccccececsesessnssecececececeesesessnssaeseeecececeecesenssaesececececeeeeseeentaaaeeeees 116 E Trade Database Window siiossecvesccneweiesasseuirsusduriasVdanuicstiedvinwstaveiatucgeeiatheanviasapicvianeteevtinenduainsaesiaesiiadh 116 E z Tade Repo N ndoa a eee ne E EAO ES 116 E iii Trade Log WOW as ssccissicecealnsesainieeeovaence readies cinaiataousn EA EARRA CAA KAE STANAR EEEN SEANAR iN 116 E L Monte Carlo Report Window a rsacsisacs wate vsanentccanenaginciavbavesdanedesdnadesencncs A AATAS 116 E Er AN O T e E E TE E EE 116 E E Open rade eguit C Mai eair E A AEE A A S 116 E UT IN cna re N a isan iaaed E en Siamese eee gaan 116 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 8 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 E Message Lop WINdOW occiaseacicaoetiaseencedesns waqruaia ures bagecsssbaucansasasaueestasacteskasssanetealsceniavensnastucreas agaouneuss 116 E T Rejected Trades WindOW ssascccsssveriselcasacnesseesiiasncnsasasveqansadsesasessisasbersoepaceenSuetiaaesaseoeeruetsiadeaaatestaanasiss 116 E il Bnable Disable Rejected Wirades x cccscessesessseussass cx cecaes Goveand dedeussseconadicclssaeiiesaniidiiaeneawesaibcdesces Seaweartlcs 116 E Poable Disable Tade Lof o
229. ds Detailed Report TAT 2 Detailed BReporto rade Database FilenameD gt TradeSinbata TradeSinbatar Equis Bollinger Bands trbo Cancel lt Back Next gt Finish Click on Finish and then clean up as above for the Copy and Paste example You can do further cleaning up by right or left justifying the contents in the second column For example select the contents of column B by clicking on the B column header Then click on the left or right justify tool in the toolbar You also may want to add additional formatting for presentation such as color and bold etc Once you have finalized the format make sure you save it as a XLS file not a TXT file otherwise all of the formatting will be lost Comparing simulation reports in Excel For brevity some of the report results include value date or revenue percentile pairs This saves space in the reports but makes it hard to do a comparison in Excel of numeric values from one simulation report to another To separate the pairs into separate lines you need to deselect Condense Report in the Report Options in the Preferences dialog box before you run a simulation as follows 5 x Global Parameters Update Manager Security Information Host Application Settings Miscellaneous Chart Preferences Report Options Jf Append tabs to columns Condense Report Na Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 294 htt
230. e This saying has relevance to people who try and pick market tops and bottoms Picking tops and bottoms is akin to predicting the future movement of the market This is because picking a market bottom implies that the market will move higher in the near future and picking a top implies that a market will move lower in the near future Because nothing or no one can predict the future movements of the market with any accuracy trying to pick market bottoms or tops is a futile exercise Keep away from traders chat forums which are full of propaganda and stock manipulators This type of forum should have no part in your trading routine Most of these forums are full of gamblers who try to manipulate stock prices by spreading propaganda with the aim of ramping up stocks waiting for unsuspecting punters to purchase them or sell them Note that some promoters of newsletters use these techniques in a much more subtle way Usually these types of so called traders are gun slinging gamblers who scythe about their winning trades but never talk about their losing trades It is typical of a gambler to only talk about their winnings but never mentioning their losses which are usually substantially more than their winnings These sorts of people are usually abundant in a bull market and their sole purpose on a forum is to ramp up a stock trying to get that last drop out of it before they dump it onto some unsuspecting punter hence the terminology pump and dump is quit
231. e Drawdown for all of the simulations Simulation Log The following columns have been added to the Simulation Log Average Relative Percentage Drawdown This column represents the Average Relative Percentage Drawdown for each simulation Maximum Relative Percentage Drawdown This column represents the Maximum Relative Percentage Drawdown for each simulation Average Relative Dollar Drawdown This column represents the Average Relative Dollar Drawdown for each simulation QO Maximum Relative Dollar Drawdown This column represents the Maximum Relative Dollar Drawdown for each simulation Maximum Absolute Dollar Drawdown This column represents the Maximum Absolute Dollar drawdown for each simulation Maximum Absolute Percentage Drawdown This column represents the Maximum Absolute Percentage drawdown for each simulation Report Simulation Log Distributions oss Expectation Average Rel Ora Mas Ael Orawdo Average Rel Ora flax Rel Orawdown flax Abs Orawdo A b ro Naa Ugo 10 4329 o30 59 5177 45 4 177 45 00 HA 1 0203 10 4329 953 90 517 45 15 397 79 8 78 Naa Ubi 10 4329 to4r al 43 177 455 10 292 47 0 Naa 1 01024 10 30314 965 61 3 177 45 11 124 09 Naa 1 2556 10 4329 1154 21 3 177 45 15 241 57 HA 0 7342 10 4329 s data PATAS 43 177 45 49 461 70 Naa 0 7579 10 3031 2245 4 17 7 45 4 953 00 Naa 0 6656 10 4329
232. e E E E 144 Trade Database Error Report Summary cccccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 144 The Trade Parameters WindOW eescococssssseeccooossssecccooossssececoosossseececosssssseeesosssssseeseesessss L44 Money Manac cmeni ioscsdokestesticeselskced ia RAE EEEE ESENE 145 Position Sima Model Serii REEE EA E E 145 Common Trading Parameters acess seasescenosauaaisaeutetaneasansausaeueaaheaeausnsyteaacakedsyacaecauedcadegsoaraianeacauausacaveuene 145 m O A EEE ENE EA A ANAON 145 E Tan aeon O on E A N eeaasheu scuuad tanedsusecnseanetes 145 Cl Use Transaction Cost irom Trade Data base arriieersoina nai EEN EAEE E EAE 145 a Portolg Cimi cosain enti Sec tient doce latte SEEE AERAN 145 W PA PO E a E E E E AE E EE EOE 145 o Pyrid 620 oe Re E E E PEE ee EAEN 145 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 10 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 LI Initial Margin Commodities Only cccccccccccsscceessccesssecessecceseecsseccsssecceseecessseceesseceesseceeseeceeseeeesaeceesaeeess 146 Q Use Initial Margin from Trade Database Commodities Only ccccccccssccesscecesseecssseecesseceesseceesseceesseeens 146 O Point V ale Comino eS Only isisisi ap a a EANA ENA EA T EETA ia 146 Q Use Initial Margin from Trade Database Commodities Only ccccccccssccesssecessecessseecs
233. e File menu m k Save File This toolbar button is used for saving session files Printer Control O Print Current Page When it is enabled this toolbar button is used to print the current page This function is typically used to print a report or a chart NN Printer Setup This toolbar button is used to setup the printer Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 115 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Window Control E Cascade Windows This toolbar button is used to cascade windows This function can also be accessed from the Window menu Window Tile Horizontally This toolbar button is used to tile windows horizontally This function can also be accessed from the Window menu m Window Tile Vertically This toolbar button is used to tile windows vertically This function can also be accessed from the Window menu Child Window Selection E Trade Parameters Window When enabled this toolbar button selects the Trade Parameters Window and brings it to the foreground Trade Database Window When enabled this toolbar button selects the Trade Database Window and brings it to the foreground Z Trade Report Window When enabled this toolbar button selects the Trade Parameter Window and brings it to the foreground ini Trade Log Window When enabled this toolbar button selects the Trade Log Window and brings it to the foreg
234. e Stats 9 09 2002 5 00 04 PM 3 86 seconds 50 000 00 100 00 Equal Dollar Units 5 000 00 No 0 00 0 00 Stocks Process separately Process all trades Default Order Default Order 500 00 No Volume Information 1000 720 97 86 76 3 49 86 728 99 173 46 51 962 21 103 92 19 888 14 39 78 10 981 34 21 96 Maximum percentage Average percentage Minimum percentage Standard Deviation Maximum percentage Average percentage Minimum percentage of winning trades of winning trades of winning trades Losing Trade Stats of losing trades of losing Trades of losing trades Standard Deviation Average Relative Drawdown Stats Maximum of the Average Relative Percent Drawdown Average of the Average Relative Percent Drawdown Minimum of the Average Relative Percent Drawdown Standard Deviation Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 100 00 0 00 72 09 64 57 55 70 2 77 43 04 34 81 27 91 2 53 1 60 0 91 0 60 0 17 Page 236 Final Release Version 6 4 1 Average Relative Drawdown Stats Maximum of the Average Relative Dollar Drawdown 1 407 58 Average of the Average Relative Dollar Drawdown 866 01 Minimum of the Average Relative Dollar Drawdown 577 75 Standard Deviation 143 20 Maximum Absolute Drawdown Stats Maximum Absolute Dollar Drawdown 28 722
235. e a random variable because our trade simulation is a random process In fact we can now consider trading a system using a portfolio of securities to be a random process The traveling salesman problem To fully explore the capabilities of any trading system we need to look at it from a statistical point of view As an analogy consider the road map below z a Seis See EES There are many different ways for our salesman to get from point A to point B thus giving rise to various different routes the number of routes being dependent on the total number of permutations of roads and streets Similarly when trading a portfolio of securities we may have many different trading entities on a Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 227 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 given day depending on our portfolio and trading criteria defined by our trading system This gives rise to many different trading opportunities As time progresses there are many possible trading combinations or routes each resulting in a different outcome in terms of profits drawdown number of trades etc Of course all of this varies too depending on our trading parameters Advanced statistical analysis The non unique outcome when trading a system using a portfolio of securities gives rise to the need for proper statistical analysis in order to exhaustively test
236. e ae S Information AA H Display Trade Stop z Information Display Trade Maximum Minimum Information Display Chart for any symbol Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Periodicity Daily Periodicity QAN QANTAS AIRWAYS Eguis Chi Expert _ Maximum Trac de Price ere Price 5 a S S 48 50 000 t a a cna l wo wo wo wo m i0 wo wo wo wo wo i0 o wo wo wo wo wo a wo wo wo wo 5 my mj T T T m my my T T T T my mg T n T T T mj T T T 5 m m my T T m mi a mi T T m a a a J T T y m T T T D 6 6 amp 8 8 8 8 8 p SB Entry Bar S amp amp G a Volume Chart x yi wo F nm n i ig p o m o o o o m E T gt gt Date Trade No 219 Entry Date 2607 1996 Exit Date 25 08 1996 Entry Price 1 9794 Exit Price 42 0596 Initial Stop 1104 Date 09 08 1996 Open e2 1348 High 2 1576 Low 32 1318 Close 2 1576 Voll 1 209 444 amp Bar Information Trade Details Page 215 Last updated on 26 March 2009 Final Release Version 6 4 1 The Chart Toolbar The Chart window contains a toolbar that runs vertically along the left side of the window These tools are used to control how the charts are displayed In addition the left and right mouse button each introduces two other features which allow advanced panning and zooming of any part of the chart First we will describe the
237. e an apt description with the advent of traders chat forums A bull market is no substitute for brains nor is it a substitute for having a proper trading plan After a crash the same people who were in abundance on these forums high noting themselves usually drop away or revert to bleeding hearts sessions in total disbelief of the markets behaviour Having said all of this there are a number of credible traders forums on the web and the Trader Forums section at the end of this manual lists a few of them Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 276 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix A Single Security Trade Recording Examples using a MetaStock Indicator Example 1 Long Trades Only EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE InitialStop 0 optional initial stop ExtFml1l TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Long example Trade Data Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Example 2 Short Trades Only EntryTrigger Cross Mov MACD 9 E MACD EntryPrice CLOSE
238. e chart windowpane are zoomed out so that all of the chart data is displayed within the chart window mw m Chart Cursor Mode This buttons switches between a small round cross haired cursor and a long cross haired cursor TE O Toggle Auto Tags This button enables and disables chart tags When the chart tags are enabled button down and there is sufficient space to display the tags then a tag will be displayed at each point on the chart a O Toggle Auto Markers This button enables and disables chart markers When the chart markers are enabled button down and there is sufficient space to display the markers then a marker will be displayed at each point on the chart O bul Toggle 3D Attributes Toggles between standard 2D display and 3D perspective display mode 5 Yo m Toggle Equity Scale Toggles between relative equity and percentage equity scales m A Decrease line thickness When this button is clicked the line thickness decreases by one pixel When the minimum line width of one pixel is achieved this button will be grayed out so any attempt to decrease the line thickness below the minimum will have no effect Note that changing the line thickness affects all line charts simultaneously bar charts are unaffected m m Increase line thickness When this button is clicked the line thickness increases by one pixel When the maximum line width of four pixels is reached this button will be grayed out so any attempt to increase the
239. e database To disable the effects of this function either call it using a date which is lower than the earliest date in the whole security database or call the Initialize function The day and month parameters are 1 based Example The following example starts recording trades after and including the 21 April 1993 ExtFml1 TradeSim SetStartRecordDate 21 4 1993 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 86 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 SetStopRecordDate ExtFml1 TradeSim SetStopRecordDate day month year This function is used to set the latest date at which trades can be entered and recorded using the RecordTrades function Any trades with entry dates after this date will be ignored and excluded from the trade database To disable the effects of this function either call it using a date which is greater than the latest date in the whole security database or call the Initialize function The day and month parameters are 1 based Note that trades can still be recorded to the trade database if they were entered before and exit after the Stop Record Date Example The following example stops recording trades after and including the 5 June 2000 ExtFm1 TradeSim SetStopRecordDate 5 6 2000 NormalExitlfProfit ExtFml1 TradeSim NormalExitIfProfit This function exits on a v
240. e eee 116 M ML OW Wy e SS annn paeecucecuescee cneeetecepecuec paeecusseceecteconeccteaemtaeecees 116 O Siart NAN NO sssini akaa ra a kaaa iiaae erabi aidai aaia 116 Mam TV CMM BD Ir R A E A T 117 Fie RI DU a E E E E A A EER 117 E Opa ae Dino E aeaa TT de ST aes ena Sect es 117 Q SAVE Session Ue OA ON sags psccciazssassiaqacsnacageneadensgeneaaaesanvsenagniciwasiaviaaa soanauasians Hhaqahiaddat ioe bei euGatiaseatiaaedows 117 Savas Sate Session Fieis TENA a ETENAK SAE TNS 117 E Ret css heat E O E AE EA OE E EN O TAE 117 e P a A E EA A T ues AEAT A 117 E E a EE AE NOD E E TAA ES A TE ame aes eats se EAA O anes NE NA A T 117 E E 1 EE V E ETA VE E E N AEA S ETNE PEE OETI OE A 117 MEE EE i EA E A E A I A A AAE EE AA 117 EL ea ES nT I ears cceeemerrssanennnecdaninenn cine tx calwuamnesaeqanaedaseonmcatandaxusdeenascnsadiceeeneenioutt EEEN EE aeri 117 TG AN A AE AEE cou VEIT A EAE A E E A N E I E hae 117 w Pea E a TE E E E TE A enn ne Pee ee cee 117 E P e a E E Maat nie rt eet herein eee en ere 117 VAIO IN a E E nec P EEP E SE EEEE PE PS AE E AS S A NA NT AEAN 117 E E EIENEN A AIE TES TN E EE II ET T IEEE TE ETN AET 118 Ga Tile Horizontally asea E EA NAAN EEEE AATE SENNA aE EENAA 118 E Te vo oa a N E NRAN 118 E AE eae e E NEE T E EE ESE EEE E ERES 118 Wy nae E E cscs E TE ITE E E E E T dass cea TE E 118 T A A ncaccteniaus cosas enna a ae 118 Ho KEN tee E a ce ctand E E E EE O EEN EAS 118 a yiew User Mmtah nse eg eae etl aaah EAT
241. e initial equity was 1 000 when a long position was entered and the security s price increased by 10 before the long position was closed the profit would be 100 i e 10 of 1 000 However if you place this trade using a 20 margin requirement then you are able to buy 5 000 worth of the security your 1 000 is the 20 margin requirement plus 4000 or 80 of borrowed funds Thus the 10 increase in the security s price would create a 500 dollar gain 1 e 10 of 5 000 This 500 gain represents a 50 gain on your 1 000 investment Note Although the leverage provided by trading on margin can magnify trading profits it can also magnify trading losses Magnify Risk and Position Size according to Margin Requirement When using risk based models where the downside risk is contained by a protective stop then the risk for each trade is magnified by the margin requirement in much the same way as the potential profit is You can switch this feature off so that the total risk incurred by any trade will be preserved at the value that you specified in the risk position size model parameters In this case the effect of using a less than 100 margin for leveraging whilst preserving the total risk will be that more small trades will be taken instead of larger leveraged trades Use Margin Requirement from Trade Database Refer to the column description in the trade database manager Margin Requirement Interest Long Trades This is the inte
242. e made greater or equal to one SetExitPriceToProfitStop ExtFml TradeSim SetExitPriceToProfitStop Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 90 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 When used with ProfitStops forces all profit stops to exit at the profit threshold rather than the price specified by the ExitPrice parameter in the RecordTrades function This is useful for intraday exits Note When SetExitPriceToProfitStop is called the high and low of the daily range is used to make a comparison with the profit threshold for long and short trades respectively The trade is exited at the profit threshold price if the threshold is met or exceeded unless the price gaps in which the trade will exit at the opening price SetVariableProfitStop ExtFml TradeSim SetVariableProfitStop ProfitThresholdArray DELAY This function is used to automatically exit a trade irrespective of the ExitTrigger when a profit threshold exceeds an amount determined by the ProfitThresholdArray parameter Unlike the SetProfitStop function which takes a numeric constant the ProfitThresholdArray parameter can be any numeric or Metastock formula expression which evaluates to a relative dollar threshold not a percentage threshold as used in the SetProfitStop function The actual threshold used in the comparison is a snapshot of the ProfitThresholdArray when the trade 1s e
243. e of securities on the Australian Stock Exchange O Maximum Position Size Limit This field works to limit or cap the maximum position size This is a useful feature for limiting the position size to a maximum of N units A value of zero is ignored For example in commodities trading you may only want to take 1 contract per trade rather than the position size calculated according to the position size rules Note The Max Position Size Limit can work against or conflict with the Minimum Trade Size and vice versa such that trades limited to inadequate position values may be rejected if the minimum trade size is greater than zero You should really specify one or the other and be careful when specifying both O Accept Partial Trades if inadequate capital Normally TradeSim will only take a trade if there is enough trading capital to do so otherwise the trade will be rejected If the Accept Partial Trades if inadequate capital option is selected then a trade whose position value exceeds the available trading capital will be resized according to the available trading capital and the trade will be taken as long as the available trading capital exceeds the minimum trading size parameter above O Volume Rules The volume rules allow the volume information in the trade database to be used to determine whether or not trades can be taken or to limit the position size to a value that would be more realistic for the Copyright 2000 2009 by Compuvision Australia
244. e sarsett tice ph viedo cacsianideoceniec eetaostos acted Distucay ihedateles 167 Q Gross Trade ae eset esenario es ees en aE E era esq asa a Eaa a AEE aE Ea aE eTa Tai aaa EErEE aa ian aRt 167 Q Gross Trade LosSs8 00 nnn0nn0n0000eneenenenerneenorreerterrennneroererrerrretennteteetrrtrra rann teteeneerrr arnan noen orre erean ne neereererre rann e 167 U Na Ponpe T a A A E A EA A E AE 167 a Profit 3 16 cae een ner eee vn Eear Aa a ne rE eee er nee eee eee rere 167 PT TI coe ct a e Eaa Gatos e beaten owe aa e Aa ements EA E E a Deaton enecte 167 a Total Transachon 0 cy Manan rey Cena a E ne E A E OEE E AE E AEEA 167 Sl Total Slippage Valit ean er Ray Aiae ere ee eee a NaS 167 E Daily Compound Wl Val aid alm Rienie ee ee eee ee ee eee eee eee 167 LY Annualized Compound Interest Rate ccc ccccccccssccesssecesseecesseecsseccssseccssseceseeceseeeesseeeesseceesseecesseceesaeeens 167 Trade IS e A 168 a Trades Processed ieerioien anea aaie ea EE aa A a e aa a E E aaa aA ea 168 m ASST AC a rirccsiesassesiocdcwsencessuseosdaniondnociwasisannkoadensqetusunecesiemnecdswslse catmuemsueiaa enciasowausoseus sviccdoomeiesesausanetesennncaheuisele 168 Q Partial Trades Taken eee etree sane on OT eC DR NE enn nnn eee Ae 168 SIR E oe E EN EA E EA A O AE AE A A EA E EE T 168 WV RTT essaia a E A EA AEEA AEAN EAEE EEA 168 E E TS E E E AA A gu EAEE A ONE EE A E A N 168 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page
245. e selection can be achieved by holding down the Ctrl key and clicking each item in the list or alternatively a consecutive group of trades can be selected by left clicking on the first item in the list and then holding the Shift key down and left clicking the last item The resulting trade database list should now look like the following EH Trade Database Manager 0 14 09 2000 19 09 2000 0 0000 1 9500 j Long AUD 26 09 2000 2571072000 0 0 0000 1 8500 1 760 0 Long AUD 1 11 2000 18 12 2000 0 0 a1 0 0000 1 5100 1500 0 Long AUD 22 12 2000 11 01 2001 0 0 20 0 0000 1 5400 1 520 r Ea U sabia l E D 1 2400 s i ng Long Long Long AUN Long AUN I J I Long AUN 2 06 2000 20 000 I I al 5 82 8200 Long AUN D4 092000 a O00 I I 9 5 2000 Long AUN 031072000 20 10 2000 I I r 5 3500 Long AUN 02 11 2000 Lo ng AUN I Lie 7000 Long AUN n 02 02 70 J0 T 1 1 999 0871271999 0 0000 14 5000 13 500 Long BAM 221271999 0770172000 0 16 0 0000 413 5100 413 250 Long BAM 1070172000 12 01 2000 0 d 0 0000 413 4000 13 200 1970172000 1170272000 0 23 0 0000 13 5000 1 Stop Enty Date 14703 2001 6799 trades selected from a tatal of 6811 trades 4 Start Entry Date 18 11 1996 Global date selection mask You can quickly include or exclude a group of trades within a contiguous entry date range without having to go through the arduous task of selecting and unchecking the
246. e shown in the table below Class Interval Frequency Cumulative Frequency Relative Frequency Relative Cumulative Frequency 1 5 1 9 2 2 0 05 0 05 2 0 2 4 1 3 0 025 0 075 2 5 2 9 4 7 0 1 0 175 3 0 3 4 15 22 0 375 0 55 3 5 3 9 10 32 0 25 0 8 4 0 4 4 5 3 0 125 0 925 4 5 4 9 3 40 0 075 1 The information contained in this appendix was adapted from Probability and Statistics for Engineers and Scientists Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 284 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The cumulative frequency is a tally of the values in the frequency column up to that point For example the cumulative value at 2 9 is equal to frequency 1 5 1 9 frequency 2 0 2 4 frequency 2 5 2 9 1 2 4 7 The last point of the cumulative chart or table 1s always equal to the population size which in our example is 40 The information provided by a relative frequency distribution in tabular form is easier to grasp if presented graphically The Frequency and Cumulative Frequency versus the class interval is plotted in the chart below Car Battery Life iN Ql D O OO O1 OO N O1 E Frequency O Cumulative NO Frequency Ol 10 1 5 1 9 2 0 2 4 2 5 2 9 3 0 3 4 3 5 3 9 4 0 4 4 4 5 4 9 Battery Life years Relative Frequency It is more convenient to exp
247. e tare nie try rrne rh ren 220 ba E Chart Cursor Mode en mm eee een Te ED nn ne DE Re PO er Penne or 220 E a Togel AMO Tap ee eee eee re 220 E d Toggle Auto MAPK CES vsdosiags oascteganscciac ves ciaasaaioiinariagidien ates aiouaenGisane ad es RG 220 E ii Togtle ID A MODIS oen E A E E E A 220 E Toggle Eguily SCANS recante eaea Ea ANA SANEA EECa aaia iaaa aaa ia 220 oe E Decrease line thickness eeseeseseseeeeeeerresssssserererertsrressssesrrtrttetessssssstttttttteteesssststttittrtessssrererrerereesse 220 pe E A Taye gots om ine thickness eeren e E een Re E E E E eee 220 E ig Open Trade Inspector scsi ses cacessteraasea turecccn sa giensssdiecauctaeounsbasecoasealuitewndte couse deunl dsesaacseetemansaccackesieanstes 221 E Export Chtt inisenisi aa akea ene ren RE Aa AEAT ak 221 E Pio D E e E E AA E S E O E A nod 221 Plotting the Open and Closed Trade Equity Chart for one Symbol only ccccccccccccceeeeeeeeeeees 221 Plotting the Open and Closed Trade Equity Chart for one Trade only cccccccccccccccceceeeeeeeeeeees 221 Porr MC Gs MEN sc 50 5605054 acececeusessesoas2ecaneaiecseaeanaccesea eceesisuecaeanesceoneeeec NO 223 Common ParamMetesrs cceccccccccsssssecccceccaseecccccesusaeeeeccceessaeeeececeessaeeeececeeesuaeeecceeesaueeeeeeeeesaeneeeseeeeeas 223 Pee igi E eee ae ne ee een ene eee ee eer 223 Ey Plot Open trade eq rity Based On oie ciceasaccitesiae cscs ncesaoinceusswinvedsadusnewuton ive daw inenasat saa
248. e that corresponds to the exit date and hence the exit trigger of the trade Column Change This column displays the percentage change in the trade The Change is only a guide to a trade s potential profitability The true profitability of a trade will not be known until it is traded and the transaction costs and slippage are taken into account Column Exit Status This column displays the exit status for the trade The exit status indicates the way a trade was closed There are a number of exit scenarios that are stored along with the trade data for each trade o Normal Exit This type of trade exit was caused when a normal Exit Trigger forced a trade exit o Delayed Exit This type of trade exit was caused when the SetExitTriggerDelay external function was used to set an exit delay in the RecordTrades function See the section on the The TradeSim Function Library for more information o Open Trade This type of trade exit was caused when an internal mechanism in the RecordTrades function forced closure of an open trade o Stopped Out This type of trade exit was caused when the EnableProtectiveStop external function was used to force the InitialStop to be used as a protective stop in the RecordTrades function See the section on the The TradeSim Function Library for more information o Time Stop This type of trade exit was caused when the SetTimeStop external function was used to force a trade to exit after a certain number of bars have occurred
249. e total transaction cost for all of the trades taken during a simulation based on the Total Transaction Cost per Trade parameter Total Slippage Value This is the total dollar amount of slippage incurred through the course of trading The slippage depends on the order type which is controlled by the order type selection on the Trade Parameters Option Tab Irrespective of the trade position a positive slippage value always represents slippage that has reduced the overall profit whilst a negative slippage value always represents slippage that has increased the overall profit Daily Compound Interest Rate This is the equivalent daily compound interest rate based on the Total Net Profit and the Total Trade Duration Annualized Compound Interest Rate This is the equivalent annualized yearly compound interest rate based on the Total Net Profit and the Total Trade Duration It is calculated based on 365 days in each year Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 167 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Trade Statistics E Trades Processed Trades processed during a simulation which should be equal to the total number of trades in the trade database Trades Taken Total number of trades taken or executed during a simulation Partial Trades Taken Number of partial trades taken or executed during a simulation Trades Rejected Number of trades
250. e value Position value requested less than the minimum trade value Insufficient capital to meet the position size requirements Insufficient capital to meet the position size requirements Position value requested less than the minimum trade value Insufficient capital to meet the position size requirements Insufficient capital to meet the position size requirements Position value requested less than the minimum trade value jia When enabled during a simulation this window displays details about why a particular trade was rejected It is enabled via the Main Toolbar or the Tools menu iss LA fat Th Ei Click here on the Main Toolbar to enable the rejected trades report The report displays information as to why an attempted trade was rejected The report consists of four columns Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Start Simulation Page 187 Final Release Version 6 4 1 Column description QO Trade Number This the trade number in the trade database manager O Attempted Entry Date This column represents the date the trade was attempted O Symbol The column represents the stock symbol Q Trade Rejected Because This column gives a brief description as to why the trade was rejected Market price requested above entry price When calculating the market price for limit orders the long trade is reyect
251. e value of all the dollar drawdowns for one single simulation When running a Monte Carlo Simulation each simulation produces its own unique value for the Average Relative Dollar Drawdown in much the same way as it produces a unique profit outcome We can derive useful statistics from this set of outcomes just as we did for the Profit Winning and Losing Trade outcomes Maximum of the Average Relative Dollar Drawdown This is the maximum value found for the Average Relative Dollar Drawdown for all of the simulations in the Monte Carlo Analysis UO Average of the Average Relative Dollar Drawdown This is the average value calculated from the Average Relative Dollar Drawdown for all of the simulations in the Monte Carlo Analysis It is calculated by summing all of the Average Relative Dollar Drawdown outcomes and dividing it by the number of simulations QO Minimum of the Average Relative Dollar Drawdown This is the minimum value found for the Average Relative Dollar Drawdown for all of the simulations in the Monte Carlo Analysis O Standard Deviation This is the Standard Deviation of the Average Relative Dollar Drawdown for all of the simulations Maximum Absolute Peak to Valley Dollar Drawdown Stats The Absolute or Peak to Valley Dollar Drawdown is the worst case reduction in equity from an equity high point The Absolute Dollar Drawdown is described more fully in the following section Absolute Peak to Valley PV Drawdown parameters
252. e will depend on the total trading capital and the Portfolio Limit When trading commodities the Capital per Trade determines the number of contracts purchased The number of contracts purchased is calculated by dividing the Capital per Trade by the Initial Margin and rounding the result to the lowest integer E Capital per Trade This parameter specifies the amount of capital allocated to each trade When a trade position is taken the actual position size may be slightly less than this amount because only an integer number of shares or contracts can be purchased thus rounding off the total position size to a value which accommodates an integer number of shares or contracts Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 147 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 2 The Equal Percent Dollar Units Position Sizing Model In this model we allocate an amount excluding the transaction costs that is a fraction of the total trading capital to each trade This fraction is determined by the Fraction of total trade capital per trade parameter and is specified as a percentage of the available trade capital For example if this parameter is set to 10 and our initial trading capital is 50 000 then we would allocate 5 000 to any new trades irrespective of any existing trade positions that have already been taken When a trade position is taken the actual position
253. eSim Initialize Initialize internal variables Tally ExtFml TradeSim RecordTrades MACD Long and Short example Trade Data Filename LONG Trade Position Type LongEntryTrigger Entry Trigger LongEntryPrice Entry Price LongInitialStop Initial Stop LongExitTrigger Exit Trigger LongExitPrice Exit Price START Trade Recorder Control This is the SHORT trading part of the recording process ShortEntryTrigger LongExitTrigger ShortEntryPrice CLOSE ShortExitTrigger LongEntryTrigger ShortExitPrice CLOSE ShortInitialStop 0 Optional initial stop ExtFml1l TradeSim Initialize Optional call to initialize internal variables Typically you would initialize again if you had set up internal variables for the last call to the RecordTrades function but wanted to set the internal variables to the default state again before the next call to the RecordTrades function Tally Tally ExtFml TradeSim RecordTrades mn Trade Data Filename SHORT Trade Position Type ShortEntryTrigger Entry Trigger ShortEntryPrice Entry Price Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 281 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ShortInitialStop Initial Stop ShortExitTrigger Exit Trigger ShortExitPrice Exit Price CONTINUE Trade Recorder
254. ea nate raat tat alee dre ecco neta ceca eeeed se busanamendeeadseaiisesaseaceadedacteoee 101 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 7 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Me MAN SS te tees tee T semis meee cate neeesncts E E 101 APAE E ene een ene enone nee one ree nnn ren E ee men ren tne tr weer en ert ee men ren reer ee nn T teeret ete ee 101 Sero OC as ee caus tesce sesame E E S 101 E E Oea E bee spans sagan aaa seco A E 101 PonbieUserEx EocOdi n i siioni a E meceenceorcceeeenase 102 G 220 0 ce eee ene ee re ee ee eer ee ene A 102 6 01 me oD aS eae eee ee ge eo a re eae eee 103 Sl RRS gt lt 0116 E E E NP Re een en cee mR A eran Ener ee een nt Ea RE A ee enn EET 103 NTS N E tes an ets eee geese ees ee reece ee eee tee eee 104 Extended Data Value Functions sescscssacsessstasseseviesieaceuesansentesteigvexcasiestetiatesiaceesestevieitssasaesettediaionias 105 MAA ANTS Ve ANS os acess Gacntne ence usc acetal cenino mane au aouautune oh E EE N 105 Uy UNG E E I E E AE 106 ASEN O E cares ieecetes se cncmeeeaeceneeaatomeeoaes 106 Using the Column and Filter tabs to expand the formula space cccccccccscccceecceeceeceeeeeeeeeeeeeeeeeees 107 SeVarnable Volal iy as esat cr estecueatae acu E E 109 MR a O a ss apecen scsass es cars a E E E ceceda seers vonwiaatorzeams ae soaneis 109 Dynamic Selection of the Position Size Model S00 ooo cere eeesenete
255. ear which displayed the processing status of the current trade database file Version 4 0 0 of TradeSim now processes trade database files very quickly so there is no need to display the loading status After the trade database has been successfully loaded and processed the Database Manager Status dialog box will disappear and the main window will reappear if it has previously been minimized When the trade database has been successfully loaded and processed three new child windows will open up in the main window which includes the Trade Database Manager window with the newly loaded trade database 4 TradeSim Enterprise Edition MACD Crossover File Tools Window Help Ei Message Log x a Trade Database Manager if BE Trade Parameters E Trade Parameters Preferences Position Size Model Trade Parameters Stocks f Equal Dollar Units Initial Trading Capital Transaction Cost C Equal Percent Dollar Units 50000 00 it 0 00 Wee Transactiot Fired Dollar Risk Prrtholic Lirnit Margin Requirement Fired Percent Risk fi 00 00 fi 00 00 O Pyramid Profits Pyramid Trades Maximum Open Positions 100 Simulation Type ae Capital risked per trade i Portfolio Simulation 500 00 00 Portfolio Simulation Ignore Dates Basket test Position size limit C Monte Carlo Analysis fi 00 00 mor EA CAPES KAP CAPES CAP CA CAPES EAP CA EAC Total Number of trades in database 1445 Earliest Entry Date
256. ecurity Trade Data To generate trade data for multiple securities at one time we can easily adapt the same techniques that allowed us to generate trade data by applying a trade recorder indicator to a chart In this instance the MetaStock Explorer comes to the rescue Normally the MetaStock Explorer is used to allow us to search for securities that meet certain requirements defined by a combination of indicators However we can change its functionality as an explorer to one that generates trade data for a range of securities by inserting the trade recorder indicators that we created previously into one of the Column tabs in the Exploration editor in MetaStock An example of this is shown in the following indicator which we can insert into Column A tab of the Exploration editor in MetaStock ExtFml TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Long example Trade Data Filename EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control When an exploration is run MetaStock calls the above function for each security in the security list Subsequently trade data is written to a trade database file specified by the Trade Data Filename parameter in the RecordTrades function Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 76 http www
257. ed losses providing that you have employed a suitable money management strategy Trying to convince your mind that this is acceptable and your reluctance to be part of a mechanical process without any contribution from your emotional state 1s the reason why people find it difficult to pull the exit trigger when stops are hit Being conditioned to win all of the time your subconscious mind has the effect of making you believe that a Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 24 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 losing trade will turn around and eventually be profitable However what you think has no bearing on what the market will do The market doesn t care what you think the market does what the market does irrespective of what you think Having said all of this if your trading system has a positive expectation then trading losses are part and parcel of a statistically random process where over a long period of time your system should be biased towards generating a profitable outcome If you have problems grasping this concept then try to think in terms of averages in the long term rather than on a trade by trade basis Trading requires strict discipline and control of one s emotional state Hope greed and fear play no part in trading and these qualities can tend to reduce the efficiency if not completely destroy an otherwise successful trading sys
258. ed on 26 March 2009 Final Release Version 6 4 1 Transaction Cost The transaction cost specifies the cost of doing each side entry and exit of a trade It can be specified as either a fixed cost or a fractional cost which depends on the size of the trade m Fixed Cost When the transaction cost is specified as a fixed cost fixed dollar amount this option specifies the transaction cost in dollars for each side of a trade which is always assumed to be equal to the amount specified in the Transaction Cost parameter Fractional Cost When the transaction cost is specified as a fractional cost percentage of the trade size the transaction cost is calculated as a fraction of the position value for each side of a trade Because the entry and exit prices of a trade are usually different the transaction cost will be different for each side of the trade Fixed Cost per Share Contract When the transaction cost is specified as a fixed cost per share contract fixed dollar amount per share contract this option specifies the transaction cost in dollars per share contract for each side of a trade The total transaction cost for each side of the trade can be found by multiplying the number of shares contracts position size by the Transaction Cost parameter Minimum Transaction Cost This option only applies to the Fractional Cost and Fixed Cost per Share Contract transaction cost options If the Transaction Cost as calculated by either
259. ed when the Actual Entry Price 1s greater than the Limit Price which is the entry price in the trade database See the section Entry Order At Limit for more information on how limit orders are executed Market price requested below entry price When calculating the market price for limit orders the short trade is rejected when the Actual Entry Price is lower than the Limit Price which is the entry price in the trade database See the section Entry Order At Limit for more information on how limit orders are executed Position size requested is greater than limit The trade was rejected because the volume filter was enabled to reject trades if there was inadequate volume available Insufficient capital to meet the position size The trade was rejected because there was requirements insufficient capital to meet the position size requirements than or equal to zero Magnitude of risk is too small The trade was rejected because the risk was too eg litle exceeded the maximum limit Position size requested less than or equal to zero requested is less than or equal to zero Position value requested less than the minimum The trade was rejected because the position value Dynamic Cross Referencing To find out more details regarding any rejected trade you can easily cross reference the rejected trade to the trade database manager To bring up the corresponding trade data information in the trade database manager just
260. efault This option enters a trade as determined by the entry price specified in the trade database No slippage is generated using this option See the following diagram or summary table for more details High EH Close Open Low EL Default Order Trade Entry Target Entry Price ET as defined by the EntryPrice Actual Entry Price EA parameter in the Target Entry Price ET RecordTrades function T O Entry Order At Limit This option enters the market at a limit or better The market limit or target entry price is defined by the EntryPrice parameter in the RecordTrades function and a random algorithm determines the actual entry price If the actual entry price is equal to or better than the limit price then the trade is taken otherwise it is rejected If the Unconditionally Enter Trade option is enabled then the price is adjusted so that the trade is always taken The slippage is defined as the difference between the target entry price and the actual entry price See the following diagram or summary table for more details High EH Target Entry Price ET as defined by the EntryPrice parameter in the RecordTrades function Low EL Limit Order Trade Entry Valid Actual Entry Price EA Range on the Short Side ET lt EA lt EH Valid Actual Entry Price EA Range on the Long Side EL lt EA lt ET Copyright 2000 2009 by Compuvision Australi
261. egies using TradeSim Initial Margin Commodities only This parameter specifies the initial margin required for each futures contract This parameter is only visible when Commodities have been selected in the preferences Use Initial Margin from Trade Database Commodities Only Refer to the column description in the trade database manager Point Value Commodities only The parameter specifies the price quotation for one full point A Note on Point Value Point Value refers to the amount of one Big Point A big Point would be 1 point on the SPI SP or Dow or 1 point on the ED To get the value of the big point simply use the following formula Big Point in s 1 tick size tick value So for the ED 1 0 005 12 50 2 500 EMini SP 1 0 25 12 50 50 00 Use Initial Margin from Trade Database Commodities Only Refer to the column description in the trade database manager Maximum Open Positions This parameter allows you to limit the maximum number of open positions at any one time Margin Requirement Stocks Only This parameter specifies the percent of funds that you must deposit in order to place a trade This allows you to leverage your transactions For example if you trade a security with a 20 margin requirement 1 e where you are required to deposit only 20 of the actual cost of the security then a 10 move in the security s price will create a 50 gain because the trade is leveraged at 5 to 1 If th
262. el i Long AMP Daly Yes Yes 31 08 2000 09 10 Re entry Type Base 0 Long NCM Daily Yes 31708 2000 04 10 Bars 0 Long ANZ Daily Yes Yes 01709 2000 29 09 Days 3 0 Long BHP Daly Yes Yes 01 09 2000 11 09 Normal Exit 0 Long CBA Daily Yes Yes 01209 2000 27 09 Long CSL Daly Yes 01209 2000 10 10 0 Long MOG Daily es 01 09 2000 0 Long AWC Daily Yes Yes 04 09 2000 06 10 4 0502 0 Long RIO Daly Yes Yes 04 09 2000 09 10 2 09 0 Long MIG Daly Yes 05 09 2000 03 10 4 0594 0 Long NAB Daly Yes Yes 05709 2000 29 09 gt Date Time 25 08 2000 0 Long ORG Daily Yes 05 09 2000 02 10 3 9487 0 Long SUN Daily Yes 05 09 2000 06 09 gt Date Time 25 06 2000 0 Long SGP Daily Yes 06 09 2000 18 09 Traded Volume 396404 0 Long WEC Daily Yes Yes 06 09 2000 04 10 0 0000 Long CGJ Daly Yes Yes 08 09 2000 29 09 Point alue Long CMJ Daly Yes Yes 08 09 2000 06 10 Initial Margin 0 Long CWO Daily Yes Yes 08 09 2000 29 09 Max Loss A Lann WATE S Daili Yez 11 09 2000 RAGA en PANS LASA aia Start Ent Date 2370872000 Stop Entry Date 10703 2009 gt 203r trades selected frome ss Model Portfolio Limit 24 PS Farm 2 PS Parm 3 Total Number of trades in database 2837 Earliest Entry Date 23 08 2000 Latest Entry Date 10 03 2009 The Inspector can be redocked by dragging it over to the right side of the Trade Database Manager Exporting
263. eliably profitable and robust trading system that can be used across a broad market and one that will survive during periods of adverse movements in the market Some traders will argue that you need to readapt your trading system to changing market conditions however these traders never seem to be able to provide any in depth statistical analysis to substantiate their claims If you use different trading strategies for different market conditions then you will still need to back test these strategies to see where their strengths and weaknesses lie TradeSim s in depth analysis will alert you to which systems are potentially profitable and which ones to stay clear of The following fact is more of a rule than a fact and has more to do with devising a successful trading strategy than anything else It is the foundation of any good money management rules which is essential to any successful trading system Cut your losses and let your profits run Basically this rule tells us that any trading system you devise should have built in protection to minimize losses whilst maximizing profits If this rule is not adhered to in your trading system then one can be fairly certain that your trading system will be doomed to failure This is because a successful trading system is not about being profitable on every trade but rather at a minimum it 1s about preserving your capital which leads us to the next important fact regarding trading Always aim to pr
264. em 4m Open in TradeSim ie Clear Log Total Number of Errors 0 Total Number of Warnings 20 Total Number of Queries 21 20 Position Long Symbol WOW WY Array Date 06 04 2004 Open 8 2500 High 8 2500 Low 8 1800 Close 8 2100 Vol 1 941 804 EntryPrice Array 8 2100 ExitPrice Array 8 2100 InitialStop Array 7 9658 1210572004 1710572004 Fo e 20 05 2004 PRE The ToolBox is accessible when TradeSim is started If TradeSim is not already running when Metastock is started it will automatically be run so that it is immediately available When TradeSim is invoked by running Metastock TradeSim is run in a minimized state and an icon is automatically placed in the system tray which is also used for denoting the current status of the Report Log gi JARS 212m System Tary Icon for TradeSim i This icon can change depending on the status of a trade database exploration When a trade database exploration is run the appropriate icons are displayed according to the table below Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 49 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 System Tray Icon Trade Database Exploration Status When Metasock is first run the plugin automatically runs TradeSim in a minimized state Clicking on this icon will restore TradeSim to its normal SIZE When this icon is flashing a Trade Database explorat
265. eme Requesting a License Key When TradeSim is first installed and run it will operate in Trial mode for so many days with all of the features of the Standard Edition When TradeSim is run in Trial mode or the trial has expired it will always Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 42 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ask you whether or not you want to register the software in which case you should click Yes if you have purchased a valid license Then follow the on screen instructions to request a license key Once you have been sent the license key enter the details into the registration box and activate your software The current License Status The current status of your TradeSim License can be About Tradesim Registered to TradeSim OLL Plugin Version Path Host App Mot Running Mot Running Mot Running Uninstalling the Software Uninstalling TradeSim found from the Help menu ie go Help gt About x TradeSim Advanced Trading Simulator Enterprise Edition Version 6 7 0 Build 733 Status Beta release Yersion Copyright 2000 2008 by Compuvision Australia Pry Ltd Web http wm COMPpLUYVISION COM au E mail PNnquines compuvision com au TradeSim can be uninstalled one of two ways TradeSim can be uninstalled by clicking on the Add or Remove Programs software icon
266. ems BullCharts External Function Dlls Registering the Software Warning TradeSim uses an advanced copy protection scheme to thwart software piracy The protection software is transparent to the operation of the underlying software so it should impose no problems to the user Our policy regarding Copyright is that we don t believe people who genuinely purchase our products should be underwriting those who don t As a business we cannot possibly survive if our product is being stolen and resold at a discount thus depriving us of valuable revenue needed to keep our business in operation and to provide genuine purchasers with a service for which they have genuinely paid for In exchange for the minor inconvenience we offer a 12 month free upgrade period If you have been sent unsolicited emails regarding pirate trading software do not be tempted to purchase anything from these unscrupulous operators These operators are usually run by scam artists under the guise of a single person being the front runner for organized crime syndicates The software they offer does not work correctly and usually contains viruses and Trojans Also you won t be eligible to receive updates that are free if you were to purchase directly from any authorized TradeSim resellers NOTE The previous versions 4 amp 5 of TradeSim used an online activation registration scheme Due to incompatibilities on some users machines we have changed to a new file registration sch
267. eport Log when prompted by the Host Charting Application Automatically start and minimize TradeSim when Host Application starts This option allows TradeSim to start in a minimized state when the host charting application starts The default option is enabled This can be switched off so that TradeSim is only started when a trade database is run It is preferable to have TradeSim running in the background when the host application starts because there can be some side effects if it is not running and the functions required by the plugin are not available Check for Host application running before exiting This check is done when TradeSim is exited so that the user is alerted to the fact that the host application is still running and would still require TradeSim to be active if a trade database exploration is being run and the appropriate messages are sent to the report log from the host application In some cases this check can take a longer amount of time than usual Automatically popup the Report Log when prompted by the Host Charting Application Any time the host application sends a message to TradeSim to be displayed in the report log the report log automatically pops up to the foreground This can slow down the system if there are many messages being sent to TradeSim You may want to disable this option so this feature can be turned off Even if this feature is diabled the balloon hint will still be activated thus alerting the user to any ne
268. ereeees 109 LJ Example Provisional Trades and Signal Ranking using TradeSim 23S IncludeAllSignals Provisional Trades Selv ariable TradeR ank recen ane E EE EERE E EE EEEE TES 111 FE A E E A O AAA A EE E ome cantar A AE AT E 112 E E i EA A A sad anaa na aecueaaneas 112 Problems and Issues using the TradeSim Plug In eeeoococsssssseccoccssssceccccssssseeccesssssssee 113 TETIDA h T E E E E E N E E 113 BACK TESTING AND SIMULATION USING TRADESIM C00 OOOOOHOHOHHHOHHHOHHHHOHHHOHHHOHHHOOHHHHOHHOHCOOHCOCOCOCECOECECEE 114 What is a Portfolo Simulation iccisseccccccsissvedvarsescecccossusssseusscacsewerceseccstsseeessuccessessseesscsewoessds 114 Using Trade Mesrine EAE 114 MTV TVA TOU enaa 115 MNS COO etc E EE PIES A PAE EEIE T EE O E EE S ETT 115 E S Open Trade Database File cccccsccccsscceessecessseceessecesseecesseecesseccesseecseecessseceesseceesseceessecesseeeesaeeesaes 115 E kd Save 0 cee eRe ee ate ner ne eon meee Fee ne are HET EEE Naren nTeE TERR r aa ai Aiia 115 PPA 5 O00 O oa n acre acca E A cateepcneiaeauasdsone EE 115 Bo E Ponte orent Pae E eniinn Te ener AA 115 E e Po ct EAA tus AAAA TE TEANN 115 VV TOW ONION A N A EESE E AE EN A E AON E EE E EET 116 E Cacad WAO aan ree E a E ENE T 116 E Widow Tiie Horn zoma yiana a rea ree aare nwt rR nD T Rea Re enntnT Can arr set Penenr eeney nn NRE cere ene Oe 116 E m Widow Tiie yorita asosan A Renn teem ene CET Ean een Cae at cnr rte ee enn t Seer ee 116 CHld Win
269. ery good performance without any modification In fact this system dispels the myth that no system can be profitable under all market conditions Note that we have not taken into account other factors such as slippage but this will have the effect of moving the profit distribution to the left slightly The profit distribution chart follows the classic skewed bell shaped curve that falls on the right side of the chart with an average profit of 599 041 91 1 198 10 This indicates a system which is unconditionally profitable The Trade Expectation Distribution chart confirms this observation with an average positive trade expectation of 1 17 for every dollar risked The average percentage of winning trades is 60 69 whilst the average percentage of losing trades is 39 31 Without altering the trading system it is possible to improve the performance of this system further by adjusting the fraction of capital risked per trade For instance you could start from 0 5 of capital risked per trade and go up in increments of 0 05 until you find an optimum value This is a manual form of optimisation Monte Carlo Report Rand Entry Bollinger Bands Exit Simulation Summary Simulation Date 27 06 2001 Simulation Time 11 33 29 PM Simulation Duration 335 76 seconds Trade Parameters Initial Capital 50 000 00 Portfolio Limit 100 00 Position Size Model Fixed Percent Risk Percentage of capital risked per trade 1 00 Position size limit 10
270. es Maximum Number of Trades executed This is the maximum value of all of the values in the Trades Executed column of the Simulation Log The equivalent percentage value is shown in parentheses Minimum Number of Trades executed This is the minimum value of all of the values in the Trades Executed column of the Simulation Log The equivalent percentage value is shown in parentheses O Profit Stats O Average Profit This is the average value of all of the values in the Net Profit column of the Simulation Log The equivalent percentage value is shown in parentheses Maximum Profit This is the maximum value of all of the values in the Net Profit column of the Simulation Log The equivalent percentage value is shown in parentheses Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 237 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Minimum Profit This is the minimum value of all of the values in the Net Profit column of the Simulation Log The equivalent percentage value is shown in parentheses Standard Deviation This is the Standard Deviation of the profit distribution for both dollar and percentile profits For a normally distributed population the one standard deviation limits correspond to 68 of the population as the sample size approaches infinity However not all frequency distributions show normality so the 68 rule does not necessarily apply Prob
271. es function fall under any of the following categaries Recoverable Errors Initial Stop falls below 0 i e negative values Unrecoverable Errors Initial Stop greater than or equal to the Entry Price for Lang Trades Initial Stop less than or equal to the Entry Price for Short Trades When an unrecoverable error occurs the trade is immediately rejected and the Report Log is updated accordingly For recoverable errors the trade will be rejected unless the price filter is enabled using the EnablePriceFilter function in which case the relevant price breach is readjusted accordingly and the Report Log is updated with the appropriate warning Even if the protective stops are not enabled using the EnableProtectivestop function it is still important ta constrain the InitialStop price otherwise price violations can still occur Note Windows Help WinHIp32 exe is a Help program that has been included with Microsoft Windows versions starting with the Microsoft Windows 3 1 operating system However the Windows Help program has not had a major update for many releases and no longer meets Microsoft s standards Therefore starting with the release of Windows Vista the Windows Help program will not ship as a feature of Windows If you want to view 32 bit hlp files you must download and install the program WinHIp32 exe from the Microsoft Download Center Please visit http www compuvision com au Vista htm for more information on how to in
272. esents how it would actually be traded in real life You could of course use the system tester built into MetaStock however it is only limited to analysing one security at a time which is totally unrealistic of a real trader who usually trades many securities at the one time TradeSim solves these issues as well as a whole lot of other issues To use TradeSim to back test and analyse a trading system the procedure can be broken down into three steps as shown by the following flowchart diagram Step 1 Step 2 Step 3 Develop Trading Generate Trade Analyse the System Database File Trading System using TradeSim 1 Create a trading system in MetaStock that you want to analyse based on a set of entry and exit conditions as well as an optional initial stop As outlined in the introduction a framework for a trading system can basically be defined using five parameters These are Entry trigger date Entry price Exit trigger date Exit price and an optional Initial stop The optional initial stop or money management stop as it is sometimes referred to can be used with position size models that use the initial stop when calculating the position size for the trade If an initial stop is not used it should be set to zero 2 Generate trade data using the trading criteria outlined in step 1 using a special MetaStock Plug In that comes with the TradeSim package A special external formula Plug In for MetaStock has been written that allows this trade
273. eserve your capital This statement follows on from the previous statement regarding maximizing profits and minimizing losses The main purpose of any trading system is to preserve capital This may at first seem like a pointless and futile exercise because after all why would you invest all of your time and effort and risk all of your money for little or no return when you can leave the money in a bank account and earn a measly amount of interest for doing nothing However what most people don t realise is that trading offers the ability to control losses but not the profits You cannot predict how much profit you will make but you can at the very least aim to preserve your capital base by limiting your losses By controlling your losses and preserving your capital base the profits will follow Don t be concerned with how much profit you will make on any one trade If you aim to limit your losses on each trade then the profits will follow automatically Now that we have covered some of the important and unimportant issues relating to trading philosophies we shall now concentrate on issues relating to how TradeSim can fit into helping you develop a winning trading strategy rather than trying to guess a winning strategy Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 30 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The Trader s Dilemma Given a trading system
274. eserved Page 159 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Exit Order At Worst Case This option exits the market at the worst possible price on the day of exit For long positions the trade is always exited at the low of the day For short positions the trade is always exited at the high of the day See the following diagram or summary table for more details Worst Case Order Trade Exit High XH Exit at the High of the day for Short Trades XA XH Exit at the Low of the day for Long Trades XA XL Open Low XL Order Summary Table The following table summarizes the different types of order specifications Note that a negative slippage always indicates slippage that goes in favor of the trade A positive slippage always indicates slippage that goes against the trade Entry Ordering Short Trades Actual Entry Trade Slibpade Actual Entry Trade Slibpbade Price EA Taken ppag Price EA Taken ppag Order At Default EA ET Aways 0O SS EA ET Awas 0 Order At Limit Only if Only if g a EL lt EA lt ET EL lt EA lt ET EA ET ET lt EA lt EH ET lt EA lt EH ET EA Order At Limit Unconditionally EL lt EA lt ET Always EA ET ET lt EA lt EH Always ET EA Enter Trade Order At Stop Only if i Only if i ET lt EA lt EH ET lt EA lt EH EA ET EL lt EA lt ET EL lt EA lt ET ET EA A Order At Sto
275. esseeeesseceesseceesaeceessecens 169 Absolute Peak to Valley Dollar Drawdown parameters cccccccccccccccccccceeceececeeeeeeeeeeeeeeeeeeeeeeeees 169 LY Max Absolute Dollar Drawdown ceccccsccssceessecesseeessecsseceeeecseecesecsececesseceseeseseecsueceeescsseecesesseaesesaeceeeeens 169 Nap Teoh seca ce EAE E AA A utes angenes ate AANEEN ORNAS 170 A Capial valey a registrati tp bee nani craves cera p dec eaten aeeews ARAE EAE A 170 Absolute Peak to Valley Percentage Drawdown parameters ccccccccsccececcceecceeeeeeeeeeeeeeeeeeeeees 170 Q Max Absolute Percent Drawdown iis ecicuateccsnaesncssdeavsactieinscaniuaxied eannsesiathvectiadaresedsaviciassbncsslas acasiowecsciayiles 170 Bea Peak Date onesna se cat capac EAE AN ET AEREE Re eaten neue taeda eens aloe AEGNE 170 eae S AE cess ge A E ace face ea ede ENA T EOE E EAE ARE 170 Performance Summary Report Tab P E nnnnnnnnnnnnnsnnnsnrrsrerrrrererererrrrerrerrrerrrrrerrrerrrrreresens 170 Copying and Pasting the reports into another application ccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 171 chp 4 00181 AV S39 40 Coal Repons P mg ene ae ERA 171 The Trade Statistics Va orcos E NEERA EENEN EEEa 172 Trade SAIS CS Tablero ET EER 172 Conn Dese DUO ierra E EEA E R 173 mE E E EEE E E A A E E E E ETE E 173 E TaN EON aoi E E E A AE TE S AATA S E AE 173 T AO ea E E ES EE E E E 173 O Averare PrODI S Yaseen Teea ete ns ees EE ise en EE AAR 173 E O y ae e A
276. etaStock language Note The previous implementation of Protective Stops by negating the InitialStop parameter to force the RecordTrades function to use the InitialStop as a money management or protective stop is no longer supported If you are still using the previous method you will have to change it by using the new function calls otherwise negative Initial Stop values will cause an exception to occur in the RecordTrades function and flag an error To implement a protective stop based on the initial stop parameter at the time of the entry trigger use the following function calls before the RecordTrades function is called ExtFml1l TradeSim Initialize Initialize internal variables ExtFml TradeSim EnableProtectiveStop INACTIVITY DELAY ExtFml1 TradeSim RecordTrades e Where INACTIVITY DELAY is the number of bars from the entry point where the stop condition is ignored The EnableProtectiveStop function tells the RecordTrades function to use the initial stop as a protective stop For trades on the long side a protective stop is generated when the low of the day s trade is less than or equal to the initial stop For trades on the short side a protective stop is generated when the high of the day s trade is greater than or equal to the initial stop The inactivity delay specified by the INACTIVITY DELAY parameter is used to delay the point at which the stop comparison is made If the DELAY parameter is set to 0
277. etailed Drawdown Chart Same as the Closed Trade Drawdown Chart but takes into account the daily movements of price rather than just at the exit position Bar by Bar Detailed Underwater Equity Same as the Closed Trade Underwater Equity Chart but takes into account the daily movements of price rather than just at the exit position Weekly Profit Chart Same as the Closed Trade Weekly Profit Chart but takes into account the daily movements of price rather than just at the exit position Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 225 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Weekly Return Same as the Closed Trade Weekly Return Chart but takes into account the daily movements of price rather than just at the exit position Monthly Profit Chart Same as the Closed Trade Monthly Profit Chart but takes into account the daily movements of price rather than just at the exit position Monthly Return Same as the Closed Trade Monthly Return Chart but takes into account the daily movements of price rather than just at the exit position Yearly Profit Chart Same as the Closed Trade Yearly Profit Chart but takes into account the daily movements of price rather than just at the exit position Yearly Return Same as the Closed Trade Yearly Return Chart but takes into account the daily movements of price rather than just at the exit position Copyrig
278. ezees 46 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 5 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The TradeSim External DLL MetaStock PIU g IM ccccccsssssssscccccccccscessssssscccessseeees 46 Problems using the TradeSim Plug In ssssssssssecccccccccccsssssssseccecccccoccossssssssececccocososssssssesscesecesosso 48 Record Trades function limitations sssssssseceececcccccccssosssssssseccecececocosssssssssecceccococosssssssssssesecesesoo 48 The Tool BOS asies aeara EAEE EEE ESETE RN 49 The Tool Box Task Bar Mon orreen eina E EEEE 50 E O E a EAA A E A 50 Q Open Signal cea cares tastes esse assess cena casa ops esst tesse nsr eS SESSE ESSES SENE Snes sess essnee snees reenn 50 m EEN N a E A E E E AE A E I oe eee 50 Q Automatically Popup the Report Log sssssessssesssesesssresseessersssssnsessreessrrsssressrenserssressnressreessressersreessnressresse 50 E e E N a a E OAT O NE AA OAE OO AAA ENA 50 H st Conio Opon eae teeny ee eee E EE E E EE E 51 LJ Automatically start and minimize TradeSim when Host Application starts c ccccccccssccesseccesseeessseeeesees 51 Q Check for Host application running before exiting esssesessssesssressrrssersssesseressresssresstrssrsrserssrossnessnresseesse 51I Q Automatically popup the Report Log when prompted by the Host Charting Application cccceeeee 51 Rep
279. f losses may cause the trader to abandon his trading system in search of another system that may even have a worse drawdown performance Max Relative Dollar Drawdown Date This is the maximum equity drawdown and date of occurrence experienced during a trade simulation Max Relative Percentage Drawdown Date This is the maximum percentage drawdown and date of occurrence experienced during a trade simulation Note Note that the maximum dollar drawdown and the maximum percentage drawdown do not always occur at the same point in time Absolute Peak to Valley Dollar Drawdown parameters The Absolute or Peak to Valley Dollar Drawdown is the worst case dollar reduction in equity from the highest equity high point When TradeSim calculates this it looks for an equity high point peak and then proceeds to look for an equity low point valley from which it can compute the worst case drop in equity Note that an equity valley will always follow the equity peak and not the other way around If an equity chart features a continually rising equity curve with no retracement in equity then no absolute PV dollar drawdown will exist in which case the PV dollar drawdown will be undefined Q Max Absolute Dollar Drawdown The Peak to Valley dollar drawdown 1s calculated by searching for an equity high point peak followed by a search for an equity low point valley The difference in equity between these two Copyright 2000 2009 by Compuvision Austr
280. f this chapter RecordTrades function limitations Due to the limitations of the TradeSim MetaStock external DLL interface there can be a problem when you try and rerun the same exploration with different portfolios particularly when the first security is different in each of the portfolios The external Plug In contains a number of variables that keep track of the database name along with the first security symbol If you rerun a record trades exploration with a different portfolio which has a different first security symbol name the trade database file may not be reset or rewritten correctly Please keep this in mind when you are using MetaStock to create a trade database file These issues are covered in detail at the end of this chapter in Problems using the TradeSim Plug In Essentially the symptoms of this problem are that the database may contain duplicate trades or exclude some trades There are three ways around this problem 1 First use different explorations with different trade database filenames when creating trade databases using the same trading system but with different portfolios e g My Trades ASX100 My Trades ASX200 etc The idea being that you always use the same portfolio list with the same trade database file and don t use the same trade database file name with different portfolio lists 2 Runa different trade database exploration with a different trade database filename before you rerun the same trade
281. fitable After having gone through the arduous process of crafting a trading strategy this is the question you must ask yourself The ability to answer that question is the great promise that back testing holds out for all traders A successful back testing procedure will greatly reduce the probability that you will begin trading with either an unprofitable strategy or one that does not meet your expectations By adopting a sound and rigorous back testing approach you will Pinpoint which approaches to the market that is likely to be successful and which ones are not Generate good estimates of future performance for each trading strategy you test Create a record of your trading strategy s historical trading performance Produce data necessary for other components of your trading approach such as your asset allocation Strategy Profitability is not the only criterion by which a trading system should be evaluated Drawdown and stress should equally be considered as well Before you open a trading account are you satisfied that your system is reliably profitable Will drawdowns wipe out your account Is your system trading in a way you can tolerate Can you tolerate long periods of no trading or too much trading Can you tolerate a large string of losses The only way to answer these questions is to subject your trading system to extensive back testing TradeSim addresses all of these issues whilst exploring new ground in technical analysis and u
282. format Exporting the Chart as a Numeric File You can also save the numeric contents of the chart by clicking on the Data tab Export Chart x Include Paint Index jf Paint Labels If Header senes all HTML Table Delimiter Excel Series Selection Menu The Series dropdown menu allows you to select which series you want to save if the chart displays multiple series or graphs on a single chart For example with the Portfolio Heat charts display both the actual heat on a trade by trade basis as well as the maximum heat envelope so you can export either or all of the chart series Numeric File Formats E Text Saves the numeric contents of the chart as a text txt file You can also specify the delimiter character used to separate the columns of data XML Saves the numeric contents of the chart as an Extensible Markup Language XML file HTML Table Saves the numeric contents of the chart as a Hypertext Markup Language HTML file Excel Saves the numeric contents of the chart as an Microsoft Excel XLS file Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 296 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Reference Literature This list of references is by no means exhaustive but represents material which is either recommended or for general reading Recommended Reading The follow
283. from the Control Panel and selecting TradeSim from the list Alternatively TradeSim can directly be removed by running the uninstaller from the TradeSim Program menu Either way just follow the instructions of the uninstaller to uninstall TradeSim Note Uninstalling TradeSim will not remove the plugin from either or both of the Metastock or BullChart s directories This will have to be done manually as explained in the next section Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 43 Final Release Version 6 4 1 Removing the TradeSim Plugin Removing the TradeSim Plugin from Metastock Note It is recommended that you remove the plugin if TradeSim has been uninstalled otherwise every time Metastock is run the plugin will attempt to run TradeSim Make sure Metastock is not running and delete TradeSim dll from the external plugin directory It is usually installed in the following directory on your drive C Program Files Equis MetaStock External Function DLLs Note The actual directory where the plugin is installed may vary depending on how you have installed Metastock on your PC Removing the TradeSim Plugin from BullCharts Make sure BullCharts is not running and delete TradeSim dll from the external plugin directory It is usually installed in the following directory on your drive C Program Files BullSystems BullCharts External
284. g 1s automatically disabled and no charts are produced On completion of a basket test a subset of the Trade Simulation Report and an optional Trade Log are produced Monte Carlo Analysis E If you have purchased the Enterprise edition of TradeSim this comes with the advanced system tester which includes portfolio system testing as well as advanced statistical analysis This advanced system testing capability extends the capability of TradeSim by incorporating advanced statistical analysis methods Please refer to the chapter on Advanced System Testing using TradeSim Enterprise Edition for more details on this feature Default Trade Parameters The trade parameters can be set to a default state This will reset any parameter on the Trade Parameters window to a default state To do this click the right mouse button on the Trade Preferences window and select the Set to Default Parameters menu option from the popup menu Trade Preferences Tab Selecting the Preferences Tab on the Trade Parameters Window switches to the preferences page Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 151 http www compuvision com au Last updated on 26 March 2009 BS Trade Parameters Trade Parameters Preferences Trading Instrumen f Stocks Commodities Breakeven Trades Process separately Include with winning trades Include with losing trades Trade Positio
285. g Model In this model the Volatility parameter for each trade from the trade database is used to determine the position size along with the Capital Assigned to Trade This model requires a Volatility parameter to be Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 149 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 included along with each trade in the trade database that was generated with the MetaStock plug in If valid Volatility data is not detected in the trade data then this model will be disabled from the radio group For more information on generating the volatility data please read the relevant section on the SetVariableVolatility function Important This model does not limit risk in anyway unless a protective stop is used When To enable protective stops when generating a trade database please refer to the section in the previous chapter Using the Initial Stop as a Protective Money Management Stop for more details on how to do this U Capital Assigned to Trade This parameter along with the Volatility of the trade determines the total amount of capital allocated to each trade and is specified in dollars such that Position Size Capital Assigned to Trade Volatility O Position Value Size Limit This parameter limits the maximum position value size of any one trade to a value that is a fraction of the total trading capital at the time the
286. gestion 1s to get out of the market right now because like a gambler at a casino the market will eventually take all of your money from you Lastly for those that have stuck by their trading plan and have broken even you have been successful in trading because you have achieved the minimum goal of preserving your capital under the worst possible market conditions By now you will have realised the importance of having a proper trading plan A trader without a plan is like a ship without a rudder you can go forth but you won t necessarily get to your destination You need a trading plan since trading is essentially a psychological endeavour and a trading plan is a way of conditioning the mind into behaving in a way that is necessary to survive in the marketplace It is usually said that trading is 90 psychological development and 10 system development However if you don t get the system development right then the 90 psychological effort will be a lot of hard work and stress for nothing TradeSim or any other technical analysis software won t make you a good trader by itself After all it s not the software that ends up doing the trading it 1s you Similarly a screwdriver won t make a good car mechanic it s how the mechanic uses the screwdriver that counts TradeSim is a tool that allows one to objectively develop a successful trading system After that it is up to you as a trader to implement this trading system as accurately as possible wi
287. gger ShortEntryPrice CLOSE ShortExitTrigger LongEntryTrigger ShortExitPrice CLOSE ShortInitialStop 0 Optional initial stop ExtFml TradeSim Initialize Optional call to initialize internal variables Typically you would initialize again if you had set up internal variables for the last call to the RecordTrades function but wanted to set the internal variables to the default state again before the next call to the RecordTrades function ExtFml TradeSim RecordTrades H Not needed here SHORT Trade Position Type ShortEntryTrigger Entry Trigger Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 278 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ShortEntryPrice Entry Price ShortInitialStop Initial Stop ShortExitTrigger Exit Trigger ShortExitPrice Exit Price CONTINUE Trade Recorder Control Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 279 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix B Multiple Security Trade Recording Examples using the MetaStock Explorer Example 1 Long Trades Only EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE InitialStop 0 optional initial stop ExtFm
288. given exit date the trade that was the last trade entered 1 e highest trade number is the first trade that 1s closed out o First in First Out LIFO For a group of trades with a given exit date the trade that was the first trade entered 1 e lowest trade number is the first trade that is closed out Allow Price Violations 333 Enabling this option allows TradeSim to accept invalid price data which consists of entry and exit prices that lie outside their respective daily range It is usually used in conjunction with the reciprocal AllowInvalidPriceData function in the function library Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 122 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Version Update Manager M Automatically Check for Final Release Updates from the eb Automatically Check for Pre release Beta Updates from the Web Ea Check for Updates Mow The Version Update Manager allows TradeSim to check to see whether a new version is available for download from the web It can check this every time the program is run or it can be forced to check for an update Any time version checking is done the following dialogue box will momentarily appear indicating that checking is in progress Web Update a X a Checking tor updates from the web Version information is stored on the web and is compared to the current version of the software
289. hanging the Distribution Chart display defaults 0000000000000000000000000eeeoeeeeeeesneeseessesssssssssssssssssss 178 E Fregoency Dioplay eee eee ee eee 178 Q Bats th Distribution CAME pis sccccasscccavsensscanastacetessutaceendxusiavennnse saad creshesansceasadancen sabasesanidckatensnsosscindanedexeaacenendeves 179 is Pots ay aad Af sfc a eee ee eo ee ee ee ee ee ne ree nee eee eee eee ees 179 The Wr Age LOO Vy eM enea E avertsacivin scenester eateries 179 Commn CES CII 16 225 an esearape ae ctenceaccraceenstanescaquan ecsatencsendeaetacsatnscsdeueaeanaccuesaet sack vancadeusaxeenteloncsceeeace 180 OE RE a tae belo gt emereneee Nene E E E Tete NT TNC Mre EE O 180 A Coluna Trade iss cit ct ei nese ented endian ca antec ti adic tesetesnnsetase 180 E eben spades scl Seen eee eee eee ee ee ee ee eee ee ee rer 180 G Column Sy DO less accaacsextsaenmosasndccctanerenasiunstsantestacannanswntaraarnusiasesestuader susan cant ANESORE AEAEE ATEENAS 180 Ek Conn Aa as esc ct ceca capo encase tease E NA E NE LEE 180 E OM P O aA E A E eres AA E EA AA dee ee EEA 180 EY Column Perodicily armeani a aN E AAA EAA EAE A 180 O Column Trans Date Time S03 i icccsccssscsscstssssssusscstssssnsnsssstsessnsnsesesesenansess 180 Eh Be 800 hai E eee rene emer ee rere eee E nies rita E ner ne titre etree tert tt 181 LI Column Pyramid Re entry Stats occidocscsvcccsvaccensccesacdivsnasesvaverustexiavanteasvan dapendanssassanes ooadacctiereusdebcasaene
290. harts Help Created with MetaStock by Equis 2001 Using the TradeSim Plug In function library An alternative and more accurate way of controlling the range of trade data produced is to only include trades with entry dates that fall within a certain range This can be done with the aid of two functions from the TradeSim Plug In Function Library The SetStartRecordDate function is used to set the earliest date at which trades can be taken and recorded using the RecordTrades function Any trades with entry dates before this date will be ignored and excluded from the trade database For more information see the section on SetStartRecordDate function The SetStopRecordDate function is used to set the latest date at which trades can be entered and recorded using the RecordTrades function Any entry dates after this date will be ignored and excluded from the trade database For more information see the section on SetStopRecordDate Note When using these functions you still have to adjust the amount of data that MetaStock loads for each security such that the amount of data loaded overlaps the range of dates of interest otherwise some trades which fall within the range will not be included in the trade database O Example Inserting the following code prior to a call to the RecordTrades function only allows trades that fall between 21 April 1998 and 5 June 2000 to be recorded to the trade database ExtFml TradeSim Initialize ExtF
291. he Profit Distribution chart with 20 bars displayed Note how the distribution chart looks similar to the classic bell shaped normal probability distribution function bte 4 4 Shown below are the Winning Trades and Losing Trades distribution charts Like the Profit Distribution charts both the Winning and Losing Trades Distribution charts approximate the classic bell shaped normal probability distribution function ee Se a a I I I any ole es Me ee A te ee a a S I I ot bay ee ey a eI a S ed ts lt ee hw l ee l air ee SS a A ais aaa aa aa aa aa aa ee eS Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 247 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Improving the trading system Using the results obtained from the Monte Carlo analysis we can conclude that the MACD Crossover trading system is a very mediocre trading system and one that is not worth trading the way it is and we haven t included transaction costs in the simulations This trading system has a higher probability of producing a net loss than a profit Its winning trade percentage 1s very low Note that we have not experimented with different position sizing models which could be used to improve the bottom line profitability nor have we included transaction costs which will have the effect of reducing net profitability and shifting the bell curve to the
292. he minimum value of all of the values in the Winning Trades column of the Simulation Log Standard Deviation This is the standard deviation of all of the values in the Winning Trades column of the Simulation Log For a normally distributed population the one standard deviation limits correspond to 68 of the population as the sample size approaches infinity However not all frequency distributions show normality so the 68 rule does not necessarily apply Losing Trades Stats O Average percentage of losing trades This is the average value of all of the values in the Losing Trades column of the Simulation Log ies percentage of losing trades This is the maximum value of all of the values in the Losing Trades column of the Simulation Log Minimum percentage of losing trades This is the minimum value of all of the values in the Losing Trades column of the Simulation Log Standard Deviation This is the standard deviation of all of the values in the Losing Trades column of the Simulation Log For a normally distributed population the one standard deviation limits correspond to 68 of the population as the sample size approaches infinity However not all frequency distributions show normality so the 68 rule does not necessarily apply O Drawdown Stats Versions 2 4 0 and later include drawdown stats Please see the Addendum to TradeSim Enterprise at the end of this chapter for more details Copyright 20
293. he realized net profit per trade on a trade by trade basis When inspecting this chart you should look for a fairly linear rising equity curve irrespective of time A good trading system will generate a rising equity curve irrespective of market conditions A trading system that produces an equity curve which rises and falls above the zero line should be avoided Note The equity plots only include the time at which a trade or trades were exited and do not take into account any open profits losses or any other days where no trading activity took place Total Equity Scale You can display the Total Equity Scale on the right hand side of the Equity Y chart and Equity chart It is enabled from the global preferences dialog box The Total Equity Scale incorporates the Initial Capital value Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 195 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Weekly Profit 433 This chart displays the weekly profit versus week Note that for simulations that ignore entry date this chart is not produced Green bars represent months that were profitable whereas red bars represent months that produced losses Weekly Return 439532 The Weekly Return chart displays a cumulative profit return on a weekly adjusted basis Green bars represent months that were profitable whereas red bars represent months that produ
294. her Long or Short for trades taken on the long or short sides respectively O Column Periodicity Refer to the description for the Trade Database Manager O Column Trans Date Time 493309 This column represents that date at which the trade transaction took place If the time stamp is non zero then it will be displayed in 24 hours time format alongside the date in the form of HH MM TTT where HH represents hours 23 0 MM represents minutes 59 0 and TTT represents Ticks 999 0 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 180 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Column Level This column represents the pyramid level of the trade More information regarding trade pyramid strategies can be found from the following Application Note O Column Pyramid Re entry status This column represents the pyramid re entry status of the trade More information regarding trade pyramid strategies can be found from the following Application Note Column Days in trade This column which was formally called Bars represents the number of days in the trade TradeSim uses the starting and ending dates of each trade to calculate the number of days between the entry and exit dates It does not distinguish between trading and non trading days Column Initial Stop This column represents the optional initial stop value contained in the trade database and is the same
295. his column represent the amount of capital risked on entry to each trade otherwise N A will be displayed indicating that the value is not applicable to the position size model used For trade exit conditions the value displayed 1s identical to the value on trade entry Note Even though the initial stop value may be present in the trade database the portfolio heat and trade risk only have relevance when a protective stop is used to exit a trade if the initial stop has been violated To enable protective stops when generating a trade database please refer to the section in the previous chapter on Using the Initial Stop as a Protective Money Management Stop QO Column Initial Risk P E For the risk based position size models the entry in this column represents the amount of capital risked as a fraction of the total trading capital on entry to each trade If a non risk based position size model has been selected then M A will be displayed indicating that the value is not applicable to the position size model used For trade exit conditions a dash is displayed indicating that the value is not relevant Note Even though the initial stop value may be present in the trade database the portfolio heat and trade risk only have relevance when a protective stop is used to exit a trade if the initial stop has been violated To enable protective stops when generating a trade database please refer to the section in the previous chapter on Using the Initial
296. ht 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 226 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Advanced System Testing using TradeSim Enterprise Edition Introduction In the previous chapter we used TradeSim to objectively simulate a trading system using trade data that was generated using MetaStock and the external RecordTrades function We used the RecordTrades external function along with MetaStock to generate trade data from a portfolio of securities and then ran trade simulations using TradeSim This gave us a much better and conclusive picture of the trading system s capability compared to the results of simulators or back testers that only used one security However we also learnt that running simulations with random stock selection produced different results at the end of every simulation illustrating the point that using a portfolio instead of a single security produced varying results Running many simulations on our trade data gave us some idea of the performance of our trading system A single trade simulation of our trading system on a portfolio can only give us limited information regarding the performance of our trading system even though we have traded it across a large portfolio of securities It is just a single snapshot of one of the many possible outcomes of our trading system In statistical terms the outcome of our trading system can be considered to b
297. ht all cumently Open Mads erenneren T aeeseeneaaisteciecseaaiets 186 Plot Open Irade EQuity CW att ireccccteccceccecanvecebsorcntecsosweteudouesneedeteenessatdatnastancanecendounastinern seeeeeueesecweueiteane 186 Display Trade on 01 1 Renee nent een E er ee ae oe een eo er eee ee a 187 Expornine the Trade Log P E F cieee E N E EE 187 The Rejectod Trades WindoWecsansceiisiiiiisiain ae aiaa Ea Ta 187 Conr CSS CIA ON eiee EEE 188 e eN aa E A E AE A EE 188 O Attempted Entry Date seniidis aen ai aE a ene E AEE NE A EKO ene eee een 188 M E E E ES ENEE EEE ENE NE AA EEEE A EA SE E E E E AE EAT 188 A Trade Rejected CAS rcs ccassascrataneosuniuasusiesnatowassianenadanantawaroadiaeutusdnsesnasaswianeonoustwaakwecdeotasanstanesnianamnuatoaierss 188 Dynamic Cross FRC ee CO aortas cee hs ete eee eine ate re ence cece he EEE AEE EE EE 188 TNS haris VIN Wy assess teases innia R EEE 189 Sie i OCG a E E A EEA A EE A E 189 Chanoine the Charn Tine Seale csaten ota ccrsenceceneocaudereruucaedensanasdanmacuedeusacasacneatasdensanasdeupagaedesacandusnne 189 Q Compressed Time Scale oiscsssaccvesisasceaysdicicasvncnteaanesadiqasasvsesapsaidinasinndaasigastasiadastaajicddiandnisaetejuaeaia asain 190 H Linea Time oeae een ne eee eee ee one ee eee 190 Te Ais NO lO Al e E A E 19 E A010 0010 1 eee Pn tne A OnE ee eT tne OR E E en eS E ee A ee nee 19 E E FATE E i ON P OO OE AO EE A T E AA T O A 191 E A E PEELE 2s PTEE EE assess E ETE A es 191 pr E Chart Curs
298. ibrary for more information Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 181 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 o Time Stop This type of trade exit was caused when the SetTimeStop external function was used to force a trade to exit after a certain number of bars have occurred See the section on the The TradeSim Function Library for more information Column Trade Capital This column represents the total trading capital at the time of trade entry This value represents the total value of the trading capital pool irrespective of whether any capital has already been allocated to pending trades For example if your initial capital is 50 000 and you have already allocated 10 000 to two existing trade positions then your trade capital is still 50 000 not 40 000 If profit compounding is disabled then when you exit an existing trade with a loss your trade capital will decrease by the same amount lost however if you exit with a profit then the trade capital will always be maintained at a level equal to the Initial Capital level and any excess will be stored in a cash reserve If profit compounding is enabled then the trade capital will increase as you exit trade positions with a net trade profit and will decrease when you exit trade positions with a net trade loss Q Column Initial Risk P E For the risk based position size models the entry in t
299. ice gt High High if EntryPrice lt Low Low EntryPrice ActualExitPrice if ExitPrice gt High High if ExitPrice lt Low Low ExitPrice Note By default the price filter is switched on so that price checking and adjusting is automatically done so that all trades will be accepted If a price violation is detected then a warning will be issued to the report log and the prices will be constrained If the price filter 1s switched off using DisablePrice Filter then price checking is still done but any price violations will cause the respective trade to be rejected and an error message will be reported to the report log DisablePriceFilter ExtFml1 TradeSim DisablePriceFilter By disabling the internal price filter if prices fall outside the daily range then the trade will be rejected and an error reported to the Trade Log This is done to avoid synthesizing prices that were never present in the historical data in order to maintain realistic simulations Disabling the price filter does not allow the prices to be constrained so that if the price falls outside the range of the respective bar the trade will be rejected and an error will be reported to the report log Note By default the price filter is switched on so that price checking and adjusting is automatically done so that all trades will be accepted If a price violation is detected then a warning will be issued to the report log and the prices will be constrained If the price filte
300. im you should read the chapter Quick Start Tutorial After you have familiarized yourself with the operation of TradeSim then you should reread this manual from the start Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 44 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Quick Start Tutorial This chapter has been moved into a separate document called Quick Start Tutorial This document will have been installed in the TradeSim Program directory and can be viewed by accessing the TradeSim Program menu or via the Help menu in TradeSim Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 45 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Generating Trade Data Note It is strongly recommended that you always rebuild your trade database files with the latest Metastock TradeSim Plug In before simulating them with TradeSim Small changes to the trade database produced by later versions of the Plug In can sometimes have dramatic effects on the simulation results The current Version of TradeSim dll Metastock Plugin is Version 8 0 0 Please check the Readme file installed with TradeSim for the revision list of the current Plug In To analyse a trading system using TradeSim requires a source of trade data This should not be confused with security data that is used by the charting program itself
301. imum Consecutive Losing Trades erasini irna EEEE anaes 168 Q Average Consecutive Winning Trades cccccccccecssccesssccesseccesseecesseeceseccesseccesseceesseceesseceessecesseecesseceesseeess 168 G Average Consecutive Losme Trades sc asocsnsiccsins cus icanseawseaan iiaia iie Cesana NANAREN E AA ETRAS 168 Trade Expectation Stats Risk based PS models only ccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 168 Q Expectation per dollar risked ssscvess5 ccsessascactsenacasncennginasdtgupanintaninantaa ouside eer adasinsdbeiouaniaeauaeds 169 Q Maximum Reward Risk ratio or R multiple ccc cccsscccssececsseceesseccesseceesseceesseceesseceeseecesseecesseeceseeeess 169 LJ Minimum Reward Risk ratio or R multiple ccc ccssscecsseceesseceesseceesseceesseceesseceessecesssecesseecesseeeesaeeess 169 LI Average positive Reward Risk or R multiple ratio c cccccescccesscecsssceeseeeesseecesseecesseceesseceesseceesaeceeeeeeees 169 LI Average negative Reward Risk or R multiple ratio 0 0 ccc cccsccesscccssscecssseeesseccesseceesseceesseccesseecesseeceseeens 169 Relative Diiwdowa paramers faa er cee cena teetee a thee ecec ceca ents iced moana ccecehn ee necemtcies 169 LY Max Relative Dollar Drawdown Date cccccccccssccesssccesseecesseeceseccsssecesseecesseeceseecesseceesseceesseecenseceesaeeess 169 LJ Max Relative Percentage Drawdown Date cccccccsscceesseceesseecessecesseeeesseecesseecesseec
302. in used in the trade and is only valid for commodities otherwise N A is displayed Column Max Loss Commodities only This column displays the actual Maximum Loss used in the trade and is only valid for commodities otherwise N A is displayed Column Margin Requirement This column displays the actual Margin Requirement used in the trade and is only valid for stocks otherwise N A is displayed Column MAE This column represents the Maximum Adverse Excursion MAE of the trade in dollar terms Column MAE This column represents the Maximum Adverse Excursion MAE of the trade in percentage terms Column MFE This column represents the Maximum Favorable Excursion MFE of the trade in dollar terms Column MFE This column represents the Maximum Favorable Excursion MFE of the trade in percentage terms Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 184 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Sorting the columns Clicking on the column headers activates a sorting routine which resorts the list according to the information contained in the respective column For example clicking on the Entry Price header will sort the list in ascending descending based on the numeric value of the entry price Likewise clicking on the Symbol will sort the list based on the alphabetical ordering of the symbol column Alternately clicking on the s
303. inal Release Version 6 4 1 SetVariableVolatility ExtFml TradeSim SetVariableVolatility ValueArray This function assigns a volatility value to each trade according to the ValueArray parameter This allows the volatility position size models to be used in TradeSim Note To contain your downside risk you still need use a protective stop However unlike the risk position size models in TradeSim the risk can be independent of the volatility and hence the position size Example The following example is the complete trade database exploration code for an MACD trading system which assigns a volatility to each trade based on a 10 period ATR EntryTrigger Ref Cross MACD Mov MACD 9 E 1 EntryPrice OPEN ExitTrigger Ref Cross Mov MACD 9 E MACD 1 ExitPrice CLOSE InitialStop 0 No Initial Stop used ExtFml TradeSim Initialize ExtFml TradeSim SetVariableVolatility 3 ATR 10 ExtFml TradeSim RecordTrades ExitPrice Exit Price Test Trade Rank Trade Database Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Optional Initial Stop ExitTrigger Exit Trigger START Recorder Control Dynamic Selection of the Position Size Model 445 Version 6 of TradeSim Enterprise Edition supports dynamic position size selection on a trade by trade basis or symbol basis The Metastock plugin allows s
304. ing and copying the code into the clipboard followed by pasting the code directly into a MetaStock Indicator or Exploration Once the code has been exported into MetaStock it can easily be changed to suit your needs or application Feel free to use the examples as they are or experiment by modifying the examples Important You can save time re typing in formulas from the TradeSim User manual by copying and pasting formulas from the TradeSim User manual To do this you have to click on the Text Select Tool on the Adobe Acrobat Reader Toolbar 1 e the one with the T and square lasso next to it Alternatively just press the v key once you are in the Adobe reader Once this is enabled you can copy and paste formulas from the manual as you would in a word processor or text editor Feature Comparison and Version Support The following table compares the feature set between different versions of the software The higher software version always contains a superset of the lower versions e g the Professional Edition of TradeSim contains all of the features of the Standard Edition This manual describes all features whether or not they are supported by the current version that you have purchased Unless otherwise specified a description in this manual applies to all versions Standard Professional and Enterprise editions If a feature pertains to a higher version of the software such as the Professional or Enterprise editions then a suffix will be adde
305. ing performance Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 251 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 One possible explanation to this behaviour is contrarian opinion which states that the majority consensus of all of the market participants is wrong and if you follow the majority you will most likely be wrong as well The standard MACD Crossover trading system is touted in nearly every book on technical analysis and as a result a majority of traders are using it without realising its potential downside As a result of this the majority of traders using this system will be wrong and produce unsatisfactory results as evidenced by the results from the Monte Carlo analysis The minority of traders who use the modified MACD Crossover system go against the herd and produce positive results and this is what is substantiated by the results of the Monte Carlo simulations Case Study Random Entry Bollinger Bands Exit System The next example we shall look at is a Random Entry system with a Bollinger Band exit and an Initial Stop based on the Average True Range The Bollinger Band exit trigger is adapted from the Equis Bollinger Band Expert If you have installed the trade database examples you will find the trade database for this system in the TradeSim data directory A set of indicators for the trading system is given below EntryTrig ExtFm1 TradeSim Rand
306. ing references are ones that provide relevant background material for using TradeSim 1 Compuvision Australia TradeSim Quick Start Tutorial 2 Equis MetaStock for Windows 95 98 amp NT This is the user manual that comes with MetaStock Version 7 0 and is a prerequisite for using TradeSim 3 Van K Tharp Trade your way to financial freedom McGraw Hill 4 Mark Jurik Computerized Trading Prentice Hall TradeSim Application Notes Note If any of these articles are missing they can be downloaded from the following website location http www compuvision com au Articles htm 5 ANI Generating a Portfolio Security List in MetaStock the Easy Way 6 AN2 Implementing Volatility Trailing Stops the Simple Way 7 AN3 Testing Trade Pyramid Strategies using TradeSim 8 AN4 Creating a Trade Database with Multiple Periodicity 9 AN5 Survivorship Bias Free Back Testing using TradeSim 10 AN6 Provisional Trades and Signal Ranking 11 AN7 Simulating CFD s using Variable Margin Requirement TradeSim Technical Briefs Note If any of these articles are missing they can be downloaded from the following website location http www compuvision com au Articles htm 12 TB1 Problems and Issues using the TradeSim MetaStock Plug In 13 TB2 The Universal Text Trade Database File Format General Reading and References The following references are ones that the author has read and recommend for general reading This list 1s by no
307. ing than using the MetaStock REF function as the delay is done automatically for you All you have to do is specify what the entry and exit prices are to be on the following day which is usually the opening price Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 69 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 EntryPrice OPEN EntryTrigger Cross MACD Mov MACD 9 E ExitPrice OPEN ExitTrigger Cross Mov MACD 9 E MACD InitialStop 0 optional initial stop ExtFml TradeSim Initialize Initialize internal variables ExtFml TradeSim EnableDelayOfEntryByOneBar delay entry trigger by one bar ExtFml TradeSim EnableDelayOfA11ExitsByOneBar delay all internal external exit triggers by one bar ExtFml TradeSim RecordTrades MACD Long example Trade Data Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Other Entry variations Other variations of entry and exit conditions are possible You can use the MetaStock indicator language to redefine your entry or exit conditions to better match your actual trading conditions For example you may only want to enter the market if you have an entry trigger and the price at the opening
308. ins a toolbar that runs vertically along the left side of the window These tools are used to control how the charts are displayed In addition the left and right mouse button each introduces two other features which allow advanced panning and zooming of any part of the chart First we will describe the basic function of each tool in the Charts toolbar E Zoom in When this button is clicked the contents of the chart windowpane are zoomed in by a fixed amount Zoom Out When this button is clicked the contents of the chart windowpane are zoomed out by a fixed amount Zoom All When this button is clicked the contents of the chart windowpane are reset to their default state whereby the chart windowpane displays all of the chart points po Chart Cursor Mode This buttons switches between a small round cross haired cursor and a long cross haired cursor me Toggle Auto Tags This button enables and disables chart tags When the chart tags are enabled button down and there is sufficient space to display the tags then a tag will be displayed at each point on the chart Right clicking the mouse on this button will present a popup menu with a number of options v Display Y axis value in Tag only Display axis label in Tag only Display both axis label and axis value in Tag Font Size o Display Y axis value in Tag only Displays the Y axis value in the tag o Display X axis label in Tag only Displays the X axis labe
309. instance dates are exported as decimal values 1 e 20 November 2000 is option below and the day and month are being transposed when importing into Excel e Comma Separated Values file formatted dates csv Note In this instance dates are exported exactly as they appear in the trade database manager You should use the long date format export option above if the day and month fields are being transposed when importing into Excel To access this facility just right click on the Trade Log Window and select the Export Trade Log option from the popup menu A file save dialogue box will appear asking you to select the appropriate file and file format Select the appropriate file format from the Save as Type drop down menu and then select a file or use the optional filename given in the File Name field You do not need to specify a file extension as one will be automatically appended The Rejected Trades Window Attempted Entry Date Trade rejected because 10 02 92 05 11 92 01 10 953 10 12 93 22 03 94 24 03 44 17 06 94 11 07 94 12 07 94 20 07 94 05 08 94 05 08 94 23 08 34 Position value requested less than the minimum trade value Position value requested less than the minimum trade value Position value requested less than the minimum trade value Position value requested less than the minimum trade value Position value requested less than the minimum trade value Position value requested less than the minimum trad
310. investigating the possibility of developing my own system development tools What started as a casual affair has turned into a full time project and the resulting effort 1s TradeSim I hope that anyone using this software will find it as useful in developing his or her own trading systems as it has been in developing my own As this user manual is continually evolving there is always a possibility for errors and omissions to creep in If you spot any errors or inconsistencies please do not hesitate to contact me at feedback compuvision com au Also if you have any other suggestions or ideas about the software or the manual please do not hesitate to contact me Acknowledgements Thanks and acknowledgement must be given to the feedback provided by countless number of TradeSim users for their ideas suggestions and bug reports Without your help the product wouldn t have advanced to the level it is today Yours Sincerely David Samborsky David Samborsky B E Communications R M I T Melbourne Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 25 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Introduction The importance of back testing When trading what is the question in most traders minds To answer this question I shall quote the introduction from Chapter 8 Back Testing of Mark Jurik s book Computerized Trading4 Will my trading strategy be pro
311. ion S i iit Sh S S Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 36 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Enterprise Edition Open Trade Charts Standard Edition Professional Edition Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 37 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 MetaStock Interface Standard Edition Professional Edition Enterprise Edition v SS ees ee SARS D Miscellaneous Standard Edition Professional Edition Enterprise Edition afoot 1 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 38 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Software Requirements To generate trade data for use with TradeSim you will need MetaStock Version 7 0 or above If you are using an earlier version of MetaStock you will need to contact Equis www equis com or the vendor you purchased your software from in order to upgrade to a later version The following information suggests configurations for using TradeSim Minimum Configuration Microsoft Windows Windows 2000 Windows XP Pentium III or Equivalent running at 800MHz 256 Megabytes 256 Mb for XP and 2000 of RAM or greater 20 Megabytes of free hard disk space Screen Reso
312. ion Long Symbol WOW The report log is divided up into a number of columns The first column displays an icon which provides visual feedback for the type of message reported The second column displays the current call iteration to the RecordTrades function Where there is more than one call to the RecordTrades function within the exploration code the iteration will increment in accordance with the number of calls for each pass of the exploration code The third column displays the security symbol If a trade database exploration is being run then the symbol will change from one security to another The fourth column displays the trade positions which can be either Long or Short trades that correspond to the position parameter passed to the RecordTrades function Note If rerunning a trade database does not reset the security counter back to 1 and if you have not instructed the RecordTrades function to append trades to an existing trade database then you will need to delete the trade database and rerun your trade database exploration again This can be done from the File menu in the Report Log Report Messages The messages can be broken down into the following categories O x Error Messages Error messages are reported when serious errors occur and attention is required O r Warning Messages Warning messages are reported when the user needs to be alerted to issues which may cause the results to depart from what is expected
313. ion Australia Pty Ltd All Rights Reserved Page 258 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Break Even Trades Process separately Trade Position Type Process all trades Entry Order Type Default Order Exit Order Type Default Order Minimum Trade Size 0 00 Accept Partial Trades No Volume Filter Ignore Volume Information Simulation Stats Number of trade simulations 200 Trades processed per simulation 3018 Maximum Number of Trades Executed 295 Average Number of Trades Executed 232 Minimum Number of Trades Executed 164 Standard Deviation 22 18 Profit Stats Maximum Profit 63 745 30 1274 90 Average Profit 8 177 54 163 55 Minimum Profit 4 937 59 98 75 Probability of Profit 78 50 Probability of Loss 21 50 Winning Trade Stats Maximum percentage of winning trades 55 60 Average percentage of winning trades 39 30 Minimum percentage of winning trades 19 10 Standard Deviation 6 14 Losing Trade Stats Maximum percentage of losing trades 80 90 Average percentage of losing Trades 60 69 Minimum percentage of losing trades 44 40 Standard Deviation 6 13 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 259 Final Release Version 6 4 1 4 f He tr treo Comments As we predicted starting with a lower capital base has the effect of redu
314. ion Summary Simulation Date Date at which the trade simulation was started O Simulation Time Time at which the trade simulation was started Simulation Duration Duration of the simulation Trade Summary UO Earliest Entry Date This is the earliest entry date in the trade database U Latest Entry Date This is the latest entry date in the trade database UO Earliest Exit Date This is the earliest exit date in the trade database O Latest Exit Date This is the latest exit date in the trade database Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 166 http www compuvision com au Last updated on 26 March 2009 E Q Q Final Release Version 6 4 1 First Trade Entry Date This is the entry date of the first trade executed Last Trade Exit Date This is the exit date of the last trade executed Total Trading Duration This is total the number of days including non trading days that took place between First Trade Entry Date and the Last Trade Exit Date Profit Summary E E Profit Status Description of the profit outcome i e Net Profit Net Loss or Bankrupt Starting Capital This is the same as the Initial Capital Finishing Capital This is the total net capital after a simulation has completed Maximum Equity Date This is the Maximum Equity encountered and date of occurrence throughout the Trade Simulation Minimum Equity Date This is the Minimum Equit
315. ion has been run from fa within Metastock and informational messages have been written to the Report Log The Report Log will automatically be displayed When this icon is flashing a Trade Database exploration has been run from within Metastock and information as well as warning messages have been written to the Report Log The Report Log will automatically be displayed When this icon is flashing a Trade Database exploration has been run from te within Metastock and information warning as well as error messages has been written to the Report Log The Report Log will automatically be displayed Clicking with the right mouse button on the TradeSim Icon will popup a menu Open Signal Ghart w Lock Windows Big elite tHe ts 2 1 PAD ASORMS 214m This menu can also be accessed from the TradeSim menu bar However unlike all of the other menus it is located at the right hand side of the menu bar TradeSim Enterprise Edition Oj x File Tools Window Help l TradeSim DLL gt W SNET Ea zE AE T Stent Simulation AEON Open Signal Chart lv Lock Windows The Tool Box Task Bar Menu n Open Report Log Displays the Report Log Window if available and the host charting application is currently displayed If the Report Log Window is already open then selecting this option will bring this window to the foreground UO Open Signal Chart Displays the Signal Chart Window if available and the host charting application is currently di
316. iply all volume values by a constant value before they are written out to the trade database The multiplier parameter determines the amount by which the volume values are scaled Only positive MULTIPLIER values are accepted The default value for the multiplier is 1 0 which is also the value that is set when the Initialize function is called This function is useful if your data supplier truncates volume data information It is important to maintain correct volume information in the trade database if you are using the Volume Filter in TradeSim Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 99 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Example The following example is used to multiply all volume values by 100 ExtFm1 TradeSim SetVolumeMultiplier 100 EnablePriceFilter ExtFml1 TradeSim EnablePriceFilter The price filter is enabled by default and can be disabled by calling the DisablePrice Filter function If prices fall outside the daily range then the trade price will automatically adjusted and a warning reported to the Trade Log This is done to avoid synthesizing prices that were never present in the historical data in order to maintain realistic simulations Enabling the price filter constrains the price so that it always falls within the daily range It is equivalent to writing the following MetaStock code ActualEntryPrice if EntryPr
317. is radio selection panel allows selection of the type of analysis carried out when a simulation is run If you only have the Standard or Professional editions of TradeSim then the third option Monte Carlo Analysis will always be permanently disabled Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 150 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Single Simulation This is the standard form of trade simulation and will be the one that 1s used most of the time a trade simulation is to be carried out on the trade database that is currently loaded In this mode of operation trades are processed in accordance to the order of trade entry date That is a trade with an earlier entry date will always be taken before a trade with a later date Note that not all of the trades in the database are taken during a simulation as this will depend on other factors such as the trade parameters and the position size model chosen as well as available trading capital O Use Original Ordering Trades are executed in accordance with the order they appear in the Trade Database list That is if there is more than one trade with the same entry date then the trade with the lower Trade Number will be executed first as long as its position size constraint can be met O Random Walk This parameter setting pertains to trade data where you have the option of randomly selecting a subset of trades from
318. iscrete probability distribution function This characteristic of a trading system is always overlooked using conventional charting packages because the system testers built into most charting packages are limited to testing a single security at one time Therefore the most important information used for deducing and characterising the performance of a trading system is not available and so the true performance of a particular trading system is never fully understood The most important issue here is that one could easily have been fooled into believing that the system was quite good if it had only been simulated once and it had produced a reasonable profit outcome that fell in the vicinity of the right tail of the profit distribution chart This is why we cannot draw a conclusion trading or simulating a system once when we are trading with a portfolio of securities The next myth regarding the Holy Grail of entry strategies 1s one that can never be emphasized enough Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 28 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 I am currently working on a new entry system which should improve my profitability There is a common misconception amongst new traders that the entry strategy is the most important aspect of a trading system A lot of time is spent crafting trading systems by inventing new entry strategies What is not rea
319. it Order Type Default Order Minimum Trade Size 500 00 Accept Partial Trades No Volume Filter Ignore Volume Information Simulation Stats Number of trade simulations 5000 Trades processed per simulation 6773 Maximum Number of Trades Executed 892 Average Number of Trades Executed 829 Minimum Number of Trades Executed 768 Standard Deviation 16 71 Profit Stats Maximum Profit 116 603 97 233 21 Average Profit 59 642 09 119 28 Minimum Profit 21 666 30 43 33 Standard Deviation 12 894 13 25 79 Probability of Profit 100 00 Probability of Loss 0 00 Winning Trade Stats Maximum percentage of winning trades 75 72 Average percentage of winning trades 71 62 Minimum percentage of winning trades 67 68 Standard Deviation 1 23 Losing Trade Stats Maximum percentage of losing trades 28 78 Average percentage of losing Trades 24 96 Minimum percentage of losing trades 21 25 Standard Deviation 1 16 As can be seen from the Statistics Summary report above there is a striking difference between the two trading systems Average profit is now 59 642 09 119 28 compared to 708 96 1 42 and the minimum profit is now a positive value of 21 666 30 43 33 which means that the probability of obtaining a profit is now 100 The average percentage of winning and losing trades is now 71 62 and 24 96 respectively compared to 29 83 and 67 48 for the original MACD Crossover system The Profit Distribution ch
320. ith the same security name Average Profit This column represents the Average Percentage Net Profit per trade for all of the trades with the same symbol name It is calculated by summing the net percentage profit for each trade for all of the trades from the same security and dividing the result by the number of trades Because the net percentage profit is a proportional measure compared to the dollar net profit it is a more objective and unbiased measurement of net profit particularly when unequal amounts of capital are used in each trade Maximum Profit This column represents the Maximum Percentage Net Profit found for all of the trades with the same security name Number of Trades This column represents the total number of trades with the same symbol name Winning Trades This column represents the percentage of winning trades found from all of the trades with the same symbol name Winning Trades This column represents the percentage of winning trades with the same symbol name Losing Trades This column represents the percentage of losing trades found from all of the trades with the same symbol name Losing Trades This column represents the percentage of losing trades with the same symbol name Breakeven Trades This column represents the percentage of breakeven trades found from all of the trades with the same symbol name Breakeven Trades This column represents the percentage of breakeven trades with the same
321. k for Duplicate Trades option is selected then this option will force a check for duplicate trades when a trade database is loaded Duplicate trades occur when there is more than one trade with an identical symbol name and entry date Unlike trade data errors duplicate trades are not eliminated from the trade database However when a duplicate trade is found the same popup message box is displayed and the same set of error handling options are given Trade Database Error Report Summary At the end of the error report in the Message Log a trade database error report summary is displayed providing that the Abort Processing error processing option has not been selected This error summary provides a summary of the number of valid and invalid trades in the database as well as the number of duplicate trades that are found whilst processing the trade database The Trade Parameters Window BE Trade Parameters Ioj x Trade Parameters Preferences Position Size Model Equal Dollar Units Equal Percent Dollar Units Fired Dollar Risk f Fired Percent Risk Trade Parameters Stocks Initial Trading Capital Transaction Cost each way 50000 00 0 000 Use Transaction Cost from Trade Database Fixed Dollar Volatility Portfolio Limit Margin Requirement f Fired Percent Yolatiity f 00 00 fi 00 00 Use Margin Reg from Trade Database Maximum Open Positions Magnify Position Size and Risk P
322. kness below the minimum will have no effect Note that changing the line thickness affects all line charts simultaneously bar charts are unaffected i Trade Inspector P E This button enables and disables the Trade Inspector If the Trade Log has been enabled during a simulation then this button will be enabled so that clicking on this button will enable and disable the Trade Inspector The Trade Inspector is a separate floating window that contains a table that is a mirror of the corresponding entry in the Trade Log for each point on the chart so that detailed information can be viewed without having to jump between the charts and the Trade Log Trade Inspector 125 559 T Wh Exit Long 1707r 2000 T 129 5 2313 7 5100 7 5100 0 0000 Hormal E sit 50 000 00 50 000 00 39 995 56 May in eet Md May isis 0 00 0 00 i rey GAIN 1 154 42 23 085904 39 794 009 Yo Soe t89 794 09 0 00002 0 00 0 010 Be Be ie rey 0 00 100 0000 0 00 100 0000 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 192 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The Trade Inspector is not available for charts that contain points or bars whose values are the combination of a number of trades such as the Monthly and Yearly Profit chart o Docking and Undocking the Trade Inspector window The Trade Inspector window can be docked to the Chart Window
323. l Enty Date ExitDate Level Bars Days Initial Stop __Entry Price o x 0 13712719955 141271995 0 1 40 0000 3 3500 0 1170171956 2370271996 0 30 43 0 0000 3 2300 0 1270171956 0670271996 0 16 29 0 0000 r orod 0 1570171956 067 0271996 0 15 oe 0 0000 6 0500 0 1870171956 2470171996 0 4 E 0 0000 46 5600 0 2970171956 OF 40271996 0 g 40 0000 6 8300 0 2970171956 08 02 1996 0 J 11 0 0000 11 4300 0 30701 1956 07 02 1996 0 G z 40 0000 12 8200 0 3170171956 2170271996 0 15 z 0 0000 4 2014 0 31701 1956 06 02 1996 0 4 E 40 0000 f 0 0170271956 1703 1996 0 oF od 0 0000 415 2100 0 0170271956 0570271996 0 Z 4 0 0000 3 4200 0 0270271956 12 02 1996 0 E 10 0 0000 8 3007 0 13 02 1996 2070271996 0 z f 0 0000 0 2 746 0 1370271956 1740371996 0 15 2r 40 0000 r 2500 i 1407 1996 71024199 n Fi Fi EANAN t7 a k 1443 trades selected fram a total of 1443 trades Note The Standard Edition of TradeSim does not have the trade selection facilities as indicated by the checkboxes at the left of each row This window contains pre processed trading information by pre processing we mean that it has been sorted by entry date The entries in the table are also color coded according to the percentage change for each trade This provides a quick visual overview of the trades in the database and gives a rough indication of the number of winning trades as opposed to the number of losing trades Of course this is only a rough estimate a
324. l capital at any time a trade is entered or exited The Portfolio Heat follows from Ed Seykota s definition of Portfolio Heat which is a measure of the total risk of a portfolio at any given time As trades are entered the portfolio heat increases as there is more risk exposure When trades are exited the portfolio heat decreases as there is less risk exposure Note Even though the initial stop value may be present in the trade database the portfolio heat and trade risk only have relevance when a protective stop is used to exit a trade if the initial stop has been violated To enable protective stops when generating a trade database please refer to the section in the previous chapter on Using the Initial Stop as a Protective Money Management Stop for more details on how to do this If a non risk based position size model has been selected then M A will be displayed indicating that the value is not applicable to the position size model used Column Position Size This column entry represents the number of securities purchased Column Position Value This column entry represents the position value for the trade It 1s calculated by multiplying the Position Size by the Target Entry Price This value does not include the transaction costs Column PS Status Flags This column represents the PS position size status for the trade The PS status specifies whether or not the position size has been recalculated according to additional trading rules th
325. l in the tag o Display both X axis label and Y axis value in Tag Displays both the X axis label and Y axis value in the tag o Font Size This submenu allows you to select from a small or normal size tag font The default is normal size Toggle Auto Markers This button enables and disables chart markers When the chart markers are enabled button down and there is sufficient space to display the markers then a marker will be displayed at each point on the chart Toggle Chart Grid This button enables and disables the chart grid hi Toggle 3D Attributes When this button is clicked down all charts are displayed with 3D attributes DATE SYM Toggle Axis Mode This button toggles between date and symbol labeling on the horizontal axis Increase line thickness When this button is clicked the line thickness increases by one pixel When the maximum line thickness of four pixels is reached this button will be grayed out so any attempt to increase the line Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 191 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 thickness above the maximum will have no effect Note that changing the line thickness affects all line charts simultaneously bar charts are unaffected Decrease line thickness When the minimum line width of one pixel is achieved this button will be grayed out so any attempt to decrease the line thic
326. l1l TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Long example Trade Data Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Example 2 Short Trades Only EntryTrigger Cross Mov MACD 9 E MACD EntryPrice CLOSE ExitTrigger Cross MACD Mov MACD 9 E ExitPrice CLOSE InitialStop 0 optional initial stop ExtFml TradeSim Initialize Initialize internal variables ExtFml TradeSim RecordTrades MACD Short example Trade Data Filename SHORT Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 280 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 InitialStop Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Trade Recorder Control Example 3 Long and Short Trades This is the LONG trading part of the recording process LongEntryTrigger Cross MACD Mov MACD 9 E LongEntryPrice CLOSE LongExitTrigger Cross Mov MACD 9 E MACD LongExitPrice CLOSE LongInitialStop 0 Optional initial stop ExtFml1l Trad
327. layOfEntryByOneBar ExtFml1 TradeSim EnableDelayOfEntryByOneBar This function call is used to delay all entry triggers defined by the Entry Trigger array by one bar A typical use of this function is when an entry trigger is generated at the end of day but it is not practical to enter a trade until the next day A call to the Initialize or the DisableDelayOfEntryByOneBar function disables the effects of a call to this function DisableDelayOfEntryByOneBar ExtFml1 TradeSim DisableDelayOfEntryByOneBar This function call is used to disable the delay of entry caused by the call to the EnableDelayOfEntryByOneBar function A call to the Initialize function also achieves the same result DisableDelayOfAllExitsByOneBar ExtFml TradeSim DisableDelayOfA1llExitsByOneBar This function call is used to disable the delay of all exits caused by the call to the EnableDelayOfAIExitsByOneBar function A call to the Initialize function also achieves the same result EnableDelayOfAllExitsByOneBar ExtFml TradeSim EnableDelayOfA11ExitsByOneBar This function call is used to delay all exit triggers by one bar This includes all external exit triggers defined by ExitTrigger array and all internal exit trigger mechanisms A typical use of this function is when an exit trigger is generated at the end of day but it is not practical to exit a trade until the next day A call to the Initialize or the DisableDelayOfAIExitsByOneBar functi
328. lays the current price and volume data for its respective bar Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 57 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 EntryPrice Array 13 1983 ExitPrice Orray 13 1983 Initialstop Orray 1 3796 Trade Initial Stop 1 3796 Trade Entry Price 13 1983 The bottom row is divided into two columns The left column displays additional information such as the user EntryPrice ExitPrice and InitialStop price arrays as passed to the RecordTrades function The right column displays the appropriate trade data when applicable ie when there is a cross on the price chart which signifies a trade entry or exit condition see above O Tab 2 Trade Data Window Displays details of all of the trade data written to the trade database file for the relevant security Double clicking on any entry in this table will highlight the relevant trade details on the chart 4 TradeSim DLL Plugin Signal Chart for CML Oj x Signal Chart Trade Data RecordTrades Parameters Trade Symbol SysiD Pos Perio EntyDate Enty Price ExitDate EwitPrice P Group P evel Re enty Type Bars Initial Stop 1 CML 0 Long Daily 17 Apr 2002 8 3900 24 Apr 2002 7 9100 1 0 Base 5 7 885143 2 CML 0 Long Daily 20 May 2002 6 6700 24 Jul 2002 6 4300 2 0 Base 46 6 147410 3 CML 0 Long Daily 03 Oct 2002 6 4300 23 Oct 2002 6 4100
329. le which mirror each others behaviour For example NCPDP closely mirrors the behaviour of its underlying NCP Because of this and the fact that after truncating the name to New Corporati it is possible to produce a trade duplicate or alias that contain identical entry exit conditions but only differ in price values Be aware of these phenomena when using security names instead of symbol names Note You should only use this function in special circumstances as TradeSim relies on the correct symbol when it needs to access security data for the purpose of plotting bar charts plotting the open equity curves Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 104 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Extended Data Value Functions The extended data value functions are used to control the values of the extended data that are used in the Version 5 database format to assign additional information to each trade in the database These additional data fields are Point Value Initial Margin Max Loss Transaction Cost System ID Trade Rank Margin Requirement The following table describes the additional fields in detail An important Note 930 Starting with Version 6 4 0 Extend data can now be loaded post trade database creation That is after you have created a trade database with or without extended data you can temporarily overwite the existing extended date using
330. line thickness Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 220 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 above the maximum will have no effect Note that changing the line thickness affects all line charts simultaneously bar charts are unaffected fil o Open Trade Inspector When clicked down displays the Open Trade Inspector The Open Trade Inspector shows all currently open trades at the chart focus point A blue rectangular border surrounding the trade indicates the actual trade entry condition at the chart focus point whilst a red rectangular border surrounding the trade indicates a trade exit condition at the chart focus point For more information please refer to the Open Trade Inspector m Export Chart You can export the chart graphics and information in a variety of formats Please refer to Appendix G for more information regarding this feature O x Preferences Opens up the global preferences at the Open Equity tab Plotting the Open and Closed Trade Equity Chart for one Symbol only You can plot the open and closed trade equity chart for any symbol from the Trade Log This plot only consists of the contribution to equity from all of the trades in the Trade Log with that symbol name To plot this chart from the Trade Log right click on the trade with the relevant symbol of interest and then select Plot Open Equity Chart for
331. litates the selection of the charts and reports that you want to include in the composite report Each branch of the tree view essentially represents all of the charts and reports contained in its respective child window For example the Trade Simulation report consists of the Trade Parameters Detailed report Performance Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 267 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Summary Security Profit Distribution Chart Trade Profit Distribution Chart and an optional R multiple chart The combined report is not included in the composite report because it duplicates the other reports Main Toolbar E Click on this button to construct the composite report Construct a Click on this button to print the composite report E oinn comoeoor OOOO Click on this button to select the whole contents of the report including all i All charts Copy the current selection to the clipboard for later pasting into another app Copy selec to Clipboard such as Word for Windows en Export the whole report in a variety of file formats Selecting the charts and reports On the left windowpane you select the charts and reports from the selection tree that you want to include in the composite report Currently any text report and charts can be included in the composite report Tables such as those included in the Trade Statistics Trade Log Tr
332. lized is that the entry strategy has the least effect on system profitability whereas the exit and position sizing strategies will have the most profound effect on long term profitability This is where proper back testing would have alerted you to this fact Substituting your entry system with a random entry such as the outcome of a coin toss will make very little difference in the net profitability of your trading system In fact using a random entry such as a coin toss will most likely improve system performance providing you have chosen a good position sizing strategy because more trades will be taken compared with using a deterministic entry strategy The external MetaStock Plug In which comes with TradeSim includes a random number generator which makes this procedure relatively simple The next myth is usually propagated by promoters of Black Box trading systems who boast about having better than 80 winning trades from their systems Only systems which have more winning trades than losing trades will be profitable in the long run Without having any understanding of basic probability theory winning trades are only part of the story when it comes to devising a statistically sound trading system This is a trap which many traders fall into They believe that in order to be profitable in the long run their trading system must yield more winning trades than losing trades If the average winning amount is the same as the average losing am
333. ll be generated and displayed Zoom In Zoom Out 0 x eee SY p Open Trade Equity Chart for all trades MACD Crossover Cursor Mode NN Enable Disable Auto Tags Enable Disable Auto Points Enable Disable Chart Grid Equity Enable Disable 3D Equity Scale Decrease Line Thickness Yj Increase Line Thickness P s x I E ENIS x wrerrrrerre wrererrrerrr wr er er er ef KF KF KF KP KP KP KP KP KP KP KP KP KC SE KEK SK 17 01 2000 o7 03 2000 2604 2000 15 06 2000 03 08 2000 22 09 2000 13 11 2000 6 05 2002 14 10 2002 12 03 2003 N N N N N St Om m 9 a 8 8 8 2 8 8 8 8 8 8828 8 E ee SSSESS8S55555555 SIFILIS RE E A a E E a E E FFFFERFFEFTFE sSZS5SSSSSSESES 588888 Toggle Open Trade BER SSstsgssass Es TEREE Inspector Toggle Closed deea Closed Trade Equity V Open Trade Equity Export Chart sha Date 20 10 1999 Open Trade Equity 11 478 30 Closed Trade Equity 11 338 51 Delta 139 78 0 23 Trade Status Open Trades e A ET jol pen Trade Equity 11 quty 11 Deka 139 78 0 23 Open Trades Open trade equity Closed trade equity Trade Trade Status The Open trade equity Line The following color coding convention is used to display the trade status at the chart focus point on the chart Blue Line Trade Entry Condition currently open trades Red line Trade Exit Condition currently open trades Purple Line Simultaneous Trade Entry and Exi
334. ll be produced This chart displays the Reward Risk ratio for each trade A positive R multiple value will be displayed as a blue bar whilst a negative R multiple value will be displayed as a red bar Winning Trades Chart P E The Winning Trades Chart represents the running percentage of winning trades on a trade by trade basis Typically this chart will converge to a stable value after a significant number of trades Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 201 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Losing Trades Chart P E The Losing Trades Chart represents the running percentage of losing trades on a trade by trade basis Typically this chart will converge to a stable value after a relatively large number of trades Portfolio Heat Charts P E The Portfolio Heat follows from Ed Seykota s definition of Portfolio Heat which is a measure of the total risk of a portfolio at any given time As trades are entered the portfolio heat increases as there is more risk exposure When trades are exited the portfolio heat decreases as there is less risk exposure The Chart of Portfolio Heat plots the Total Risk Exposure in Dollars versus entry exit date trade number When trades are entered the chart is plotted in red signifying an increase in the risk and hence an increase in heat When trades are exited the chart is plotted in blue
335. ls Target Entry Price ET as defined by the EntryPrice parameter in the RecordTrades function Open Market Order Trade Entry High EH Close Valid Actual Entry Price EA Range on the Long or Short Side Low EL Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Page 157 Final Release Version 6 4 1 O Entry Order At Worst Case This option enters the market at the worst possible price on the day of entry For long positions the trade is always entered at the high of the day For short positions the trade is always entered at the low of the day See the following diagram or summary table for more details Worst Case Order Trade Entry High EH Low EL Close l Entry at the High of the day EA EH for Long Trades Entry at the Low of the day Open EA EL for Short Trades QO Unconditionally Enter Trade This option applies to Limit and Stop Orders When enabled the random algorithm that generates an entry price is adjusted so that the trade is always accepted Readjust Position Size When this option is enabled it readjusts the position size according to the new entry price Be careful when using this option as to how realistically one can readjust the position size on the fly when entering the market at a price different from your target entry price Exit Order T
336. lude moving averages but the more Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 70 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 popular ones are usually based on volatility One stop that is fairly popular is a volatility stop based on Wilder s average true range Its formula is given by the following ARC 3 Average Range Constant Period 10 ATR period LongInitialStop OPEN ARC ref ATR Period 1 used on the long side ShortInitialStop OPEN ARC ref ATR Period 1 used on the short side Initial Stop Price Restrictions The following diagrams illustrate the limitations and restrictions on the InitialStop prices Bear in mind that it is necessary to restrict prices to the ranges indicated by the diagrams otherwise the RecordTrades function will reject the security from the point the error was detected and report an error condition Initial Stop Price Restrictions on the Long side Trade Entry High Invalid Initial Stop Prices Entry High Price on the Long Side Close Valid Initial Stop Prices on the Long Side Initial Stop Price Restrictions on the Short side Trade Entry High Valid Initial Stop Prices Entry High Price on the Short Side ed Close User Entry Target Price Invalid Initial Stop Prices Entry Low Price on the Short Side Copyright 2000 2009 by Compuvisi
337. lution of 1024x768 or better with 256 colors or better Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 39 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Software Installation The installation of TradeSim is fairly straightforward and should not present any problems provided that the following instructions are carried out After downloading the Setup TradeSim exe file into a temporary folder on your hard disk run the Setup TradeSim exe program by either double clicking it using the Windows Explorer or selecting Run from the Start menu and select the Setup TradeSim exe program that you downloaded You should be greeted with the following screen Compurvision Australia TradeSim Setup _ Oj x This version was released on Monday 27 February 2006 Welcome to Compuvision Australa TradeSim setup on Copyright 2000 2005 Compuvision Australa Phy Ltd DeployM aster has detected that Compuvision Australa TradeSim ts already installed on your computer This i the same version of the application in this setup package IF you wish you can select different components now and your pastem will be updated Newly selected components will be installed and components marked for deletion will be remowed etna eer ee et Clicking this button will install Compuyision Australia si im a a aa TradeSim using the default options MHo technical questions will be asked M
338. ly 500 are enabled then the Trades Processed indicator will count from 1 to 500 when a simulation is run Trades Executed Specifies the number of actual trades taken or executed This would be synonymous with the actual number of trades that have been executed in a real life trading scenario The Trades Executed indicator will always be less than or equal to the Trades Processed indicator Trades Rejected Specifies the number of trades that were rejected due to capital or position size constraints Partial Trades If the Accept Partial Trades if inadequate capital option 1s selected in the Trade Preferences then this indicator will display the number of partial trades taken as the trade simulation progresses Total Capital Specifies the Total Capital which includes the Initial Starting Capital plus profits losses as the trade simulation progresses The Completion Gauge This gauge gives a visual indication as to the completion status of the total simulation When running a single simulation this gauge gives an indication of the completion status for that particular simulation When running a Monte Carlo analysis this gauge gives an indication as to the completion status of all the Monte Carlo simulations During a Trade Simulation the color of the progress bar will be dynamically updated after each trade thus giving an indication of the current state of the total capital pool During a Monte Carlo analysis the progress bar will always be displa
339. m au Last updated on 26 March 2009 Final Release Version 6 4 1 Note that in Column A which we labelled Trades there is a number which represents the actual number of trades that was written to the trade database file for each of the securities in the exploration list Using a subset of the securities in a RecordTrades exploration In the previous example we used all of the securities in the database since this database only contained the securities that we were interested in Typically security data is not grouped and stored according to a particular index such as the NASDAQ DOW Australian All Ords rather it 1s usually stored in alphabetical ordering as shown in the layout below Open OL x Look in a Stocks E a e m CF h Tools Options Modified T Folder 14 10 2000 5 17 PM nae File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM Local Data IE File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 17 PM File Folder 14 10 2000 5 16 PM File Folder 14 0 2000 5 16 PM File Folder 14 10 2000 5 16 PM File Folder 14 10 2000 5 16 PM File Folder 14 10 2000 5 15 PM fom O Eila Faller Taft nt nnn Fd E Chd E File name Open Periodicity File x Cancel rick z Files of type S
340. mart Charts Help Created with MetaStock by Equis 2001 When running an exploration we would normally include the securities from all of the folders from A to Z in our exploration This may amount to many thousands of securities that we have to explore However we may only be interested in using a subset of these securities For example we may only be interested in trading the top 200 stocks because they are the most liquid stocks and give more reliable trading information MetaStock provides a solution to this problem by allowing us to selectively enable and disable securities from the securities list You could then make up a portfolio of securities by checking and unchecking the relevant securities from each folder For example you could make up a portfolio of the equivalent of the ASX top 200 stocks by selectively enabling the requisite securities However there is a much quicker and simpler way of doing this without having to sift through thousands of securities and the next section describes this procedure in detail Generating a portfolio security list the Easy Way This article has now been moved to the reference library folder in your TradeSim installation folder Please click here to view this document Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 81 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note If this article is missing it can be do
341. meter Description _ ___ Allowable Values The name of the external function along TradeSim RecordTrades with the name of the external DLL that contains it The Trade database filename in quotes If Any file name e g My Trades MACD this file does not exist it will be created Long when the RecordTrades function is called Note When specifying a trade database filename do not use any characters that are not permitted in normal file naming convention such as lt gt Do not specify a path and filename extension All trade database files are automatically appended with a trb extension and are stored in the c tradesimdata directory The Trade Position parameter which LONG or SHORT to record long or short specifies whether the trade is on the long trades respectively or short side The Entry Trigger parameter is used to Any formula which gives a binary result e g specify when to enter a trade It can be Cross MACD Mov MACD 9 E any formula which gives a binary result The Entry Price parameter is the price of Any formula or predefined data array such as the underlying security when the Entry CLOSE OPEN HIGH LOW Trigger is true It can be any formula or H L 2 etc predefined data array 1 2 3 4 5 The optional Initial Stop parameter is If the Initial Stop is not used it should be set used for trading systems which rely an to zero otherwise it can be any formula or initial stop
342. ml TradeSim SetStartRecordDate 21 4 1998 ExtFml TradeSim SetStopRecordDate 5 6 2000 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 66 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Entry and exit conditions Random entry It is sometimes useful to use a random entry strategy Using a random entry strategy allows one to objectively compare and evaluate a trading system by comparing the performance between a random and deterministic entry strategy Thus the effectiveness of the deterministic entry strategy can be gauged If the deterministic entry strategy does not result in a better performing trading system compared to the random entry then the performance of the trading system is most likely due to the exit and the position sizing strategies If this is the case then changing the entry strategy will have the least effect on performance If there are significant differences between the two strategies then one might want to investigate the exit and position sizing strategies to see whether this aspect of the system can be improved Basically speaking a good trading system that uses a good position sizing strategy should be invariant to the entry strategy used The TradeSim external MetaStock Plug In facilitates developing a random entry strategy by providing a random number generator function This function generates a random number between 0 and 1 but
343. mpare the strengths and weaknesses of individual securities When this type of simulation is run a Trade Summary Table is produced which provides a summary performance of each of the securities in the trade database When running a basket test profit pyramiding is automatically disabled and no charts are produced On completion of a basket test a subset of the Trade Simulation Report and an optional Trade Log are produced The Trade Log Window Every time a single trade simulation is carried out a Trade Log can be produced if the Enable Disable Trade Log button on the main toolbar button has been activated The Trade Log details information from a trade simulation on a trade by trade basis and displays this information in chronological order for later inspection and analysis Alternatively the information can be sorted by any other criterion The Trade Log is analogous to records which would be kept when paper trading A snapshot of the Trade Log window is shown below Note that not all of the columns are visible The trade records that have a yellow background represent the point at which a trade position was entered The other records which have a white background represent trade positions where a trade position has exited Green text on a white background represents profitable trades whilst red text on a white background represents a trade loss This is irrespective of whether the trade was on the long or short side Black text on a white background
344. n Typ Process all trade positions Process long trades only Process short trades only Final Release Version 6 4 1 Position Size Rules Minimum Trade Size the higher of 0 00 OR 0 00 OF limit the maximum position size to jo Accept partial trades if inadequate capital Volume Filter f gnore volume Information Reject trade if Position Size is greater than f 00 00 of the Traded Volume lo x Transaction Cos f Fired Cost Fixed Cost per ShareContract i Fractional Cost Minimum Transaction Cost 0 00 Non Trade Pyramid Rule W Use Level Zero trades only Disallow more than one open position with the same symbol Entry Order Control Exit Order Control Limit position size to a maximum of 10 00 Default Order Limit Order Market Order amp Stop Order of the Traded Volume Worst Case Round Lot Size to fi P Unconditionally Enter Trade P Readijust Position Size Simulation Options Allow Intraday Exits Trading Instrument E m Stocks This mode of operation applies to stocks only Commodities This mode of operation applies to commodities and futures Selecting this mode adds two extra parameters to the Trade Parameters Tab These are the Initial Margin and Point Value Breakeven Trades This radio selection group allows one to control how breakeven trades are handled during a simulation It does
345. n a trade simulation An example of this 1s shown below Unlike a basket tester when using the normal simulation mode each security is not tested in isolation and so this factor must be taken into account when trying to evaluate the strength and weakness of securities Also as the equity varies so will the amount of capital applied to each trade so the total net dollar profit may be biased depending on the variation of capital invested in each trade of the respective security This factor must be taken into account when comparing securities with similar performances because a security that was predominantly traded when equity was low will show a much lower total net profit compared to a security that was traded when the equity was much higher In this case the average percentage net profit is a much more reliable benchmark to use when comparing the performance of securities If you need to objectively evaluate and compare the performance of securities then you should use the Basket Test simulation option which 1s described later on The table entries are color coded with a green entry signifying a net profit whilst red and black specify a net loss and breakeven condition respectively Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 172 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Trade Statistics Table Security Profit Distribution Trade Profit Distribution
346. n be displayed or extracted from the chart For some charts that are time invariant such as the monthly and yearly charts the time scale makes no difference The time scale can be changed from the Closed Trade Charts tab from the global preferences L Compressed Time Scale In this mode every trade in the Trade Log is plotted on the chart as a separate point even if the dates of consecutive trades coincide with each other Also the non trading days between the trade entry point if used or trade exit points are not plotted Because of this the time axis can be distorted In this mode the Trade Inspector can be used to display the details of each trade O Linear Time Scale In this mode every trade in the Trade Log is plotted with a single point assigned to every date even if there is no trading activity on that day weekends are always excluded from the plot Points for which no trading activity exists are plotted with a dark green line In this mode because one point may represent the entry and exit points of many trades it is not possible to use the Trade Inspector to display the trade details However the Open Trade Inspector can still be used to display all open trade information for each point on the chart Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 190 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The Charts Toolbar The Charts window conta
347. n file Sort Options This option controls the way trades in a trade database are initially sorted when loaded into TradeSim By default when a trade database 1s loaded the trade database is processed and sorted by trade entry date only therefore all trades with the same entry date are not sorted by their symbol By checking the Sort by Symbol checkbox the trades with the same entry date will be sorted alphabetically by the security symbol o Default sorting Trade database is sorted by entry date only This useful when you are loading a text trade database and you want to preserve the ordering with respect to entry date only o Sort by Symbol A first Z last Trade database is sorted by entry date and symbol o Sort by Trade Rank lower rank first Trade database is sorted by entry date and rank where the lower rank trades appear in the trade database manager before higher rank trades o Sort by Trade Rank higher rank first Trade database is sorted by entry date and rank where the higher rank trades appear in the trade database manager before lower rank trades Note If Check for duplicate trades has been enabled a message will appear before you load a trade database if Sort by Symbol has not been selected Trade Entry Exit Ordering For a group of open trade positions that have the same exit date you can change the order by which trades are closed out o Last in First Out LIFO For a group of trades with a
348. nals vetoscessesentestsdertesessarceststertuersasyiostedeidesetuersestsisiiestesasiesteiotasieciameosedues 298 ALE E E E N A E O E E E E S 298 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 20 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 MAG SUN EWING aos cas acsicscaa seesanctaesevcasnoiesenasessaacetecssiasncuusousyeccncstacsesecsbisssossodesxosareisseataeewseansecesase 298 AVN Uy AUS sassen pA cccau aotensioseahvevassstescsaucvuscuenaivsnagscsessamaeenarucess 298 Treader Tort S sinnn 299 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 21 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Preface to Version 6 Version 6 of TradeSim incorporates a lot of new features fixes and updates A brand new licensing system has been used as the old online licensing system was proving to be unreliable on some user s machines The new licensing system relies on a registry file to be created and saved in the user s TradeSim directory Included in the Enterprise Edition is a Composite Report generator which can combine multiple reports and charts into the one report for printing copying and pasting as well as exporting in a variety of popular formats Also new to the Enterprise Edition is the ability to dynamically specify the position size model on a trade by trade basis Two new chart
349. namic Position Size model columns 433 Column PS Model Position Size model Column Sector Column Portfolio Limit Portofolio Limit Column Max Trades Maximum number of Trades Column PS Parm 1 3 Position Size parameter 1 3 Sorting the list The list can be sorted by any criteria by clicking on the respective column header For example if you would like to sort by symbol rather than entry price just click on the Symbol column and the list will be sorted from A to Z Clicking on the Symbol column again will reverse the sorting order so that the list will now be sorted by symbol but from Z to A Note that the header symbol changes depending on the sort direction Note Changing the sort criteria does not affect the internal database structure or how trades are processed Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 136 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Enabling and Disabling trades in the database P E TradeSim allows complete flexibility in allowing trades to be included or excluded in a trade simulation For example you may have ten years worth of trade data but only want to simulate over two particular years of data Alternatively you may want to exclude a certain security from the simulation because it is an outlier trade or is simply generating erratic trade data because the original trade data fed to MetaStock did not account f
350. nclude the fully paid shares and exclude all of the warrants and stock options This is easy to do with the GetSymbolLength function available in the TradeSim plug in You simply run a security list pre filtering exploration and use the GetSymbolLength function to only look for securities with three character symbols All in all this should amount to around 1500 securities for the Australian ASX The following screen snapshot illustrates how to set up a security list exploration to include all 3 character symbols in the security list Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 273 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Exploration Editor Ed General Name TradeSim Gen security List ASA sox Notes This is a dummy exploration which uses the GetoymbollLength external function located in the Tradesim Metastack Plug In to generate a security list which only contains the primary securities with 3 character symbols Column A Column B Column c Column D Column E Column F Filter ExtFml Tradesim GetsymbolLength lt 3 Cancel Eunectians Securities Options Help Trading System Optimization By definition optimisation is used to find the best possible solution to a problem In terms of trading systems the best possible solution is obviously one which maximizes profit return however other factors such as drawdown
351. ncovering new issues that have not been addressed by current software technologies To understand some of these aspects in more detail we need to look at some of the issues of the trader using technical analysis We shall start with some of the myths that are usually spread throughout the trading community Traders Myths There are many myths surrounding the subject of trading You only have to read some of the traders Internet forums and textbooks on technical analysis to see many of the unsubstantiated comments and claims made about particular trading systems This is not because people are not informed quite the contrary as most traders using technical analysis have probably read over a dozen books on the subject The real reason stems from the fact that there are not many tools around which allow the technical analyst to easily and objectively substantiate and verify the many claims that are made The result of this is that a lot of unsubstantiated claims are made and the onus is not on the person making a claim to prove it themself but rather it is the responsibility of others to disprove a claim before using the advice With TradeSim verifying these claims is no longer difficult because TradeSim has comprehensive and in depth analysis capabilities that go way beyond the capabilities of conventional charting and technical analysis packages Just to give you an example of some of the unsubstantiated comments that are usually made the followi
352. nd at a home show when some salesman somehow got your undivided attention Yes these software gadgets look and sound pretty impressive and even more impressive is the price tag which usually starts at around the five digit mark You re usually invited to a seminar which is some introduction to trading on the Stock market with computer assisted trading software their software of course Their black box software comes with a number of proprietary trading systems and indicators none of which they are at liberty to disclose nor can they be reproduced by anyone else using any other software packages such as MetaStock well so they say The biggest attraction illusion that is promoted with these systems is the ability to make money with very little effort However nothing could be further from the truth The usual sales spiel is that their black box trading system is a sure winner and they back it up with what appears to be a few winning hindsight trading examples that are not realistic of a true trading track record which would normally include several losing or stopped out trades but that is another story If that hasn t whet your appetite they usually back up their winning trades with the leverage of derivatives At ten thousand dollars plus the cost of the data download the package is a bargain and will pay for itself in no time or will it How does one really know With no past credible trading results to back up their claims what
353. nd this would be to test a Portfolio over a short period of time such that all securities in the portfolio remain in existence over that period of time However this conflicts with our original aim of testing a trade system over a long period of time An alternative solution would be to use an industry standard list such as the ASX 200 for example and update the portfolio when the list is updated which is usually every six months However the problem with this is that MetaStock does not accommodate dynamically changing security lists and thus the trade database generated using a trade database exploration is based on a static security list Since Version 7 and above of MetaStock allows you to run multiple explorations you could of course run multiple trade database explorations with each exploration containing its own security list that is relevant to the period of interest The only problem with this is that you would need to be able to specify the period of interest for each portfolio list otherwise each of the trade database explorations would produce duplicate trades and the RecordTrades function does not currently facilitate merging trade databases in this way True Survivorship Bias Free backtesting with TradeSim lt 3c gt TradeSim now introduces survivorship bias free back testing to further refine back testing results even more All TradeSim Editions including the trial now comes with the ability to do survivorship bias free backtesting using a Su
354. net for the Web Update Manager to operate correctly For more information see section on the Version Update Manager Register Software Clicking on this menu item will display the Registration dialogue box Disclaimer Clicking on this menu item will display the Disclaimer dialogue box Purchase Online Clicking on this menu item will bring up the online purchasing page where a valid license can be purchased TradeSim Download Page Clicking on this menu item will bring up the TradeSim download page The Status Bar The status bar is used to report the current operational status of TradeSim as well as to provide additional information In most cases the information mirrors what is displayed in the Message Logs Preferences Dialogue Box The preferences dialogue box contains a number of global preferences These preferences can be automatically saved when exiting TradeSim and the last set of parameters saved are automatically restored when TradeSim is started Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 119 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Preferences 0 x Global Parameters Update Manager Security Information Miscellaneous Chart Preferences Date Forma Trade Database Loading Uptions MW Ignore Open Trades Ignore Pyramid Trades W Check for Duplicate Trades Scale Currency values by 0 01 Load Default
355. ney Management Stop works on the LONG Side ccecceeseeeteeeseeeeees 12 Q Example of how a Protective Money Management Stop works on the SHORT side ccccccceesseeeseeeees 73 PO WAC MeN SO PS ee AER EENE ER 74 Generating Multiple System Trade Data ssccsccccccsssssssssssccccccccessssscsccccssescsssscssscceoees 74 Generating Multiple Security Trade Data ccccccssssssssccscccccccesssssssccccccsssssssscsccssssseees 76 Setting up a MetaStock Exploration with the RecordTrades function ccccccccscssssssssessees 77 Using a subset of the securities in a RecordTrades exploration ssssssssscsscccccccssssseeeesssees 81 Generating a portfolio security list the Easy Way sccccccssssssssssccccccccscsesssssccccseseseees 81 The Trades im Pune tion LaDr ar y siirsin raaa aa at 82 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 6 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 General Control F iit 01 sssini anaia aAa r a orai 84 ITE OE EEA AEE E O IE EE AE EE EE AORE E N AE EN EEN OE A A E E 84 E P a A stem rarer crtenrte setter aren ete Tene learn terre reer rier eet Server ry crtne nr cht rere tre 85 Entry and Ext Control F Wi Cie sessirnar Diavieraiesiies 85 Enable Delay Ole metry BYONe Ba os cesncececccfecrreacsectiecetcebeueseseenaetQeaeeacsestencsseeneaxteseeecsieeewtectesteuceieesacedesees 85
356. ng are but some of the more common traders myths and propaganda that are repeated many times over I think I have found the Holy Grail of indicators These indicators work really well when I overlay them on a chart Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 26 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 This is a typical comment from new entrants in the Technical Analysis arena They spend vast amounts of time looking for something that just isn t there Even worse is the fact that they will spend a vast amount of money on books and magical software solutions that promise the ability to predict and outwit the markets movements Let me say this and I will quote Van Tharp prediction has nothing to do with good trading The so called Holy Grail indicators may look good on a single chart when the overall trend of the market is bullish Remember the saying that a bull market is no substitute for brains However when it comes to actually trading this system or back testing using a true portfolio trade simulator such as TradeSim a different story usually unfolds because back testing the system over a longer period or simulating it over a portfolio of securities will usually show up its weaknesses due to diversification The following myth regarding invalid statistical hypothesis is one that is repeated time and time again however its implications
357. nitial Stop used Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 102 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ExtFml TradeSim Initialize ExtFml TradeSim EnableUserExitEncoding ExtFml TradeSim RecordTrades User Exit Encoding Trade Database Filename LONG Trade Position Type EntryTrigger Entry Trigger EntryPrice Entry Price InitialStop Optional Initial Stop ExitTrigger Exit Trigger ExitPrice Exit Price START Recorder Control Security ExtFml TradeSim Security 1 Name of external function DirectoryPath 2 Directory Path SymbolName 3 Security Symbol DataArray 4 Data Array O Open H High L Low C Close V Volume This function is useful for Metastock Version 7 EOD users who wish to access data from an alternate security Version 7 Professional and Metastock Version 8 amp 9 offer a similar function called Security Typically this function 1s useful for constructing Relative Strength indicators etc Data 1s automatically aligned with the underlying data and any missing data in the requested data is replaced with the last valid data so there are no gaps or holes in the requested security data Note The Metastock version of this function only has 3 parameters The Directory Path and Symbol Name are combined into one parameter instead of separate
358. not including 1 The random number generator generates numbers between 0 and 1 with a normal distribution and a mean value of 0 5 The syntax usage of the random number generator is ExtFml TradeSim Rand If we insert this function into an indicator and add the indicator to a blank chart you will get something that looks like the following m TradeSim Random number function test 0 9 0 9 FN Mh Ii HN RTE A Created with MetaStock by Equis 2001 Note that we have drawn a line through the chart above which represents the mean or average value of 0 5 A Coin Toss Random Entry Strategy To be of any practical use as a random entry you would most likely want a process that mimics the tossing of a coin That is a random event that has two possible outcomes with equal probabilities To do this we assign a head or tail based on the outcome of the random number generator For example we could assign a head when the random number generated is less than 0 5 and greater than 0 and assign a tail to all other outcomes This can be written as an indicator as follows CoinTossEntry ExtFm1 TradeSim Rand lt 0 5 The coin toss entry indicator above 1s a binary indicator with only two possible outcomes of one and zero corresponding to a head and a tail respectively Note that the probability for either outcome is the same value of 0 5 A plot of the indicator is shown below Copyright 2000 2009 by Compuvision Australia P
359. ntered The profit calculation takes into account which side of the market Long or short the trade has been taken and the profit threshold is always referenced to the entry price When a trade is exited in this manner the trade is flagged in the database and is shown in the TradeSim Trade Database Manager as a profit stop A call to the Initialize function disables the effects to a call to this function This function has precedence over the SetProfitStop if both functions happen to be used together The DELAY parameter works exactly the same way as described by the SetProfitStopInactivityDelay function in that the delay specifies the number of bars to ignore before the profit comparison is made The rules for exiting a trade based on a profit threshold target follow the previous flowcharts except that the constant percentile profit comparison is replaced with a relative comparison Example To exit a trade with a 5 target profit relative to the entry price you would use the function as follows EntryPrice Open ExtFml TradeSim SetVariableProfitStop 0 05 EntryPrice 0 Example Exit a trade with a profit target based on the Average True Range for a 10 bar period ExtFml TradeSim SetVariableProfitStop ATR 10 0 Example The following is the complete trade database exploration code which exclusively uses the SetVariableProfitStop function to exit a trade base an 10 bar ATR profit target relative to the entry price
360. ntrol Functions Initialize O O O O O S Entry and Exit Control Functions DisableDelayOfAllExitsByOneBar DisableDelayOfEntryByOneBar EnableDelayOfAllExitsByOneBar EnableDelayOfEntryByOneBar SetExitTriggerDelay SetStartRecordDate SetStopRecordDate SetTimeStop SetExitPriceToProfitStop NormalExitIfProfit Initial Stop Control Functions DisableProtectiveStop EnableProtectiveStop SetExitPriceToInitialStop SetStopGapPriceToOpen Obsolete UseClosingPriceAsStopThreshold DisableClosingStopDelay Profit Stop Control Functions SetProfitStop SetProfitStopInactivityDelay SetExitPriceToProfitStop SetVariableProfitStop Trade Pyramid Functions EnableTradePyramiding DisableTradePyramiding SetPyramidProfitThresholdDetection Debugging Functions and Aids ShowTrades fromerly ShowChart SuppressFileProcessing Obsolete SetReturnInfoType Miscellaneous Functions GetSymbolLength SetCurrencyMultiplier SetVolumeInfoType SetVariable Volume SetVolumeMultiplier Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 82 http www compuvision com au Last updated on 26 March 2009 Tradesim Final Release Version 6 4 1 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 83 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 General Control Functions Initialize ExtFml1 TradeSim Initialize Initializes the TradeSim external DLL t
361. o a default state It should be called when the internal variables need to be set to a default state and it is good practice to call it once for every call to the RecordTrades function The call to the Initialize function sets the internal variables to the following state ProtectiveStop Delay OO TimeStop Duration SSS O O ExitTriggerDelay ooo O O ProfitStop Threshold O O ProfitStop Delay oS O O TradeRank Value S O O StartRecordDate o oS O O Pyramid ProfitThreshold 0 S O Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 84 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Example The following example shows the typical usage of the Initialize function in conjunction with the RecordTrades function and other switch functions ExtFml1 TradeSim Initialize call to other functions and switches before the call to the RecordTrades function ExtFml1 TradeSim ExtFml1 TradeSim ExtFml1 TradeSim final call to the RecordTrades function ExtFml TradeSim RecordTrades Entry and Exit Control Functions The Entry and Exit control functions are used to modify the way the RecordTrades function treats the Entry and Exit triggers They can be used to give more control over the way that trades are entered or exited than can be obtained using the MetaStock formula language EnableDe
362. o each trade By default the rank is assigned a zero value when generating a trade database The rank value is not used in any simulations It is only used when the trade database is loaded and the sort option in the global preferences is set to Sort by Rank If the trade database has been sorted by rank then using Random walk where the trade ordering is randomized will defeat the original ordering and hence ranking of the trades Note Trade Database file formats prior to version 5 will have zero assigned to the Trade Rank column This can be changed by exporting the trade database file Professional and Enterprise versions only as a text trade database file and then assigning a rank column to the database file and then importing it back into TradeSim again O Column Point Value Commodities only In this column a point value is assigned to each trade If the Use Point Value from Trade Database option is checked in the trade parameters and the point value is non zero then the value assigned to the trade will be used instead of the default value If a zero value is assigned to this column then the default value is automatically used This feature facilitates concurrent simulation of different markets Note Trade Database file formats prior to version 5 will have zero assigned to the Point Value column This can be changed by exporting the trade database file Professional and Enterprise versions only as a text trade database file an
363. ock Plug In will contain volume information Oh Round Lot Size This parameter allows the position size for a trade to be rounded to a specific lot size For example you may only be able to trade lot sizes of 100 shares or contracts so if you have a position size of 351 then this will be rounded down to 300 units if the Round Lot Size to is set to 100 By default the Round Lot Size to is set to 1 Order Type and Slippage P E TradeSim includes the ability to model slippage through order control You can choose to control the amount of slippage at trade entry and trade exit by selecting different entry and exit order type mechanisms Note If any of the options are grayed out then this is because the trade database used does not contain extended price data All trade databases generated with the latest MetaStock Plug In will contain extended price information Entry Order Types f Default Order Stop Order O Market Order C Limit Order C Worst Case Unconditionally Enter Trade Readjust Position Size Entry Order Control Exit Order Control Five types of entry order mechanisms are available Theses are Entry Order At Default Entry Order At Limit Entry Order At Stop Entry Order At Market Entry Order At Worst Case ge Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 155 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Entry Order At D
364. ofit Factor 38 Profit Index 39 Total Transaction Cost 40 Total Slippage 41 Total Trade Interest 42 Daily Compound Interest Rate 43 Annualized Compound Interest Rate M 4 F H Sheeti Exporting the reports Gr 17 04 2008 11 10 35 Ph 0 81 seconds 100271992 1103 2002 03 03 1993 01 05 2002 10021992 1103 2002 100271992 1103 2002 03 03 1993 0105 2002 37335 days PROFITABLE p20 000 00 103 476 94 55 915 29 1002 2002 1 492 72 03 03 1993 137 660 195 2563 32 0 70 153 25 156 37 Fo 53 476 94 106 95 499 70 1 684 40 62 0 00 0 00 0 00 0 02 fae a The reports can be exported in a variety of different formats including RTF rich text format HTML hypertext mark up language TXT standard text format To export the report right click on the report and select the appropriate export option A dialog box will popup where you select the export type from the Save as type drop down menu as well as the filename which will default to the name of the trade database For exporting into Microsoft Word use the RTF format When exporting as a HTML format all of the original text formatting displayed in the reports is preserved and charts are exported as individual JPEG images The HTML files can then be downloaded to a server for others to view on the net Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 292 http Awww compuvision com au L
365. oly Grail bandwagon These people believe that the Holy Grail of trading systems means trying to find indicators and trading systems that yield a high percentage of profitable trades The bad news for these people is that there are no Holy Grail indicators according to their definition of the Holy Grail However the good news 1s that the Holy Grail of trading systems does not have to be one that produces a large proportion of winning trades In fact seasoned traders often trade systems that yield a smaller proportion of profitable trades compared to unprofitable trades The reason they are successful has to do with the overall trading system performance rather than looking at a system on a trade by trade basis If you have read Van Tharp s book Trade Your way to Financial Freedom this notion should be one that is familiar to you Van Tharp talks about the Holy Grail being a trading system that is statistically profitable in the long run rather one that necessarily produces a high percentage of winning trades As is explained trading systems with high winning to losing trade ratios can and often do yield substantial Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 228 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 losses The reason for this behavior has to do with the trade expectation rather than the ratio of winning to losing trades Having said all of this it is not
366. ompuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Profit Index 50 36 Total Transaction Cost 0 00 Total Slippage 0 00 Daily Compound Interest Rate 0 0172 Annualized Compound Interest Rate 6 4862 Trade Statistics Trades Processed 720 Trades Taken 86 Partial Trades Taken 0 Trades Rejected 634 Winning Trades 56 65 12 Losing Trades 29 33 72 Breakeven Trades 1 1 16 Largest Winning Trade Date 12 149 99 27 09 93 Largest Losing Trade Date 3 791 00 19 10 01 Average Winning Trade 1 598 49 Average Losing Trade 1 532 12 Average Win Average Loss 1 0433 Trade Duration Statistics Average Days in All Trades 355 Average Days in Winning Trades 270 Average Days in Losing Trades 516 Consecutive Trade Statistics Maximum consecutive winning trades 7 Maximum consecutive losing trades 5 Average consecutive winning trades 2 95 Average consecutive losing trades 1 71 Relative Drawdown Maximum Dollar Drawdown Date 9 177 45 01 04 96 Maximum Percentage Drawdown Date 10 3000 01 04 96 Absolute Peak to Valley Dollar Drawdown Maximum Dollar Drawdown 13 761 33 13 80005 Capital Peak Date 99 716 02 05 06 98 Capital Valley Date 85 954 69 01 08 00 Absolute Peak to Valley Percent Drawdown Maximum Percentage Drawdown 13 8000 13 761 33 Capital Peak Date 99 716 02 05 06 98 Capital Valley Date 85 954 69 01 08 00 Simulat
367. on If a record index is greater than another record index then the record with the greater index will always have taken place after the record with a smaller index O Column Trade This column represents the trade number for each trade record This is the same number that is displayed in the Trade column of the trade database list and is used to identify each trade so that a trade record can be cross referenced back to the trade database For example you may have a trade that is producing rather abnormal profits or losses during a trade simulation In this case you would like to run a simulation without the possibility of this particular trade being taken To do this just cross reference the trade number in the Trade Log of the offending trade back to the trade database and uncheck the corresponding trade in the trade database The trade log has a number of additional features that simplify this task somewhat which will be described in a later section O Column Sys ID This column represents the System ID used to identify the trading system O Column Symbol This column represents the symbol of the security O Column Status This column represents the trade status during a trade transaction It can be either Entry or Exit and determines whether the trade was entered or exited respectively For every entry trade record a matching exit trade record will exist at a later date n Column Position This column represents the trade position It can be eit
368. on 26 March 2009 Final Release Version 6 4 1 Problems when loading Trade Database files You may experience problems loading a trade database file if that file happens to contain errors All errors and warnings are either displayed with popup message boxes prompting used action and or are logged to the Message Log Window An example of the Message Log Window is shown in the following screen shot lol x 3 2 40 43 PM Starting Trade Database Report 3 Trade Data Error Details Symboal 447 Position Long Entry DatefS1 Jan 94 Exit Datel31 Jan 94 Initial Stop Pric f0 038638 Entry Pric f0 057896 3 Trade Data Error Details Symbol ADB PositianfLong Entry Datef06 Jan 93 Exit DatefO Jan 933 Initial Stop Pricef 415574 Entry Pric f 4000001 i 2 40 47 PM Ending Trade Database Report EJ trade Database Processing Error caused by User Aborted EJ Error Processing Trade Database Process Aborted Trade Data Errors If you have used the latest MetaStock TradeSim plug in to generate a trade database file then you should not need to worry about errors with trade data as invalid trade data is automatically filtered out of the trade database However if you are loading a Universal Text Trade Database file TradeSim contains extensive error detection and recovery needed to flag and report invalid trade data If a trade data error is detected a popup message box will appear prompting acti
369. on Australia Pty Ltd All Rights Reserved Page 71 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Using the Initial Stop as a Protective Money Management Stop Specification of the Initial Stop by itself in the trade data will not act as a protective stop and the trade will only exit when there is an exit trigger condition as specified by the exit trigger parameter This ExitTrigger may have nothing to with an exit based on the Initial Stop parameter that you specified This is okay as long as you are only concerned with using the Initial Stop to size trades and not control risk However when we talk about risk based position size models we need to add extra rules into our trading strategies that force us to exit a trade if the price of the security goes below or above the Initial Stop regardless of our exit trigger This type of rule is called a protective stop Implementing a protective stop in MetaStock can be very difficult at times due to the way the MetaStock formula language works which makes it very difficult to reference previous values at a specific date namely your point of entry into a trade However the TradeSim MetaStock external Plug In has an additional set of functions that can be used to switch on additional features that are built into the RecordTrades function This allows simple implementation of money management or protective stops without having to worry about the intricacies of the M
370. on disables the effects of a call to this function There are situations when the one bar delay is forced on or off irrespective whether or not the delay has been activated or not These are in order of precedence 1 When EnableProtectiveStop and UseClosingPriceAsThreshold have been called and a protective stop has been breached then the trade will exit on the next bar at the opening price Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 85 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 2 When EnableProtectiveStop and SetExitPriceTolnitialStop have been called and a protective stop has been breached then the trade will exit on the current bar at the InitialStop price 3 When SetProfitStop and SetExitPriceToProfitStop have been called and the profit threshold has been exceeded then the trade will exit on the current bar at the profit threshold price SetExitTriggerDelay ExtFml TradeSim SetExitTriggerDelay DELAY This function is used to ignore any ExitTriggers a DELAY number of bars from the point of entry into a trade A call to the Initialize function disables the effects of a call to this function Example The following example sets up the RecordTrades function to ignore the ExitTrigger signal for 3 bars from the point of entry into a trade ExtFml1 TradeSim SetExitTriggerDelay 3 SetTimeStop ExtFml1 TradeSim SetTimeStop
371. on from the user Gut of range value detected in trade data Trade excluded fram database Check Message Log for details e C Report All Errors to the Messaqe Log Only o C Supress all Error Messages C Abort Processing The message box allows several options which can be selected by clicking on one of the several error handling options No matter which option is selected all trades that contain invalid trade data are suppressed from the trade database although the original errors still remain in the trade database files UO Continue Processing This is the default setting Every time an error is detected this message box will pop up Clicking the OK button will close the message box and if further errors are detected in the trade data the message box will popup again Every time this message box pops up the details of the errors are logged to the Message Log Window Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 143 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Report All Errors to the Message Log When this option is selected all errors are reported to the Message Log without any user intervention 0 Suppress All Error Messages When this option is selected all error messages are suppressed Abort Processing When this option is selected the trade database is aborted and no further processing is done Duplicate Trades If the Chec
372. on the trade of interest and then select Plot Open Equity Chart for The currently highlighted trade only from the popup menu Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 221 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 7000 Initial Stop eee cee 1 I r I r 1 e 1 L 1 L l I 4 4 77 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 222 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Preferences The Open Equity preferences can be accessed through the Tools menu or you can click the Preferences icon on the tool bar From the preferences page you have some options that control the way the open equity is calculated Global Parameters Update Manager Security Information Miscellaneous Chart Freferences Equity Chart If Display Total Equity Scale Date Filte f Display All Dates C Display Date on the first trading day of the week C Display Date on the first trading day of the month Closed Trade Charts Open Trade Equity Chart Plot Open Trade Equity based on f Closing Price C Opening Price High Price C Low Price If Check Entry and Exit Price with Security Data Common Parameters The following parameters apply to both closed trade charts as well as the open trade equity charts More information
373. ond page contains a detailed trade simulation report The third page is only present for the Professional and Enterprise Editions and contains a Performance Summary Report All in all the Trade Simulation Report provides a number of relevant performance indicators statistics and parameters that are useful in evaluating a trading system The last page combines the information contained in the other report pages Note All Reports are displayed using Microsoft Rich Text Format RTF and therefore can be copied and pasted into any text editor or word processor that can accept RTF To copy any part of the report just select the relevant information using the mouse whilst holding down the left mouse button Once you have selected the text just press the Ctrl C key combination and the selected text will be copied onto the clipboard You can then paste the information into your word processor document in the same way it is Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 164 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 displayed in the report Once you have pasted the information into your own document you can then edit it as you would a normal document Alternatively any page in the report can be exported in either Plain Text or Rich Text formats Trade Parameters Tab These parameters mirror the parameters setup in the Trade Parameters and Trade Preferences window
374. oor historic performance its performance can usually be improved by simply swapping the entry and exit conditions This is the effect of contrarian opinion Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 275 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 If your friends or neighbors scythe about their 10000 portfolio paper gain in a roaring bull market and you are feeling disappointed with your trading performance because you are sticking to your trading plan and have only achieved a 50 increase in equity just remember the saying A bird in your hand is worth two in a bush Chances are that after a crash or correction in the market your neighbors will still be holding onto losers hoping for them to return to their former crown of glory If you stick to your trading plan you will most likely be holding onto a net profit because a proper trading plan will preserve your trading capital at the very least Don t be concerned about anyone else s involvement in the market least of all people who don t have a proper trading plan or understand the concept of capital preservation In fact the best thing to do is to isolate yourself from others who don t understand the underlying concepts of trading Tell them nothing about your own involvement in the markets and pretend you don t know anything because they won t listen to you anyway Never try and catch a falling knif
375. opyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 31 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 test a trading system 1s that the system tester built into MetaStock is only limited to a single security with only one position size model with a fixed initial capital As a result this can give a very distorted view of your potential trading system performance which can be very misleading for a number of reasons namely e Because back testing has only been applied to one trading entity and not across a wide range of trading entities from different industry groups the result is an unrealistic representation of a typical real life trading system which is usually traded across a diverse range of securities e Limiting of system testing to a single trading entity will result in an inadequate number of trades Back testing your system using one trading entity may only yield twenty or so active trades Hardly enough to evaluate its true performance and very misleading from a statistical point of view e Insufficient choice of position sizing models limits evaluating the system using a position sizing model which may not be optimal for the trading system under investigation Thinking about buying a Black Box trading System You ve probably been exposed to the hard sell of a Back box trading system at some time or another either through a free seminar or just passing by a sta
376. or Mod a eo E AAT A A EAA 191 E ar Togt le AmO Tagi arnee EEE EEEN ANES 191 E d Tore Awo Ma e r T OT 191 E E Togele C barn Gridieaniieiinsni i i anaE a A A a AE A AAA AAS 191 E ii Toggle 3D Attributes a ccscasiacsdacassancras gietcaastouacntadatscaasolaniguina nanieetidasias deanecias wear eaeaas 191 DATE SYM E Toe As a MO oer e N E EEE EE ee emcee 191 m E Increase line thickness seissdecascceccsieaiediadtadentvsaeneulshcxctcaie Sand iaGaaeaveisuandni citcaudie daa tsbaddecteicianitasloctsnesansiies 191 oe E Decrease line THICKIIESS aces jccscici se ciararalesensipacntarabiiosgiaiaiasixeiiaaysociauanabuldedaiohocidyisteiimsideicingianhdenioiedauls 192 E m Tee peee E E aaea E E T E NERE 192 E 1 Open Trade Inspector E sccsccstcecieedioctadensessesideiesacaudileRuaniseasnasvisuendni oitcaudis dual tsbaddecteoesieitabiiccienetansihs 193 E Export Chart P El Sen ee eee nn ee en ee N eee ere A EENE kS 194 E E a A E cod cece O E E E AA EE E A E ANA A a E 194 ala E Chart Prolo reno i casni EE ENEE 194 Advanced Chart control using the Left and Right Mouse Buttons ccccccccccccccccccccceeeeeeeeeeeeeeeeeeeees 194 LJ Panning using the right mouse button function 0 0 0 eee ccccceescecesseeesseeeesseeecsseecesseecesseceesseceesseceesaeceesaeeess 194 LI Zooming using the left mouse button FUNCTION ccc cceccesseceessecessseecsseecesseeceseecesseecesseceesseceetseeeesaeeens 194 Chart DCS Crip iO S sassis naana a Oa iR oi 195
377. or share splits etc Beside each of the trade numbers is a checkbox When this checkbox is ticked the corresponding trade will be included when a trade simulation is in process This does not mean that the trade will be taken when running a simulation because this will depend on a number of other trading parameters and criteria However when this checkbox is not ticked the trade will not be included as part of the trade simulation and it will never show up in the results of the trade simulation To disable or enable a single trade just check or uncheck its corresponding checkbox by clicking with the mouse pointer on the checkbox To check or uncheck a group of trades or all of the trades a simpler procedure is available First you need to select a group of trade records Trade Record Selection Select an initial record by clicking on the first trade record To select a contiguous range of records hold down the Shift key whilst selecting the last record of the group The group should now be reverse highlighted in dark blue To select a non contiguous group of records hold down the Ctrl key whilst clicking on the trading records of interest Each record should then be reverse highlighted in dark blue You can now check or uncheck all of the highlighted records by bringing up the database popup menu Trade ID Pos Symbol _ Entity Date ExitDate Level Bars Days Initial Stop Ent Price Exit Pric Database Popup Menu Start Enty D
378. or symbol from the popup menu Type in the symbol name and click OK or alternatively if you would like to select the security from a list then type in a question mark if it is not already displayed and then click on OK 2101X Hite D for smed EnyDas EitDae Lev Bas Dare ntsc to Pree ea 0 0 0 0 0 0 0 0 0 I 0 j 24 071 556 26 071 356 26071996 30707 1996 30707 1996 Bl Display Whole Chart for EE A Symbol 3 3 3 0 0 02708 1996 05708 1996 05 08 1996 w A A Ou 04709 1996 2 10 1996 2305 1996 10709 1956 30705 1956 08708 1996 21708 1996 01710 1996 AC AAN a O ed Ba zi r 42 oo ao 42 a1 x 2 9063 Satie 1 5104 3 592 1 1262 5 0777 40 3984 1 8140 3 43 3 8353 ara 4 77 6 8150 4 7366 0 7506 0 5605 tt Aa 2 6721 6 2500 41 9754 44 0765 41 2250 6 2790 0 4435 41 9300 43 6300 44 0400 3 5600 45 2000 r 0500 4 8500 40 8290 40 z000 tO Cm a 1670 trades selected from a total of 1670 trades Start Entry Date 1371071992 gt Stop Entry Date 08708 2002 Select and click the appropriate symbol from the symbol list All Securities gq B x Meal PA HABD MABIGI HABIMY NABISP MABE NAB MYCH NAB Wa NAB MU Mes NAB MY NABIGS HABIMZ HABISO HABIZA HABWE NAB WMA NAB hy MLN NABD MA NABIGE HABIDA NABISA NABIZB NAB WGA NAB WME NAB M MesLOA NABDSA NABIGL MHABIOC NABIST HABIZD NAB WGB NAB WMC NAB Ma
379. ore Information Advanced Options Installation hy Do Not Install You can view any last minute additions as well as the modification history by clicking on the More Information button Warning Do not change the default installation directories from the Advanced Options dialogue box These have been automatically been determined and should not been altered At the very least both TradeSim and Metastock should be installed on the same drive and in the default Windows Program Files directory You can select which components you want to install by clicking on the Select Components button however new users should not need to worry about this and simply proceed with the installation by clicking on the No Questions Asked Installation button FaF After TradeSim has been successfully set up the TradeSim icon will be placed on the a desktop TradeSim can be run by double clicking the TradeSim icon on the desktop Alternatively it can be run from the TradeSim program menu ie Start gt Programs gt TradeSim gt TradeSim Tradesim Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 40 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Installing the MetaStock Formula Library and Examples During installation the Metastock Formula Setup program FOSetup exe will be copied across to the TradeSim program directory The Formula Setup program contains
380. orizontal direction O Horizontal Panning using the right mouse button function When the mouse cursor is within the chart windowpane clicking and holding down the right mouse button allows the chart to be panned in the horizontal direction by moving the mouse This allows detailed viewing of any part of the chart without having to repeatedly click scroll bars O Horizontal Zooming using the left mouse button function When the mouse cursor is within the chart windowpane clicking and holding down the left mouse button and tracing out a rectangle on the chart by moving the mouse pointer from left to right will zoom the contents in the rectangular window to fit the chart pane horizontal extents when the left mouse button is released Dragging the mouse cursor in the opposite direction will reset the chart axis Dynamic Cross Referencing P E TradeSim also provides dynamic object cross referencing between the Security Profit Chart and Trade Statistics Table This allows easy cross referencing from the Security Profit Chart to the Trade Statistics Table and vice versa without having to manually search and cross reference the information U Cross Referencing from the Security Profit Chart to the Trade Statistics Table To cross reference a point on the chart to the entry point in the Trade Statistics Table move the chart focus to the relevant point on the chart and then double click the left mouse button The Trade Statistics Table tab will then be br
381. ortfolio Heat If enabled locates the corresponding trade in the Portfolio Heat Chart o Winning Trades If enabled locates the corresponding trade in the Winning Trades Chart o Losing Trades If enabled locates the corresponding trade in the Losing Trades Chart Note You cannot cross reference a trade in the Trade Log to the Monthly or Yearly Profit Charts Cross Referencing from the Charts to the Trade Log If you have previously run a simulation with the Trade Log enabled then you can cross reference any point on a chart back to the Trade Log The only exception to this rule is that you cannot cross reference from the Monthly and Yearly profit charts to the Trade Log To cross reference from a chart to the Trade Log just move the chart focus to a point of interest and then double click the left mouse button If the Trade Log has been previously generated then the Trade Log window will be brought to the front and the relevant trade event will be highlighted Cross Referencing from the Charts to the Trade Database Manager You cannot directly cross reference a point on a chart directly to an entry in the trade database manager However you can first cross reference a point on a chart to a trade event in the Trade Log and then cross reference the trading event in the Trade Log to an entry in the Trade Database manager Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 210 http www compuvision com au
382. ot other charting packages This is because MetaStock is probably one of the more popular charting packages available It is a relatively low cost package has numerous features and excellent graphics as well as a large support base It also allows easy interface of third party packages of which TradeSim 1s one The MetaStock indicator language is flexible enough to allow development of the simplest trading systems as well as the more complex variety Although TradeSim is primarily aimed at MetaStock owners it is not limited to such Because TradeSim can read trade databases that are stored in Universal Text file format its use 1s not just limited to MetaStock but now can be adapted to other charting packages which could be used to generate suitable trade data We will be looking at developing add ons for other charting packages in the future What this manual is not about This manual is not about teaching you how to trade but rather to help you to trade better using TradeSim as a tool which can objectively be used to improve your trading strategies TradeSim doesn t care how you trade or your philosophies on trading If you can express your trading system by a simple framework of entry and exit triggers and prices then TradeSim can back test your trading system and do it in an objective way that is necessary to properly evaluate its worth If you need to learn more about the concepts of trading then I suggest that you refer to one of the texts in the
383. ought to the foreground with the relevant entry in the Trade Statistics Table highlighted Note that the point on the chart will be marked with a green circular marker Cross Referencing from the Trade Statistics Table to the Security Profit Chart To cross reference an entry in the Trade Statistics Table to a point on the chart first select the table entry by clicking the left mouse when the mouse cursor is over the relevant entry and then either double click the left mouse button on the table entry or right click the mouse button and select the appropriate option from the popup menu The Security Profit Chart tab will then be brought to the foreground with the relevant point on the chart centered in the chart and a green marker added to the chart Trade Profit Distribution Clicking on this tab reveals a Trade Profit Distribution Histogram or Distribution Chart This chart displays the distribution of trade profits from the simulation Note that profits are specified in terms of a percentage increase in profit rather than absolute dollar gain This allows all trade profits to be normalized in terms of profit gain which would not be possible if the absolute dollar profit gain was used Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 177 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Trade Profit Distribution Equis Bollinger Bands 1 o t oo ha ha ha oo a
384. ount then this will be the case However this will rarely be the case and most successful traders usually trade systems which have more losing trades than winning trades How can this be so In order to understand this better it is necessary to understand the nature of random processes and talk in terms of trade expectation which is a measure of the average outcome per trade over a large number of trades This is defined by the following mathematical relationship Expectation Pw i Aw PL AL Where Pw is the probability of a winning trade Aw is the average win P is the probability of a losing trade A is the average loss As an example consider a trading system that has 90 winning trades with an average win of 270 as well as 10 losing trades with an average loss of 2700 Plugging these values into the above formula reveals the truth about this system Expectation 0 9 270 0 1 2700 27 per trade The negative expectation yields a system that is right 90 of the time but you eventually lose all of your money trading it Now consider a system which has 40 winning trades with an average win of 400 and 60 losing trades with an average loss of 200 The trading expectation of this system tells another story contrary to most people s beliefs of what constitutes a winning trading system Expectation 0 4 400 0 6 200 40 per trade Although this system only has a success ratio of 40 it is profit
385. ow to a default size of 720x512 pixels o 800x600 This resizes the main window to a default size of 800x600 pixels Help Menu Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 118 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 view User Manual view Quick start Tutorial view Readme Document About Version Update Manager Register Software Disclaimer Compuyvision Home Page Purchase Online Trade5im Download Page View User Manual Provided that you have the Adobe Reader installed clicking on this menu item will run the Adobe Reader and display the TradeSim User Manual The User Manual can also be loaded through the Start menu Start gt Programs gt TradeSim gt User Manual View Quick Start Tutorial Provided that you have the Adobe Reader installed clicking on this menu item will run the Adobe Reader and display the Quick Start Tutorial document The Quick Start Tutorial can also be loaded through the Start menu Start gt Programs gt TradeSim gt Quick Start Tutorial View Readme Document Clicking on this menu item will run the default Internet Browser and display the Readme file About Clicking on this menu item will display the About dialogue box Version Update Manager The Version Update Manager allows TradeSim to check to see whether a new version is available for download from the web You need to be connected to the Inter
386. p Unconditionally ET lt EA lt EH Always EA ET EL lt EA lt ET Always ET EA Enter Trade Order At Market EL lt EA lt EH EA ET EL lt EA lt EH ET EA Exit Ordering E Long Trades Short Trades Actual Exit Trade Actual Exit Trade Order At Market XL lt XA lt XH XL lt XA lt XH Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 160 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 EntryPrice Parameter in the RecordTrades function EA Actual Entry Price which includes slippage if any CEH _ High ofthe day at entry from the trade database Bernina an ExitPrice Parameter in the RecordTrades function XA Actual Exit Price which includes slippage if any Low of the day at exit from the trade database XH__ High of the day at exit from the trade database Simulation Options QO Allow Intraday Exits Currently when single bar trades are processed all trades with the same entry date are entered limited by the available capital before they are closed off When Allow Intraday exits 1s enabled single bar trades of the same date are closed off before another same bar trade 1s entered Default Preferences Set Default Trade Parameters Set Default Preferences Set all Defaults The preferences can be set to a default state This will reset any parameter on the Trade Preferences window to a default state
387. p Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix G Exporting Charts P E The Professional and Enterpise Editions of TradeSim allow you to export any of the charts in a variety of image and text formats O x Date value Symbol Trade Log Index ve To invoke the chart exporting dialog box click on the export tool on the chart tool bar You can export the charts in either image or text formats depending on the tab selection Export Chart x Native Data Options Size as Metafile as Bitmap If Enhanced as PNG as PLS as GIF Exporting the Chart as an Image File You can export the chart as an image file by clicking the Picture tab and then selecting the required format from the format group box An additional set of options available from the adjacent tabbed page control allow you to customize the way the image is saved Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 295 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Chart Formats Q E Metafile Format Saves the chart as either enhanced emf or standard metafile wmf formats Bitmap Saves the chart as a bitmap bmp formats PNG Saves the chart in Portable Network Graphics png format PCX Saves the chart in PCX pcx format GIF Saves the chart in Graphic Interchange Format gif
388. p or trailing stop has been used to limit the maximum loss of the trade to a level that corresponds to the initial stop value To enable protective stops when generating a trade database please refer to the section in the previous chapter Using the Initial Stop as a Protective Money Management Stop for more details on how to do this Fraction of Capital Risked per Trade This parameter determines the total amount of capital risked per trade and is specified as a percentage of the total trading capital For example if our total trading capital is 100 000 and we risk 1 of our capital on a trade then we will risk 1 000 on the next trade and this 1s irrespective of any existing trade positions that have already been taken O Position Value Size Limit This parameter limits the maximum position value size of any one trade to a value that is a fraction of the total trading capital at the time the trade is to be taken o Example As an example say you currently have 100 000 tied up in both open positions and cash i e your total trading capital is 100 000 You risk 1 1 000 of your trading capital on a trade and calculate the position value size of the trade according to the difference between the entry price and initial stop price If your position value size is limited to 10 of total trading capital 1e 10 000 then the trade will be capped at 10 000 even if the position value size required is greater than 10 000 QO Portfolio Heat Thi
389. pate submenu Charts Window Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 211 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Displaying Security Charts E The Enterprise Edition of TradeSim allows you to display the trading information of any trade in the trade database or Trade Log on a bar chart of the underlying security To do this requires that TradeSim have access to security data for the relevant stock in MetaStock binary format Typically the security data that TradeSim uses to display the bar chart is the same security data that MetaStock uses to generate the trade database In this way there can be no problems with out of sync data Security Information To direct TradeSim where to find all of the security data you need to specify this in the Security Information tab in the global preferences TradeSim provides a simple method of accessing security data by only requiring the top level security directory upon which TradeSim will search out all of the MetaStock master index files Note TradeSim currently only supports security data in MetaStock data format Global Parameters Update Manager Jecunty Information Open Trade Equity Metastock Master Database Files OS hares V4 u4452 4 master DA Shares W4u4452 8 master OD Shares u 453 C master DS hares Va una52 0 master DS hares Wa u445244E Smaster OS hares W4u445244F master
390. pecification of the position size on a symbol basis through the use of the AssignValue function The following table describes the additional fields in detail Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 109 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Description and Comments Default Value after a call to InitializeValues Extended Data Field Allowable Values Name Commodities 1 Equal Dollars 0 use default value in Units TradeSim 2 Equal Percent Dollar Units 3 Fixed Dollar Risk 4 Fixed Percent Risk 5 Fixed Volatility 6 Fixed Percent Volatility 0 use default value in TradeSim 0 65536 0 use default value in TradeSim re See table below See table below PSMParm2 Position Size See table below See table below Parameter 2 PSMParm3 Position Size See table below See table below Parameter 2 The allowable values for the three position size model parameters PSMParm 1 3 changes depending on the position size model selected The following table describes the additional fields in detail PositionSizeModel Position Size PSMParm1 PSMParm2 PSMParm2 Value Model Value Value Value Equal Dollars Units Capital per trade PositionSizeModel Position Size Model Limit MaxNumberOfOpenPositions Maximum open positions PSMParm 1 Position Size Parameter 1 NNW YY E Equal Percent Fraction of total 2 Dollar Uni
391. plore Reports Options Created with MetaStock by Equis 2001 Once we have set up the exploration we can run it like we would with any other exploration Refer to your MetaStock manual for more details on how to do this The results of the exploration are shown below DGS Trade Recorder MACD Crossover Explored 10 02 2001 Results Rejects Exploration SecurityName Trades Ticker Folder Inspect AAPT LIMITED 26 0000 AAP D MyStockData ASx200 ADELAIDE BANK 39 0000 ADB D MyStockData ASx200 Pen Cien ADELAIDE BRIGHTO 35 0000 ABC D MyStockData ASx200 ADSTEAM MARINE 36 0000 ADZ D MyStockData ASx200 ADVANCE PROPERTY 43 0000 APF D MyStockData ASx200 sort AMALGAMATED HOLD 32 0000 AHD DAMyStockDatat ASx200 AMCOR LIMITED 26 0000 AMC DAMyStockDatatASx200 Print AMP DIVERSIFIED 38 0000 ADP D MyStockData AS 200 AMP INDUSTRIAL T 29 0000 AIP D MyStockData ASx200 ree AMP LIMITED 24 0000 AMP D MyStockData AS 200 AMP OFFICE TRUST 50 0000 AOF D MyStockData ASx200 ANACONDA NICKEL 26 0000 ANL D MyStockData ASx200 ANGLOGOLD LIMITE 10 0000 AGG D MyStockData ASx200 APN NEWS amp MEDIA 41 0000 APN D MyStockData ASx200 ARGO INVESTMENTS 420000 ARG D MyStockData ASx200 ARISTOCRAT LEISU 29 0000 ALL D MyStockData ASx200 Ea Created with MetaStock by Equis 2001 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 80 http www compuvision co
392. port Equis Bollinger Bands All Trades Trades Taken 86 Total Net Profit 45 084 11 Average Trade Profit 524 23 Maximum Trade Profit 12 149 99 Minimum Trade Profit 3 791 00 Break Even Trades 1 Winning Trades 56 Losing Trades 29 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 170 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Percent Profitable Average Winning Trade Profit Average Losing Trade Profit Long Trades Trades Taken Total Net Profit Average Trade Profit Maximum Trade Profit Minimum Trade Profit Break Even Trades Winning Trades Losing Trades Percent Profitable Average Winning Trade Profit Average Losing Trade Profit Short Trades Trades Taken Total Net Profit Average Trade Profit Maximum Trade Profit Minimum Trade Profit Break Even Trades Winning Trades Losing Trades Percent Profitable Average Winning Trade Profit Average Losing Trade Profit Copying and Pasting the reports into another application See Appendix F for more details Exporting the Reports P E See Appendix F for more details Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 65 12 1 598 49 1 532 12 86 45 084 11 524 23 12 149 99 3 791 00 1 56 29 65 12 1 598 49 1 532 12 N A N A N A N A N A N A N A N A N A N A Page
393. r ee npr eee ee earner ete een yon Renee ee tee reat 240 Winnie Trades Distribution sissie aa ENEAN 240 Losine Trades DIStri WOW sracssnsni aaan ANEELA 241 NY PUNO MOOK TOE eea A A EAE AEE A AEE A ERAAN 241 Changing the Distribution Chart display defaults ccccccccsssssssssssssssssssccccccccccssssesssseeeeeeees 242 Fregueney Display vcrcccteeicrecsacccetehacedeneacenccsedececebesdeseesstebedendtedeedeteaGanesdusGledeattnatesecedietiumnctesedseledaaceenaes 242 I Absolute Fregutnity cvnamninnriari a aA AAT ATEA AAS 242 IRL eT ag nce sete esac ecsns ayas aea Ea aps EEE ATAT NENE NE gNEMAG 242 LY Relative Frequency c cccsccccssscesssecesssecesssecesseccesseccssseceseecesseecesseecesseccesseceesseceesseceessececsseeesaeceesseceesaecens 242 Bars 10 Distribution chal tisser e E 243 Discrete Cumulative Frequency Distribution ccccccccccccccccececeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 244 Increasing the number Of trade Simulations ccssscccccccccccsssssssssssssssssssssscsscsccccesssssseeeeeeess 245 Improving th trading Syste vsiecsccsssserssessscscdessasdececcscassoxsneresesescnsdeseucdecwssadseseseaszetassssuedeveuedssboues 248 Case Study Reversed MACD Crossover Trading System ccccscccccssssssssssssscccoees 249 COn TG A A A EA E AAA A A 251 Case Study Random Entry Bollinger Bands Exit System seccscssssseccccocssssseeeeosssse 252 BOE a T ass ce ceca uaa vcs eens can casa A
394. r is switched off using DisablePrice Filter then price checking is still done but any price violations will cause the respective trade to be rejected and an error message will be reported to the report log AllowlnvalidPriceData ExtFml TradeSim AllowInvalidPriceData This function allows outside daily range prices to be included in the trade database Normally any price data which lies outside the daily range is automatically constrained by the internal price filter or if the price filter is disabled the trade is excluded from the trade database When AllowInvalidPriceData has been called the check is still made and reported but any outside daily range data is now written to the trade database It should be noted that doing this might cause unexpected results should only be allowed if you understand the effects of doing this To allow TradeSim to accept invalid price data you have to enable the reciprocal option in the global preferences in TradeSim otherwise invalid price data will be rejected Note Only experienced users should enable this option as it is possible to allow unrealistic prices to be incorporated into the trade database For example if a security Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 100 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 trades between 3 4 on a given day and your entry price is 19 in most cases this would not be consi
395. r of errors warnings and informational The right section displays the current trade position Long or Short the current Symbol and the current security name Total Number of Errors 336 Total Number of Warnings 0 Total Number of Queries 41 Position Short Symbol wow Security Name WOOLWORTHS LIMITED ORDINARY Signal Chart Tool Window The signal chart is used to aid in debugging your indicators or trade database explorations To bring up the signal chart you need to include the following external function call in your code ExtFml TradeSim ShowChart SYMBOL See the function library for more information on this function When this function is called with the appropriate symbol it brings up a window which displays a variety of signals in both graphical tabular and tree form This information is a useful aid for debugging trade database exploration code Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 54 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note that the symbol of interest must be included with the security list of your trade database exploration otherwise the chart will not appear The signal chart displays the following information o Price Candle Stick Data Displays all of the security data in candle stick format Optionally the following data can be overlaid on the price chart by enabling the respective checkbox on the
396. rade How much essentially means how big a position you should have at any given time throughout the course of any one trade As a result of this it is sometimes referred to as position sizing which is the terminology that is used in this manual The Position Size of the trade refers to how many shares or contracts of the one security were purchased or sold as part of the trade whereas Position Value refers to the aggregate cost of the trade The position size methodology chosen for a trading system will have a profound effect on its long term profitability so it is imperative that this part of the trading system be scrutinized rather than focus on less important issues such as entry criteria Position Sizing Models TradeSim supports six different position sizing models This allows quick performance comparisons of a given trading system using different position sizing models thus establishing the most effective position size model for the trading system being tested Each position size model has a number of trading parameters that are common to all position sizing models such as Initial Capital Total Transaction Cost and Portfolio Limit These parameters are described below Common Trading Parameters Initial Capital This is the initial amount of trading capital that is used when trading commences O Transaction Cost The transaction cost specifies the cost of doing each side entry and exit of a trade It can be specified
397. rade commissions which we set to zero for this example Including trade commissions in our trading simulations will only reduce the net profitability and will have the effect of shifting the distribution chart to the left thus further reducing the probability of achieving a net profit after trading this system Winning Trades Distribution The Winning Trades Distribution chart illustrates the way that the percentage of winning trades per simulation is distributed The distribution is usually distributed about a mean value and falls off on both sides of the mean value Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 240 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Report Simulation Log Profit Distribution Winning Trades Distribution Losing Trades Distribution eee eee eee Losing Trades Distribution The Losing Trades Distribution chart illustrates the way that the percentage of losing trades per simulation is distributed The distribution chart is usually distributed about a mean value and falls off on both sides of the mean value Report Simulation Log Profit Distribution Winning Trades Distribution Losing Trades Distribution What to look for Ideally we would like to maximize the percentage of winning trades and minimize the percentage of losing trades even though this is not a prerequisite for a winning trading strategy The Winning
398. rade with Successful trading requires strict discipline and a lot of hard work and effort there are no short cuts Anybody telling you different is just lying to you or profiteering from your own ignorance and lack of education What is even more unfortunate is the fact that it is not hard to put together a potentially winning trading system using low cost charting and technical analysis packages such as MetaStock and TradeSim thereby saving you money that could be used for more important things like trading capital The choice is entirely Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 32 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 up to you the individual if you want to be lazy and take what appears to be the easy road and risk buying a white elephant or put on your thinking caps and learn the ropes the hard but sure way Using TradeSim To analyse or back test a trading system requires a suitable history of trade data Typically the trading data may have come from real trades paper trades or computer generated trades such as a set of indicators or an expert overlayed on a chart in MetaStock However the downfall of using actual trade data is that usually there 1s an inadequate number of trades or sample points for a proper valid statistical analysis to be made Another limitation of using past actual trading data is that the trade data has been tied to a pa
399. ratnencduepeatianoiaasaiatsaiess 223 LJ Check Entry and Exit Price with Security Data ccc ccccccccsssccssseecssseeesseecesseecesseeeesseeeesseceesseceesseceesaeeens 224 Dynamic Cross lt clic o nell 4 2 ene eee eM nea cee meet eae seee EE E arene Ser ern A 224 Open Trade Inspector H NEE EEEE T EA E E A A A A E A T 225 Nore Open Trade Chari Sisirin aaa aA are NEERA RNAn 225 Bar by Bar Detailed Drawdown Chatt aesisiioiisini i E E EA 229 Bar by Bar Detailed Underwater Equity sicscccvccccsccneceteccvectacnpecenaenancsnaceaecanaesascsnicadecsaeeteeasneeseecanoebeendene 225 AV Ge II OBE D a 22D MWE 8 1 9 6 Denn eC Cy ene O 226 Monthly Pronit Daflenni a iaiaaeaia 226 MONSE e a E E eect eeeete 226 yP Onr 0 1 ae E S there eee ne eet 226 SeN lt gt 1G 0 eee eee ee ene eaee nn eR er eee ent E eee E E E te te 226 ADVANCED SYSTEM TESTING USING TRADESIM ENTERPRISE EDITION ccccccssssesces 227 MATEO GE IG I covevecesdecacecucesscccaaeencccvasavacceceanccusccawadendeieccuucervsssscsvavauewsuniesrusundcasacecadsesuwessbasurecases 227 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 17 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The traveling salesman Prope scscssssssissecssssssoncssdscescatesiaereredesssanesincasdedessssassevassdedesssavetineaabasesens 221 Advanced SUAGISUICAL ANALY SIS sissi Eaa aiaa 228 Deducing a correct statistical hypothesis sse
400. re minimized by not requiring that the security data be kept in memory To plot the open trade equity TradeSim needs to have access to the security data files To set this up please refer to the section on Security Information Note It is best to generate the trade database using the same security data used to plot the open trade equity If this is not adhered to then it is possible that there could be some situations where trade data is missing or inconsistent for a given trade in the trade database TradeSim can alert you to these inconsistencies and will either report it as an error or warning to the Message Log To plot the bar by bar equity you need to first create a Trade Log by running a simulation then right click on the Trade Log and select Plot Open Equity Chart for followed by All trades in the Trade Log Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 218 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Hill Trade Log Long 1421995 3 2760 3 2760 N Jump to Trade Exit Locate in Trade Database Select all trades in Trade Database Locate in Chart Highlight all currently open trades Preferences Export Trade Log Plot Open Equity Chart For 4ll trades in the Trade Log Display Trade on Chart All trades with symbol WSF Exit Long 002396 The currently highlighted trade only Once a security map has been created then the open equity chart wi
401. really only useful when running a Monte Carlo simulation When running a single simulation this parameter will always be 0 O Total Trades Processed Specifies the total number of trades that have been processed since the simulation was started When running a single simulation the Total Trades Processed and the Trades Processed will be identical However when running a Monte Carlo analysis with more than one simulation the Total Trades Processed will reflect the total accumulated number of trades processed since the start of the simulation For the Professional and Enterprise Editions a simulation will only include the trades that are enabled checkbox is ticked in the Trade Database Manager See the definition of Trades Processed above Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 162 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Trades Processed Specifies the number of trades that have been processed from the trade database and should not be mistaken with the trades executed since not all of the trades processed are executed At the end of each simulation the trades processed should be equal to the total number of checked trades in the trade database For the Professional and Enterprise Editions a simulation will only include the trades that are enabled checkbox is ticked in the Trade Database Manager For example if a Trade Database contains 2 000 trades and on
402. represents breakeven trades By default the trades are organized in the correct chronological ordering That is they are ordered the same way the trades would have been executed in a real trading scenario The list can be resorted by other criteria however the index number assigned to each trade record is a reminder of the correct ordering sequence That is if a record index is greater than Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 179 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 another record index then the record with the greater index will always have taken place after the record with a smaller index Hill Trade Log Jin Trade io sumbol_ Status Pos TransDate Level Days Initialstop Price Actual Price Long 03031393 0 6950 0 6950 0 0000 Long 1610311393 0 4460 0 4460 0 0000 20S re pro pro Long 277091993 42 0 5810 0 5810 40 0000 o Aona o H5 oroa goror Long 21101933 2 2000 2 2000 0 0000 Long 200394 Long 103994 Long 22 03334 i 4 5800 45800 0000 o paa 0o00 o 0680 a 0 0000 o 077a gowa goo Long 03081994 1 0 6200 0 6200 40 0000 o 040 Column description QO Column Index This column represents a number that is assigned to each trade based on the order of the trading events The index number assigned to each record always indicates the ordering of each trading event in the simulati
403. ress a sample population in terms of relative frequency rather than absolute frequency as was done above The advantage of this is that it makes it easier to compare one experiment with another and it also facilitates computing probabilities directly from the table and charts The relative frequency values are computed by dividing the frequency values by the population size so that the normalized sample population is always 1 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 285 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 41 Relative Freauencv 1519 2024 2329 3004 3639 4044 4549 Car Battery Life oo gt O S z 0 6 D Le oO IN 2 Sd amp 5 5 O D 2 lt x N 0 1 5 1 9 2 0 2 4 2529 3 0 3 4 3539 40 44 4 5 4 9 Battery Life years Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 286 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix E The Universal Text Trade Database File Format P E This article has now been moved to the reference library folder in your TradeSim installation folder Please click here to view this document Note If this article is missing it can be downloaded from the following website location http www compuvision com au DownloadTradeSim htm Copyright 2000 2009 by Compuvision Aus
404. rest applied to leveraged long trades where the Margin Requirement is less than 100 and is calculated on a daily basis It can be specified in terms of a daily interest rate or an annualized yearly interest rate depending on the Specify daily interest rate option Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 146 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note Interest payments for Long trades are deducted from the trading account and have D appended to the amount in the Trade Log For example the current overnight interest rate for long CFD positions as per CMC Markets is 5 50 over night cash rate 2 0 premium 7 5 See http www cmcmarkets com au en content cfd what_is_a_cfd jsp section overnight for more information on CFD interest rates Note No Interest will be charged for Margin Requirements of 100 Margin Requirement Interest Short Trades This is the interest applied to leveraged short trades where the Margin Requirement is less than 100 and is calculated on a daily basis It can be specified in terms of a daily interest rate or an annualized yearly interest rate depending on the Specify daily interest rate option Note Interest payments for Short trades are credited to the trading account and have C appended to the amount in the Trade Log For example the current overnight interest rate for short CFD positions
405. ria AND Security Criteria Measurement Which performance criterion you choose to incorporate into your trading system depends on how you would want to quantify security performance A simple method that I have adopted is based on the average turnover of a security which 1s defined by the product of the closing price and the traded volume By averaging this over a period of time gives some indication to the liquidity and tradability of the security For example if we are only interested in securities with an average turnover of 50000 over the last 10 days we could rewrite our entry strategy as follows EntryTrigger Your Entry Criteria AND mov C V 10 S gt 50000 Refining the Security List Now that we have included security performance criteria in our trading system and shifted the selection of securities from a static security list to a mechanism which continuously dynamically measures security performance what do you then specify in the security list when you run RecordTrades exploration Well there is no reason why you should not include all securities in the list which may run into several thousands and let the security criteria measurement filter out the irrelevant trades However this is unnecessary and would only serve to slow down the exploration so some preliminary security list filtering should be done before hand One of my favourite techiniques which of course is dependent on how your security database is structured is to only i
406. rint Orientation This radio group selection controls the default print orientation of charts O O Landscape Print charts in landscape format Portrait Print charts in portrait format Remember screen settings When checked this option remembers the screen settings and size of the TradeSim panel UO Monte Carlo Options E O Remember Settings When this option is checked all Monte Carlo chart settings are remembered upon program exit Create Simulation Log formerly Update Monte Carlo Log Create Scatter Charts You can individually enable and disable the simulation log and scatter charts from the global preferences If you don t require them disabling either or both the log and scatter charts improves resource usage for a large number of simulations Note When requesting a large number of simulations 1 e 1 million in a Monte Carlo analysis the program would appear to hang after the analysis was completed This was found to be caused by the huge resources required by the excessively large simulation log and scatter charts The software has been modified so that when a MC simulation with more than 20 000 simulations is requested the software gives you the option of temporarily disabling both the simulation log and scatter charts Trade Database Loading Options This radio group controls the way a trade database is loaded into TradeSim O O ignore Open Trades This option controls the way Open Trades
407. rnatively if you carry out a large number of simulations then you might need to increase the number of bars displayed in order to improve the resolution of the distribution chart By default 10 bars are used The higher the number of simulations carried out the more accurate the distribution Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 243 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Discrete Cumulative Frequency Distribution It is sometimes helpful to display the frequency distribution in terms of a discrete cumulative distribution The cumulative frequency distribution is just a cumulative tally of all of the frequency bars in the frequency distribution chart Since we are dealing with a finite sample space the cumulative distribution is really termed a discrete cumulative distribution To display the cumulative distribution just select the Cumulative Distribution from the popup menu The resulting display should look something like the following p al a E N E E E A E E e I I T I I L I I T I I L I L I The last point on the cumulative chart will always represent the total sample space size depending on whether you are displaying the chart in terms of absolute or relative frequency The cumulative distribution chart facilitates easier calculation of probabilities since it only requires one subtraction rather than multiple addi
408. rofitable trades so that the total capital exceeds the initial capital then the total trading capital will be clamped or held at the initial capital and the rest of the trading profits are put aside to be used later when the total trade capital starts to fall due to losing trades When this parameter is checked any profits that are returned by profitable trades are added to the total equity and trade capital The effect of this on the trading strategy will depend on what position size model is used However it should be noted that a trading system that is profitable without profit compounding should benefit from using profit compounding How much of an improvement will depend on other factors of course but the position size model used will have the most profound effect Position size models which size trades according to a proportion of the total trading capital will benefit the most from profit compounding Pyramid Trades When a simulation is run in TradeSim pyramid trades level greater than 0 are normally ignored However when the Pyramid Trades option is checked then pyramid trades are included in the Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 145 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 simulation For more information on Pyramid Trades and Pyramid Trading Strategies see the relevant documentation ref AN3 Testing Trade Pyramid Strat
409. round L Monte Carlo Report Window When enabled this toolbar button selects the Monte Carlo Report Window and brings it to the foreground Charts Window When enabled this toolbar button selects the Charts Window and brings it to the foreground E Open trade equity Chart When enabled this toolbar button selects the Open trade equity Chart Window and brings it to the foreground dl Security Chart When enabled this toolbar button selects the Security Chart Window and brings it to the foreground Message Log Window When enabled this toolbar button selects the Message Log Window and brings it to the foreground T Rejected Trades Window When enabled this toolbar button selects the Rejected Trades Window and brings it to the foreground T Enable Disable Rejected Trades This toolbar button enables and disables the Rejected Trades Report You should only enable the Rejected Trades Report when you absolutely need to since it slows down total report generation time Enable Disable Trade Log This toolbar button enables and disables the Trade Log Disabling the Trade Log can speed up processing however a lot of additional features will be disabled Window Switches E Start Simulation When enabled this toolbar button starts a trade simulation or multiple simulations if the Monte Carlo analysis option is enabled and selected Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 116 http www compuvision com
410. round with the trade in question highlighted in the Trade Log window You can easily cross reference this particular trade back to the Trade Database window and disable it by unchecking it from the list Cross Referencing from the Trade Log The Trade Log window 1s the central focus for referencing one object to another From the Trade Log window you can link a particular trade to any chart or the trade database To do this simply right click on the Trade Log window and a popup menu will appear allowing you to select a chart or trade database you wish to reference to lili Trade Log Ioj x in Trade 0 sumbol_ status Pos TransDate Level Days Imitiaistop Price Actu a Jump to Trade Entry Locate in Trade Database Select all trades in Trade Database 420 0 149 Locate in Chart Equity i Highlight all currently open trades Equity 1 are geo o Capital In Trades Export Trade Log Reward Risk Ratio o Portfolio Heat ih Portfolio Heat 5 Winning Trades Flot Open Equity Chart For Display Trade on Chart Losing Trades Long 0308994 Cross Referencing options A number of options are available from the popup menu These are Jump to Trade Entry Exit Finds and jumps to the matching trade entry or trade exit trade log entry If you have right clicked on a trade entry then you will have the option of jumping to the matching trade exit trade log entry Alternatively if you have right
411. rrect hypothesis regarding the outcome of a trading system When we trade a system using a portfolio of securities we are dealing with a random process so that we can no longer use the outcome of a single trading event in isolation and then try and deduce a correct hypothesis for our trading system We cannot say that this trading system is historically profitable because we traded the system once and it yielded a profit for that one time only The converse is equally true where we cannot assume that a trading system will always produce losses just because we experience losses trading the system once Actually trading a system once using real money does not give us any more information about the trading system than simulating it If in the process of actually trading a system you have made a loss your next door neighbor may have made a profit trading the same system over the same period of time using the same portfolio of securities You can save the effort and heartbreak of losing money before actually trading a system that you really know nothing about by using TradeSim s advanced statistical analysis to thoroughly investigate a trading system s historical performance For a given portfolio every trading system will have a so called footprint or signature which is a way of categorizing the trading system s performance Looking for the Holy Grail Most inexperienced traders starting out using technical analysis usually jump on the so called H
412. rt Loe Tool W iMG OW sssectiossseresssiseneiasscnssisonetentapeusennschoseciecs aeebientenabicesseieseniasss vetdeetsheseniageveiil 52 A 901 a abd e 12 chs E E E ee eee ey eee ere eee eee ee 52 OME SMS IVC RG MO a2 ace erates ac taresencuareansctascaexonareatectacacn E 53 BAUD TANS E esa sew cca E O PE EE E E A oases E E O E A PO A A 54 Jumping to EOS eeri a a a 54 a E a E E EEE A EN AAE EEE EA EOE A A eee rc eee eee 54 IETS NG a i E EE EEA T E E AEE AA E E AEA T 54 w e T GO aa N N NN 54 A Launch Trade Simie EE 54 U Delete Curent Trade Pata Was visessssheciiasicas svaseaatasssuontesanctedusasabpinasddetstguastenanscedssaiaevieasdanntessvantiiasansani aniaantede 54 MPA FES GW PE M E E PAE A T EEA E AE EEE AEA 54 m E a E N apes A ES IES AEA ccc ce ees A N AA ENEI I EEEE 54 Ee GUS Dae 54 SPnal Chart Tool Wind OW sissors innana iraa iaaa ENa 54 Pool Pa EO O e E E 56 T E DI E E E E E TE E JJ A Tab 2 Trade Data Ay i eit we eee a dee car cers ARE REE EE AAE EEEN EAE EAA 58 i Tab 3 RecotdIrades Parametets Widow iccrmiiiurnaonasiioieii oiiin iiaia aR AAEE EENAA EA 58 Entry and Exit Price Restrictions seisesssssssasncccosucscacasenusavocesseiseconsscessesseatsssnedtornessssissacsisaessness 60 Generating trade data for a Single security sssssssecccocssssseeecoosssssceccooosssseccecocosssssseecessssoo 62 Closing and Recording Open Trades ssssssssssssscecccccccocossssssssceececcecoososssssssseceeeececosossssssssssssseeee 64 Viewine the ra
413. rticular trading system which reduces analysis to one trading methodology and may not reveal an optimum trading strategy for the securities of interest In other words you could only evaluate the trading system for which you have trade data You could of course paper trade a system but the disadvantage of this is that you would have to wait a long time to generate the trading information For example to paper trade a system over three years would require you to spend three years of your time executing fictitious trades in order to evaluate your trading system Even then this may be an entirely pointless exercise because it doesn t take into account all of the other hidden costs such as slippage which can make or break a trading system A far easier and quicker method would be to let a computer charting package generate the trade data based on your trading criteria Using MetaStock to generate trading data is very difficult if not impossible to do as it stands Traditionally a set of indicators or an expert would be overlayed on a chart and the resulting chart would be visually inspected for all of the entry and exit triggers The dates and prices would be documented or added to a spreadsheet for further analysis A most tedious and time consuming task for one security let alone a portfolio of securities Finally after struggling to generate a database of trading data we are presented with the problem of how to analyse this data in a way that accurately repr
414. rvivorship Bias Filter SBF Table that is easy to create This table is essentially a text file which contains a list of constituent symbols and there corresponding date ranges for when they were included in the index Multiple date ranges are permitted which allows for the circumstance when a constituent came into and out of the index Please refer to document AN 5 for complete details on how to implement Survivorship Bias Free backtesting An Alternative Solution After numerous emails bringing this aspect to my attention I have tackled this issue from a different point of view Rather than concentrate on a static list which by its very nature introduces bias in to the simulation why not introduce your own additional rules into the trading system which dynamically measures the performance of a security and only includes a trade in the trade database which exceeds a Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 272 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 certain performance measure In this way the portfolio selection now becomes integral with the trading system and survivorship bias no longer becomes an issue because only trades that meet a certain performance criterion are included in the trade database for analysis by TradeSim For example the trading system used in the RecordTrades function could be modified as follows EntryTrigger Your Entry Crite
415. ry Date a N a e O a Total Trading duration Profit Summary PROFITABLE 50 000 00 4 Trade Parameters Detailed Report Performance Summary Combined Report Now right click again and select Copy Selected to Clipboard S Trade Simulation Report 5 x Trade Simulation Report Trade Statistics Ci Tradesinbata TradeSimbatayEquis Bollinger Bands trhb Simulation Summary Simulation Date 00200 EK aS EO Simulation Time Simulation Duration rade Summary Earliest Entry Date in the Trade Database Latest Entry Date in the Trade Database Earliest Exit Date in the Trade Dat st Exit Date in the Trade Database ct fi H ct ft Trade Entry Date gt Trade Entry Date wt c a Export Trade Parameters w Export Detailed Report Export Performance Summary Export Combined Report irst Entry Date EO g e y h amp Total Trading duration 3733 days Select All Copy selected to clipboard Profit Summary Profit atus PROFITABLE Starting Capital 450 000 00 F 4 H Trade Parameters Detailed Report Performance Summary Combined Report Pasting into Word Before you paste the clipboard contents into Word it is recommended that you set the Page Size to Landscape otherwise the information will be wrapped around and be less legible This is done from the Page Setup menu as follows Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights
416. s The RecordTrades function returns all actual entry and exit triggers To avoid ambiguity with entry and exit triggers that occur at the same time the following encoding scheme is used e 0 No entry or exit trigger e l Actual entry trigger e 2 Actual exit trigger e 3 Both entry and exit trigger on the same day ShowTrades formerly ShowChart ExtFml1 TradeSim ShowTrades Position LONG SHORT SYMBOL When called with the appropriate symbol brings up a window which displays a variety of signals in both graphical tabular and tree form This information is a useful aid for debugging trade database exploration code Note that the symbol of interest must be included with the security list otherwise the chart will not appear This window is part of the external TradeSim plugin and is not part of the main TradeSim application Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 97 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Example The following example displays all of the signals for the long side on a chart for symbol ANZ when a trade database exploration is run ExtFml1 TradeSim ShowTrades LONG ANZ TradeSim DLL Plugin Signal Chart Symbol AN long Trade Database File c tradesimdata test trb ANZ ANZ BANKING GRP LTD Trade Exit Pb as Wi ot tet Meteo li ny 02 Jan 200
417. s Cost P E This column entry indicates the cost of the transaction for both the trade entry and exit records Column Total Trans Cost P E This column entry displays a running total of the transaction costs Column Trade Interest P E This column entry indicates the trade interest if relevant A positive value appended with D means that interest is deducted from the trading account and a negative value appended with C means that interest is credited to the account Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 183 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Column Total Trade Interest P E This column entry displays a running total of all of the trade interest costs A positive value means that there has been a net deduction from the trading account and a negative value means that there has been a net credit to the account Column Capital In Trades This column entry displays the total capital allocated to all trades Column R multiple Reward to Risk ratio P E For risk based position size models this column entry displays the R multiple or Reward to Risk ratio of the trade at entry Column Profit Status This column entry displays the status of the profit at trade exit The three possible values are LOSS BREAKEVEN and GAIN The trade exit records are also color coded depending on the profit status Column Gross Trade Profit
418. s have been added to the closed trade charts and six new charts have been added to the open trade chart We have now included Survivorship Bias Free Backtesting with a Survivorship Bias Filter Utility for the Professional and Enterprise Editions We have introduced full Signal Ranking with Provisional Trades and some support for intraday data You can also now temporarily load extended data post trade database creation This allows you to specify extended data without having to regenerate the trade database again Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 22 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Preface When using any software there is always a learning curve The length of the learning curve is dependent on your will to learn Beginning traders usually always start out being impatient wanting to make huge profits right from the word go Unfortunately for the many impatient they usually end up among the 90 of traders who get washed out in the markets Patience and perseverance will always be rewarded This manual has been written to assist people in using TradeSim to back test or simulate their trading systems in order to validate or improve their trading methodologies This manual is detailed enough to give you enough information to thoroughly evaluate your own trading systems using TradeSim It does not regurgitate existing material from the MetaS
419. s parameter limits the total portfolio risk exposure to a value that is a fraction of the total trading capital at the time the trade is to be taken The Portfolio Heat follows from Ed Seykotas definition of Portfolio Heat which is a measure of the total risk of a portfolio at any given time o Example As an example say you currently have 100 000 tied up in both open positions and cash i e your total trading capital is 100 000 If you allow 2 of your trading capital to be risked on any one trade then 5 trades taken at the same time will incur a total risk of 10 In other words your portfolio heat is 10 If you limit your portfolio heat to a maximum of 6 then only three trades at 2 risk per trade could be taken without exceeding your maximum risk exposure Note Even though the initial stop value may be present in the trade database the portfolio heat will only have relevance when a protective stop is used to exit a trade if the initial stop has been violated To enable protective stops when generating a trade database please refer to the section in the previous chapter Using the Initial Stop as a Protective Money Management Stop for more details on how to do this In summary the Portfolio Limit will limit the number of trades so that the value of all trades combined does not exceed a certain value whereas the position value size limit effectively limits the size of an individual trade 5 The Fixed Dollar Volatility Position Sizin
420. s produced by running 5000 simulations on the trading system with each simulation generating a unique and random selection of trades that met the entry date and position sizing requirements Note how the distribution chart resembles the classic bell shaped normal probability distribution function Thus for the first time we can completely characterize a trading system s performance by exhaustively testing every possible trading combination and then analysing and correlating the resulting data This is something that is impossible to do with standard charting and spreadsheet packages Note that for this example more than half of the trade simulations produced a loss implying that this system has less than a 50 chance of being profitable and is one that would not be recommended for trading An even worse aspect is the fact that we have not included any trade transaction costs which would only serve to reduce bottom line profitability and shift the profit distribution curve to the left With all other things being equal the outcome of a trading system when trading a portfolio of securities depends on the chance selection of securities which is why one trader will obtain different results compared to another trader trading an identical trading system under the same conditions for the same period of time When trading a system using a portfolio of securities the outcome of the trading system can now be considered to be a random event characterised by a d
421. sccccosssssssssceccccccccosssssssesseccecccocoosssosssssesssseeeesesoso 228 Looking for the Holy Gralles rakana E EEEE N Aaa aia 228 Not all Monte Carlo analyzers provide useful results NEW CEE AAA O EAT E AT 229 The Portfolio Optimization Myth PEPP cccccccssssccccccccsscccssssssssssssssscccccssssssssssseecees 229 Advanced Statistical Analysis using TradeSim E eeeeeoossssseeccccosssseeseocosssssecesossssseeeeeoo 231 Setting up a Monte Carlo Simulation eeeoooossssssssseeccccccccosossssssseececcccoceceoccosssssssssseeceececesssssssso 231 Sn O E e E E E 231 Q Number of Simulations scp trac ies ecoaecndawndeuaacienieasseansteseustoonaed steed dbsuses ave cnsdisnleoanssidsotstasbeeceuadeassscloteseasadaneets 231 w Re 1 C E eee ne te OR ee nn EE eee ene E A ert ene ne ee Re ere 231 A Monte Carlo Simulation using TradeSim E 0 cccccccssssssssscccccccesssssscccccssssesssscecs 231 Sinulla on LOE iens E E E 233 Column Description 2iiscenc2cineneactencetida unana Ta none ne aM a 233 Pa BEE E a E E A E E E E pseu E gta E AE E EA E E E 234 A E cara cai esas EEE E TAE O E EOE 234 Q RR 000005 220 e210 2 pee tee eee et eee eee nen eRe ree ee eee eee ener reer 234 G Wine Trades 70 iaire eE nea sen gua Aaaa ae goats ash eas Meo a AE EEEa EE 234 m E O OT E A EOE EO ener EEO A O EOT E 234 E LO T A E A A E E A ee ee ee 234 m Eo e a C7 castes E oa coated acest NE A E EEA E ese 234 aia ea E E 234 E RNP a T A
422. se dialogue box and then select the session file that contains your setup Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 130 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Open trade database Look in TradeSimD ata Je Threshold Stop Setup ses C TradesimData Rand Entry amp Bollinger Bands Exit1 ses Stock Central MA O Crossover ses C Original Indicator example ses olddata Equis Bollinger Bands ses New Folder ATR Volatility S amp P 45 100 585 Exports File name Files of type Load Setup from Session file ses Cancel All files tb trt ses dh Binary Trade Database files trb Text Trade Database files trt Session files Load Setup from Session file ses Using the current session with another trade database file You do not have to re enter the same set of parameters every time you load another trade database file Most of the trade parameters and preferences are not altered when another trade database file is loaded so the original settings will be preserved however the original database that was loaded with the session file will be replaced by the new trade database The Default Session file The first time you load a trade database a built in set of default trade parameters and preferences is used You can change this default set of parameters by creating a default session file If you ha
423. seeeeseecsseceeeeeseeesseseeaeeesseesseeens 264 Q Average Absolute Percentage Drawdown cccccccsccccssscessseceesseecssseccsssecesssecesseecesseccesaeceeaseceesseceesseceeaaecens 264 Q Minimum Absolute Percentage Drawdown ccccccccccsssccesssccesssecssseecsssecesseecesseecesueccesseceesseceesseceesaeceenseeess 264 Re crave cell Dov 2151011 eipewnee ene emer tnt ema a EN 264 Saon ROG eise E E E 264 Q Average Relative Percentage Drawdown cccccccsccccsseceessccesssecesssecesseecesseeceseceesseeeesseceesseceesseceeeeeess 264 L Maximum Relative Percentage Drawdown ccccccccsscccssscecssscccssscceseecesseecesseeeesaecessseceeaseceeaaecesaeecens 264 LI Average Relative Dollar Drawdown ccccscccesscssssccsssceesceessecesecsececessecesseseseecssecsseeesseecesesseeeeesaeeeseeens 264 LJ Maximum Relative Dollar Drawdown cccccccccssecssscescceesseesssecsecsesecesseceseeeeseecueceeeeceseecesesseseeesaeeeseeess 264 LJ Maximum Absolute Dollar Drawdown ccccccscccsseceesseceesscecesseccssscecsseecesseecesseecesseeeesseceesseceesaeceeaeeess 264 LJ Maximum Absolute Percentage Drawdown cccccccccssccesssecesseecsssccesseeccsseceeaeecesseesesseceesseceessecensaeeess 264 DD US Gi aPC ING oes cacy vescecoatcoasite cscs cnc en cute cunsuancuucensevesssvacsiecusnes Gres vagunssenonsavateis castes tensteneestastesvesnetiaees 265 Average Relative Percentage Drawdown Distribution cc
424. served Page 254 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ie a ee mei ee es i fe es ee ee ee tere ike eka mem kal mae F Se I l l l l l I l l l l l l l l l l I l l l l l l l ete kb oe bo bk oe ebb oe be Es Sk rs ss ns Cs Ss hs ted capital ing with limi Trad Case Study A lot of entrants into the trading arena often begin trading with a small amount of capital thinking that they can build up equity in the same proportion as traders using a larger initial capital base However what they don t realise is that there are hidden costs of trading as well as line profitability such as the transaction costs and slippage and if they taxes These are the costs of trading These costs will only reduce your bottom the total become excessive may even wipe out your initial capital base TradeSim allows you to specify Page 255 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 transaction cost of doing a trade from trade entry to exit so we can easily see the effects of trade transaction costs on the trading system performance MACD Crossover Reversed system with limited capital Trade Parameter M System Type ACD Crossover Reversed Portfolio Initial Stop Used Portfolio
425. sessssssssssssseesess 153 Postion AS US a er cet a E EE E E EEE AE EEE E E EES 154 A Minimum Trade SIZE nicessarii aana aaaea a aian aaaeaii 154 IVa aren Posinon Size Li issia a ANATA EA EAE 154 Q Accept Partial Trades if inadequate capital 0 0 ccc ccc ccessecessscecssseecessecesseeeesseecesseecesseceeeseecesseecesseseesaeeess 154 a yonne Rie ek cee ccs AE cat lee ca tobe atc eced te edge cto A OAT 154 m RN Se a tet tered cers E E cant arabes E E E E E 155 Order Type and Spee E sisirin stan 155 Pay Order TPES ere scene anpe eaeatasoetnerdecatlanescuapsawe easctoreste naeceaeanesesteesdanasdaneunnee 155 A Entry Order At 3 21 GP a ee 156 G Enry Ordr Ar C Cee A E EA ee ee ne ee eee nee NAAS 156 J Enty Order At Stopera VA A NORA AEAN AT EENAA AANEEN 157 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 11 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 a Enty Order At Makeban iA AEE AAS NEE EE TSAA AA E EAA AAAS 157 LY Entry Order At Worst Case cccccsccccsssscssssccssscecssscecssscecssseecssseecsssecesscecesseeceaeeceaecessaecessuecesaeecesaeecesaeecees 158 O TUncondinonally Enter Wi ge asita TAERE E EE SEa T ESTS 158 Q Readjust Position S126 ss cessassacecassdassiagsaiccanedenseavaeeedsGasanvaennigacanna reacties ates IS 158 PEG VN E E E EIA E EIE 158 Q Exit Order At Bc 2101 See Ce an ee ebete Seene EEEE nr En mS EErEE Eeee esenee nenene oon
426. sign a user exit status to each exit trigger thus allowing one to distinguish between different exit triggers when you load the trade database into TradeSim You can assign up to 16 User Exits which will appear in the Trade Database Manager and Trade Log as User Exit nn where nn can be any whole number from 1 to 16 To assign user exits you first enable it by called the function after the initialize function ExtFml TradeSim EnableUserExitEncoding You then need to encode your exits For example say your main exit trigger is the combination of three exit triggers 1 e you would write your exit trigger as ExitTrigger ExitTriggerl OR ExitTrigger2 OR ExitTrigger3 To encode these three triggers you would rewrite the above as ExitTrigger If ExitTriggerl1 1 User Exit 1 If ExitTrigger2 2 User Exit 2 If ExitTrigger3 3 0 User Exit 3 Note that all ExitTriggers are assumed to be binary arrays which can contain values of either 0 or 1 Example The following example encodes two exit signals which are a MACD crossover and a trailing stop function EntryTrigger Cross MACD Mov MACD 9 E EntryPrice CLOSE ExitTriggerl1 Cross Mov MACD 9 E MACD ExitTrigger2 ExtFml TradeSim TrailingStop TRIGGER LONG Volatility CLOSE LOW ExitTrigger If ExitTriggerl1 1 User Exit 1 If ExitTTrigger2 2 0 User Exit 2 ExitPrice CLOSE InitialStop 0 No I
427. signifying a reduction in risk and hence cooling off Also plotted in a light grey color on the same chart is the Portfolio Heat Limit Envelope which is the maximum portfolio heat allowable according to the Portfolio Heat Limit parameter Note Even though the initial stop value may be present in the trade database the portfolio heat and trade risk only have relevance when a protective stop is used to exit a trade if the initial stop has been violated To enable protective stops when generating a Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 202 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 trade database please refer to the section in the previous chapter on Using the Initial Stop as a Protective Money Management Stop for more details on how to do this Portfolio Heat cF Maximum Heat The Chart of Portfolio Heat plots the Total Risk Exposure as a fraction of the total trade capital versus the entry exit date trade number When trades are entered the chart is plotted in red signifying an increase in the risk and hence an increase in heat When trades are exited the chart is plotted in blue signifying a reduction in risk and hence cooling off Also plotted in a light grey color on the same chart is the Portfolio Heat Limit Envelope which is the maximum portfolio heat allowable according to the Portfolio Heat Limit parameter
428. sing the Save Session option from the file menu There are three types of files that TradeSim can use These are summarised in the following table File Extension Binary Trade Database Files Session files Universal Text Trade Database Files a i At this stage we will only be concerned with the binary trade database and session files The Universal Text Trade Database files allow database files to be constructed in ascii text form The Professional and Enterprise Editions have the ability to read and import ASCII text file versions of the trade database This means that you are not limited to using MetaStock to generate your trade database files For example you could import a trade database that was generated with another program such as Excel the Notepad text editor or another charting package such as Trade Station for example As this is an advanced feature we have devoted a full chapter to it Those who are interested should refer to Appendix E Example As an example select the MACD Crossover example MACD Crossover trb After selecting and opening a trade database file the trade database file will be loaded and processed and any errors found are reported to the Message Log Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 128 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Prior to version 4 0 0 a database Manager Status dialogue box would app
429. sion of the Software that may no longer contains those errors a reasonable amount of time after the Vendor is given an accurate description of those errors Which amount of time is reasonable will depend on the complexity and severity of the errors The Vendor will mention the release at http www compuvision com au at the Vendor s option directly contact the Licensee to announce the new release The Licensee can then at their option upgrade to the latest version or to continue to use the older version the Licensee already has In the latter case the Licensee will no longer be entitled to technical support until the Licensee has upgraded to the latest version The Vendor reserves the right to charge an upgrade fee in the case of major new enhancements or additions to the Software This major new version will then start a new version line which will use version numbers clearly distinguishable from the old version line The Licensee has no obligation to upgrade to the new version line Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 3 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 You must not attempt to reverse compile modify translate or disassemble the Software in whole or in part You must not run the Software under a debugger or similar tool allowing you to inspect the inner workings of the Software The Software remains the exclusive property of the Vendor An
430. splay Chart For Symbol ar n nnn 42 33001 2 112 Start Entry D ate 0470172000 Now scroll the trade database manager down and select the last trade with an entry date of year 2000 Right click on the trade to select it and then click on the following menu item Set Entry Dates gt Set Stop entry date to this trade entry date ini xi e SE ee Stop Entry Date 14 03 2001 6l trades selected from a total of 6811 trades 0 Long BTE 29712 2000 16 02 2001 0 0 45 0 0000 0 6600 0 720 0 Long GLD 29712 2000 027017200 0 0 4 0 0000 1 7440 1 681 0 Long POP 2971272000 1070172001 0 0 lz 0 0000 1 5000 1 45 0 Long a seneye a 200 O 0o o me OOO adm ene erect Long p00 FA AARC ARRAN BUS EE IPE PPE A TA EAO E A PE R E PPE EE E EAA Check All Entries Be E E T E OTTIENE PAN Uncheck All Entries Gheck Highlighted Entries Uncheck Highlighted Entries Set Entry Dates Set Start entry date to this trade entry date Set Stop entry date to this trade entry date Color Coding b Reset entry dates h Export Trade Database Show extra price information Properties Display Trade on Chart b Display Chart For Symbol Stop Ente Date 29 12 2000 66171 trades selected from a total of 6811 trades at Start Entry D ate 0420172000 Reset Entry Date Mask You can disable the date selection mask Just right click on the trade database manager and select the following menu item
431. splayed If the Signal Chart Window is already open then selecting this option will bring this window to the foreground QO Lock Windows When enabled the Report Log and Signal Chart Windows are locked to the TradeSim Main Form even though individually they can be resized and moved independently Automatically Popup the Report Log When enabled the Report Log window will be shown and brought to the front when a trade database exploration is run in Metastock and messages are being sent to TradeSim to alert the user By turning off this option the Report Log will not automatically popup but the balloon hint will still be displayed from the system tray icon alerting the user of impending messages O Quit TradeSim Quits the TradeSim application Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 50 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Host Control Options You can control the way that TradeSim interacts with the Host program The Host application is one that directly uses the tradesim dll plugin which includes ether Metastock or BullCharts All of the host controls are accessible from the global preferences 10 x Global Parameters Update Manager Security Information Host Application Settings M Automatically start and minimize TradeSim when Host Application starts I Check for Host application running before exiting M Automatically popup the R
432. sseceesseceeseceesseeess 146 EY Meaxctiriiid Open POSITIONS sricu oeei iara a EA Raae a a apasa daeet dae taddatta 146 Q Margin Requirement Stocks Only sscsssczdcsssarevavencavsienseonssoassausaetadisenessdeadeaas sdnasacedeaaecseudaedsosieueeesesdeswrselecaes 146 Q Magnify Risk and Position Size according to Margin Requirement ccccccccssecessseecesseecsssecesseeeesseees 146 CL Use Margin Requirement from Trade Database auncisrmasnsanineaniia i N 146 Q Margin Requirement Interest Long Trades cccccccssccccsseceessecesssecesssecesseeceseecceseeceesseceesseceesseceesaeceesaeeess 146 Q Margin Requirement Interest Short Trades ossssssssnssenssesseessreessresssresserssersssrssnsrssrressressrrsserrsreesses 147 G Specity Daily Interest RAC yreacosskieccsdasenssisaviesctscevennscieatoisainncestaubacsinaeessadgaatriaesianesisacentataas LANNEN 147 QO Select Position Size Model from the trade database E SOE ccc cccessesecssssessessseesseseneees 147 1 The Equal Dollars Position Sizing MOdel ccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 147 D Capital os ab 6 gt eee ee rr ene en en eee ree eee ee eee eee 147 2 The Equal Percent Dollar Units Position Sizing Model ccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 148 LJ Fraction of total trading capital per trade iic scccssseieasasesssacsesvsnavenssessacdavsvesevsncnacedeisucnsvessaeneuuseseedsassvacteuesavsene 148 3
433. sssccesssecesseceesseccesseeeesseceesseceesseceesseceeseecesseeeesaeeess 184 LJ Column Max Loss Commodities Only c cccccccssccesssccesseecesscecssseccsseeccsssecesseeceseeeecsaeceessecesseecesseeeesaeeess 184 LY Column Margin Requirement ccccccccssccesssccssseccesscecsseeeesseecesseecessecesssecesseeceaeecesaeecesseceesseeeeaeseesaeeess 184 NC TS INA secs esas recat EE A AA TA ATE E 184 J Column MAE 9 hrca E einen diosa AAA AAA EEN EANA AEEA 184 a Cona EE sees cree E E E cesar cea NE ee set E E AT EEA 184 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 14 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 a ia IV ITE 70 cx sities aceesey cans OA ES A EAO TOE A NES 184 Sorma CS CONN S aces ane ce cscs cece aesecttce eccanen E 185 Vine Tade Lon Pie Fees aga tecab te aiercarcatageb E E EE ER 185 BME appease wesc stn ea catacedec owe aes eos ae asa ere gametes enemies anaes 185 A Display ROW ere Re ee ee ee er er eee eee ere 186 Facepiece E go sss escent ssc NE NOAE me lt a E E PEE E NNA E AE TE 186 J mpto Trade Enty Exil e252 case tct ec acececesneteatesapetecesacetaseetacecesacaecesssceensacetecesasatececastesecscuieasecuecaiacas 186 Select al rades 10 the Trade DAO AS seve corsaractenanicsisantcenersevacdvnndiccvoavacsensuniecaxeoveestanew tes teseniaaece 186 Locate m Trads 7 116 1012 sieren ae ne ne av ne Ot ee CR Oe ec Re ee 186 Miele
434. stall WinHelp on your Vista machine Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 53 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Launch TradeSim A Launch Tradesim If this button has been enabled you can load the current trade database into TradeSim This is a lot easier than having to access the trade database from the trade database directory Jumping to Errors ti Jump to nest error You can jump from one error to another using the Jump to next error button This is useful if the report 1s quite large and the errors may be sparsely located Clear Log ie Clear Log Use to clear the Report Log The Report Log automatically clears when a new trade database exploration 1s run and the trade database file is created File Menu Save Report Log a Open Trade Database in TradeSim Ke Delete Current Trade Database Print Report Fd Clear Log Save Report Log Saves the Report Log as text file O Launch TradeSim See above O Delete Current Trade Database Use this to delete the currently generated trade database so that it can be regenerated from scratch UO Print Report Prints the current report Clear Log See above The Status Bar The status bar at the bottom of the Report Log Tool Window is divided into two sections and is updated dynamically as a trade database exploration is run The left section displays the total numbe
435. stands alone compared to any other offering from any other vendor The Portfolio Optimization Myth Wie Some vendors of charting and trading software offer trading system optimizers Essentially an optimizer steps through a set of trading system values and runs a simulation for each set of values and plots a performance metric in a table or on chart From this it is possible to see which set of trading parameters produce the most optimum results Apart from the issues of curve fitting and unrealistic expectations of trading a real world system there are some potentially hidden traps especially when it comes to trying to optimize a portfolio trading system We often get emails asking whether or not TradeSim offers optimization of a portfolio trading system My response to this is that to do it properly you would have to run a full TradeSim Monte Carlo analysis every time you stepped a trading parameter The reason for this stems from the fact that it is not possible to characterise a portfolio trading system with one simulation and set of results This is because there are many different valid trading possibilities as one trades a trading system from a universe or portfolio of securities For example the two equity charts shown below obtained from consecutive simulations of the same trading system same portfolio hence same trade database show that just by selecting different trades can have a significant impact on the final result Which one do you
436. statistics tell us that we should have produced 3 heads and 3 tails It is not until we toss the coin at least 100 times that the statistical average starts to approximate the theoretical average The number of simulations carried out during a Monte Carlo simulation is a trade off between the duration of the simulation and the accuracy of the analysis By default the Monte Carlo analysis uses 200 simulations This is okay for small trade databases but for larger databases such as the MACD crossover example we really aren t doing the analysis justice by using such a small sample space Also if we use a small number of simulations then there is the possibility of missing out on a simulation that could have produced a relatively large loss or profit The idea of using the Monte Carlo analysis is to exhaustively test the trading system so that we cover all bases There is no empirical formula for determining the number of simulations required to exhaustively test every trade combination since it is almost impossible to calculate the maximum number of combinations or different trading routes for a given trade database and set of trading parameters As a rule of thumb you should make the number of simulations as large as possible The larger the number of simulations the more accurate the results will be and the distribution charts will approach the classic bell shaped normal probability distribution curve It is recommended to first run 500 simul
437. sting charts 10 x Reward Risk ratio Portfolio Heat Portfolio Heat Winning Trades Losing Trades sneneneseensnesesessnseseseseensneas n Equity Equity Monthly Profit Monthly Return Yearly Profit Yearly Return Rel Drawdown Underwater Equity Capital in Trades Date 21 05 1999 Equity 27 845 498 Symbol ERG Trade Log Index 126 Underwater Equity 12 334 Reward Risk 10 673 Wy To unlink an existing chart select the appropriate unlink option from the popup menu To unlink all charts select Remove all Linked Charts Dynamic updating Because the linked charts are directly linked to the underlying charts from a different tab they will update automatically when the underlying chart updates For example if you enable Random Walk in the trade parameters and rerun the simulation not only will the base top chart update but all of the linked charts will update as well Panning and Zooming Panning the base top chart will also pan the linked charts below it so that they are always in correct alignment with each other Zooming the base chart will zoom all charts however the linked charts will only zoom in the horizontal direction but still maintain correct alignment and sync with each other Closed Trade Chart Preferences These are accessed from the tools menu or directly from the preferences chart tool button Copyright 2000 2009 by Compuvision Australia
438. t Bar Stop No Other Valid xit Trigger No Use Closing Price as Stop Threshold Yes No Yes Open gt InitialStop No High gt InitialStop Yes Set Exit Price to Delay All Exits By One Bar Yes ExitTrigger 1 e Trade ExitPrice Close A Yes Disable Closing Stop Delay Yes gt Next Bar Trade ExitPrice Open InitialStop No Delay All Exits By One Bar Trade ExitPrice InitialStop Trade ExitPrice User ExitPrice No gt Yes Yes gt Next Bar gt No Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 94 Final Release Version 6 4 1 EnableProtectiveStop ExtFml TradeSim EnableProtectiveStop INACTIVITY DELAY The EnableProtectiveStop function directs the RecordTrades function to use the initial stop as a protective stop For trades on the long side a protective stop is generated when the low of the days trade is less or equal to the initial stop value and is only monitored after and including INACTIVITY DELAY number of bars from the point of entry into a trade For trades on the short side a protective stop is generated when the high of the days trade is greater or equal to
439. t Condition currently open trades Lime Line No trading activity Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 219 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Currently Open Trades only The Closed trade equity Line You can enable the closed trade equity line by clicking the appropriate option on the chart legend that appears below the date axis The closed trade equity line appears in a light gray color and is very similar to the normal Closed trade equity Chart except that it is plotted for all trading and non trading days The Status Bar The status bar displays the status of the equity at any point on the chart The Chart Toolbar The Chart window contains a toolbar that runs vertically along the left side of the window These tools are used to control how the charts are displayed In addition the left and right mouse button each introduces two other features which allow advanced panning and zooming of any part of the chart First we will describe the basic function of each tool in the Charts toolbar 2 m Zoom in When this button is clicked down the contents of the chart windowpane are zoomed in a horizontal direction by a fixed amount P O Zoom Out When this button is clicked down the contents of the chart windowpane are zoomed out in a horizontal direction by a fixed amount Q Zoom All When this button is clicked down the contents of th
440. t hasn t automatically done it after you have pasted into the work sheet Now automatically readjust the cell widths using the following menu sequence Format Column Auto Fit Selection Dee 4 ay d BET ornu Mr wn i File Edit View Insert Format Tools Data Window Help Acrobat fe Fe cells Ctri i a Al Column d Ey Booki Autorormat ie i Align Left Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Last updated on 26 March 2009 Page 291 Final Release Version 6 4 1 IOl x LS OOOO O O AaS G E l Sas A 2 Detailed Report 4 Trade Database Filename 5 C TradeSimData TradeSimDatatEquis Bollinger Bands trb Simulation Summary 8 Simulation Date 3 Simulation Time 10 Simulation Duration 12 Trade Summary 13 Earliest Entry Date in the Trade Database 14 Latest Entry Date in the Trade Database 5 Earliest Exit Date in the Trade Database 16 Latest Exit Date in the Trade Database 18 Start Trade Entry Date 19 Stop Trade Entry Date 20 First Entry Date 21 Last Entry Date 22 First Exit Date 23 Last Exit Date 25 Total Trading duration 27 Profit Summary 26 Profit Status 29 Starting Capital 30 Finishing Capital 31 Maximum Equity Datel 32 Minimum Equity Date 33 Gross Trade Profit 34 Gross Trade Loss 35 Total Net Profit 36 Average Profit per Trade 37 Pr
441. t this will have on the trader A large string of losses may cause the trader to abandon his trading system in search of another system which may even have a worse drawdown performance la Underwater Equity P E The Underwater Equity curve displays the retracement of equity between equity peaks The negative curve between equity peaks represents the percentage retracement from the previous high A new high value must exceed the previous high in which case the underwater equity curve resets back to zero Wp Capital In Trades Chart P E This chart displays the total capital in trades for all of the current trade positions versus date trade number Note that when Pyramid Profit is disabled the graph should never go above the Initial Capital line A red line segment in the chart indicates a trade entry condition whilst a blue line indicates a trade exit condition Also plotted on the same chart in a light grey color is the Maximum Trade Capital envelope according to the Portfolio Limit parameter This represents the maximum allowable capital in trades and no point on the chart should exceed the envelope Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 200 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Capital in Trades Maximum Capital in Trades Reward Risk Ratio Chart P E For risk based position size models a Reward Risk or R multiple chart wi
442. t trades Note The true profit is never known until a simulation is actually run due to transaction costs and slippage Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 87 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Example The following example sets up the RecordTrades function to automatically exit a trade when the open trade profit exceeds 10 percent ExtFml1 TradeSim SetProfitStop 10 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 88 http www compuvision com au Last updated on 26 March 2009 U Profit Stops on the Long Side The following flowchart illustrates the procedure used when analysing the price information for a breach of the profit stops on the long side Current Bar Final Release Version 6 4 1 EntryTrigger 1 Yes y i No gt Next Bar EP User EntryPrice Next Bar No A No Bar Count gt Inactivity Delay Yes Exit At Stop Yes Y No gt XP User ExitPrice XP High Profit XP EP EP Check for Price Gap upwards rofit gt Threshol Yes Exit At Stop Low gt 1 Threshold EP No ExitTrigger 1 TradeExitPrice User ExitPrice Next Bar
443. tem If you have trouble controlling your emotions then quite simply you should not be trading until you get this aspect of yourself under control This might seem like harsh criticism but is one aspect of trading that usually rears its ugly head somewhere along the way of the inexperienced trader s path to self destruction No software will help you if you cannot get this part of yourself in order Just stick to your trading plan and remember there are no guarantees in this business Making money requires taking risks However risks can always be minimized and profits maximized with good planning Plan the trade and trade the plan TradeSim was developed to meet the needs of system developers who develop trading systems that are statistically sound When I was developing my own trading systems there were no real tools available at the time to provide a quick and comprehensive analysis of my own trading systems In other words I usually developed what I considered to be a profitable trading system did some simple inconclusive tests on it and commenced to trade it without verifying it properly Without proper system development tools what I was really doing was flying blind and making the assumption that the system was sound without any way of quantitatively measuring it There were system development tools available but they were usually expensive and cumbersome to use and didn t integrate with my existing charting package As a result of this I began
444. that would cause the RecordTrades function to report an error back to Metastock this would hault any further Metastock formula language processing until a new security was read in The new reporting system overcomes most of these issues by correctly identifying any errors that may cease the processing of any proceeding formula However unrecoverable file errors will still cause Metastock to stop any further processing The user will be alerted to this via the new Report Log The RecordTrades function 1s not limited to generating trading data for only one trading system at a time You can use it to generate trading data for many systems at the same time For example say that we have four trading systems called System1 System2 System3 and System4 each system having its own set of entry and exit conditions as well as an optional initial stop To generate trade data for all four systems at one time requires us to correctly specify the Trade Recorder Control parameter for each reference to the RecordTrades external function Using a four trading system as an example and leaving out the details for each of the parameters the RecordTrades indicators would be written as follows ExtFml1l TradeSim Initialize Initialize internal variables gt Sr Trading System I _ _ EntryTrigger1 Entry Trigger EntryPricel Entry Price InitialStop1 Initial Stop ExitTrigger1 Exit Trigger m w wN w O
445. the MetaStock Formula Library and Example sccssscssccccccsssssscees 41 Manually installing the TradeSim DLL Plugin ccccscccccccrrssssssssssssssssscsccccccsssssssseeeeeeess 41 Installation for BullCharts Users vicsstecccscesevsitecsevtcvsavoosssosscucanssveonenssveasonccsssyesdecssvenccessaesses 41 REGISterin the SOR W AF C iiss sssicssncesicsses sansenecscacetnseasssesosarvenseavcasniosssvansvaseaseshereiesealesstinncevialvens 42 TER CHV 0111 a Leone Eo eea E E 42 AUS CURRIN Licne SaS sop aa E ET E 43 Uninstalling the SOT GW ALC iis wicsisvere os sinesensaveosteieiieseceaveoiesiovses EEn AEE EAA EA 43 niin S allie Trade Sinisisi aiaa aaraa aana kadadian anaia aiia 43 Removing the LradeSim Pugin esciscssicescesctecesiccciecsetecccesuesiecedhseteancesesssucusedussnnesecedeaeaacsscsissceucessesses 44 Removing the TradeSim Plugin from MetastoCck nnnnnnnnnnnnnnnnnnnnnnnsnsrererrrrrrrrrrrrererrrrrrrrrrrrrrrrrrrreen 44 Removing the TradeSim Plugin from BullCharts 0 0 0 ccccccccscsccccceeeceeeecceeeecceceeeeeeceeeceeeeeeeeeeeees 44 Installing WinHelp for Windows Vista sssssssseeeecccccccosssssesecccececccocosssssssesecececocoooossssssesccesececosoo 44 OVEK STAN arenorna 44 QUICK START TUTORIAL ceristesesisssccecocessccstssssccoststsSsciessicececsssvessssasccauteisscdsdacecieccssuseesiess 45 GENERATING TRADE DATA cssccsciaicesdeskassaciedanesecetavsscsctsnestoatunsasscdavececatunssasetssentestunesanat
446. the Trade Database P E It is possible to export the data from the Trade Database in a variety of formats which include e Hypertext Markup Language html and htm format e Universal Text Trade Database Format trt see The Universal Text Trade Database File Format for more information e Comma Separated Values file long dates csv Note In this instance dates are exported as decimal values 1 e 20 November 2000 is represented by 20001120 You should use this export option if you use the formatted date option below and the day and month are being transposed when importing into Excel e Comma Separated Values file formatted dates csv Note In this instance dates are exported exactly as they appear in the trade database manager You should use the long date format export option above if the day and month fields are being transposed when importing into Excel To access this facility just right click on the Trade Database Manager Window and select the Export file option A file save dialogue box will appear asking you to select the appropriate file and file format Select the appropriate file format from the Save as Type drop down menu and then select a file or use the optional filename given in the File Name field You do not need to specify a file extension as one will be automatically appended Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 142 http Awww compuvision com au Last updated
447. the drop down menu a i 101 x Reward Risk ratio Portfolio Heat Portfolio Heat Winning Trades Losing Trades oreeeeeenssreeeeengeeseseseserereesees Egay Equity Monthly Profit Monthly Return Yearly Profit Yearly Return Rel Drawdown Underwater Equity Capital in Trades E ENS B DATE RIPE w a a Link Equity 2 Chart Link Rel Drawdown Chart Link Underwater Equity Chart Link Reward Risk ratio Chart Link Winning Trades Chart Link Losing Trades Chart Portfolio Heat Portfolio Heat Monthly Profit Monthly Return Winning Trades Yearly Profit Yearly Return Rel Drawdown Losing Trades Underwater Equity Capital in Trades Pete e eee eeeennengeneneaseseseneenen R P S Bl R a lE Bh ale inal Ea Date 17 12 1999 Equity 25 260 546 Symbol AXA Trade Log Index 137 Underwater Equity 15 245 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 205 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Note that a vertical cursor runs from top to bottom of the chart so that you can visually associate points on all charts Also the linked chart values appear at the end of the status bar that automatically update as the cursor is moved along the chart You can link additional charts or you can unlink exi
448. the entry price level when the entry price is within the range of the chart price axis Display Trade Exit Information When this button is clicked down a red horizontal dashed line is displayed at the exit price level when the exit price is within the range of the chart price axis Display Initial Stop Information When this button is clicked down and a valid initial stop value is available a yellow horizontal dashed line is displayed at the initial stop level when the initial stop price is in range of the chart price axis Display Trade Maximum Minimum Information When this button is clicked down two light green colored horizontal dashed lines are displayed at the minimum and maximum price points of the trade only when the respective price points are within the range of the chart price axis Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 216 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 r Display Chart for any Symbol When this button is clicked it allows you to display the whole security chart for any symbol even 1f it is not used in the trade database See next section Displaying any security If the security that you are interested in is not in the Trade Database Manager you can still display it on a bar chart albeit without any additional trading information To do this right click on the trade database manager window and select Display chart f
449. then the protective stop will be active on the day of entry and thus a trade can be stopped out on the day it was entered Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 72 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Example of how a Protective Money Management Stop works on the LONG side triggers are ignored Ifthe protective stop is enabled and the low of the day touches or falls below the Initial Stop level then the trade is automatically exited at the price specified by the ExitPrice parameter Normal Exit when the ExitTrigger is asserted and the trade exits at the price specified by the ExitPrice parameter Enter the trade LONG when the Entry Trigger parameter is asserted at the price specified by the EntryPrice i parameter OE ml Q Example of how a Protective Money Management Stop works on the SHORT side Ifthe protective stop is enabled and the high of the day touches or exceeds the Initial Stop level Enter the trade SHORT when the Entry Trigger parameter Is asserted at the price specified by the EntryPrice a Harameter the ExitPrice parameter i l y ial Stop at EMY p j exited at the price specified by then the trade is automatically Mormal Exit when the ExitTrigger s is asserted and the trade exits at the price specified by the ExitPrice parameter i In the following example we shall force the
450. this chart is not produced Green bars represent years that were profitable whereas red bars represent years that produced losses Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 198 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Yearly Return The Yearly Return chart displays a cumulative profit return on a yearly adjusted basis Taking the yearly profit chart above the yearly return values are calculated as follows for the first four years only Relative Drawdown Chart P E This chart displays the drawdown versus date trade number Drawdowns are retracements in equity from previous equity highs in short losing periods Relative Drawdown is described in more detail by clicking here Ideally we would like to have no drawdown in equity but in reality this is part and parcel of trading There will always be periods where traders experience a string of losses that outweigh any recent gains thus producing a drawdown in equity In the chart below there are various drawdown periods with the Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 199 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 maximum drawdown being about 12 This means that during the course of trading the equity experienced a 12 decline in value The main implication of drawdown is the psychological effect tha
451. thout any temptation on your own part to modify it whilst you are trading it Sounds simple but how many traders have fallen into the same old trap of modifying their system midstream with devastating consequences If you believe that you have a profitable trading system then why change it To answer this question you have to look at the way most people have been conditioned to think If you have problems following your trading plan then the problems could be caused by 1 Lack of confidence in your trading system causing a conflict in your own mind Part of you may try to stay disciplined and follow your trading plan the other part which 1s usually irrational and driven by your emotional state tries to override your mechanical decision making process because you may have some scepticism and subconsciously lack confidence in your trading system Proper back testing will improve confidence in your trading system Once you have established that you have a historically and statistically profitable system and you have back tested it on out of sample data only then will your confidence in your trading system be improved 2 Impatience due to being part of a random process where the result of each trade is statistically insignificant but over a long run a good trading system should be biased towards generating a profitable outcome Since you cannot control or predict what the markets will do a fair percentage of your trades will be losers with controll
452. ties ACLAK ACLA ACU ALA ADA ADE ADBDMA ADBHA ADBHE ADBIMA ADEFA ADER Final Release Version 6 4 1 AFIR AFL AFLD AFM AFMOE AFMOL AFT AFT Al AFT AM APYHA AGA AGADA AGCO AGG AGGDE AGH ARI AGIN AGIR AGL AGLODA AGLODH AGLDG 4GLOMC OH x AGLOSG AGLOSH AGLUSS AGLEME AGLEMG AGLIAA AGLIDA AGLIDH AGLIGL AGLIGF AGLIGH AGLIGJ ADG AGC AGLDSE AGLIGE Displaying Trade Data on a Security Chart E There are two ways to display trade data on a chart From the Trade Database Manager In the Trade Database manager window right click on the respective trade and then select from the popup menu Display Trade on Chart followed by Daily or Weekly Chart a x Trade ID Pos Symbol Ent Date ExitDate Level Bars Days Initial Stop En 22r0371996 10 05 1996 40 0000 mm o Long CML heck 4ll Entries Uncheck All Entries Check Highlighted Entries Uncheck Highlighted Entries Long Long Long Long 0 0000 40 0000 40 0000 0 0000 0 0000 40 0000 40 0000 0 0000 40 0000 40 0000 0 0000 m n 0 0000 Weekly Chart 0 0000 Stop Enty Date 067 O00 Long Long Long Set Entry Dates Color Coding Long Long Long Long Export Trade Database Show extra price information Properties eo oo on oo on on o L Display Trade on Chart es pl t For Symbol Long Disp rE For Symbol Start Entry Date 1371271995 0 0 0 0 0 0 0 0 0
453. tion chart bar as a percentage of the total population size total number of simulations Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 242 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 I r 4 4 I ae ee a amp i L a l l l l Displaying the distribution chart in fractions rather than population size facilitates easier calculation of probabilities For example the probability of the example MACD trading system yielding a profit can be found by simply tallying the bar densities for all of the bars above 0 the calculation for which is shown below Probability of profit P X gt 0 0 155 0 105 0 095 0 055 0 025 0 01 0 005 0 45 45 where X is a Profit random variable Similarly the probability of the example MACD trading system yielding a profit greater than 41 58 can be found by simply tallying up the bar densities for all of the bars above 41 58 which 1s P X gt 41 58 0 055 0 025 0 01 0 005 0 095 95 where X is a Profit random variable Bars in Distribution chart 20 bars l JU bars 40 bars BO bars This submenu item controls the number of bars in the distribution chart display If you have a relatively low number of simulations then you will need to use a small number of bars in the distribution chart display otherwise the distribution chart display will look quite distorted Alte
454. tions For instance taking the previous example of the total number of profitable simulations Total number of profitable simulations from the Frequency Distribution 314 21419 114 5 2 1 90 Total number of profitable simulations from the Cumulative Distribution DCD 97 02 DCD 0 where DCD x is the discrete cumulative distribution function 200 110 90 As you can see from the above calculations only one subtraction was required to calculate the total number of profitable trades using the discrete cumulative distribution as opposed to six additions using the frequency distribution Like the frequency distribution the cumulative distribution can also be displayed with different frequency scales For example the above cumulative distribution displayed using relative frequency scale would look like the following Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 244 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Using this chart we can easily calculate the probability of a profit Probability of a profit P X gt 0 1 0 55 0 45 45 Increasing the number of trade simulations As with any random process increasing the number of samples will improve the accuracy of the statistical analysis Tossing a coin which has equal probability for both outcomes six times may produce 5 heads in a row and only one tail This is contrary to the fact that
455. to be taken The Portfolio Heat follows from Ed Seykotas definition of Portfolio Heat which is a measure of the total risk of a portfolio at any given time o Example As an example say you currently have 100 000 tied up in both open positions and cash i e your total trading capital is 100 000 If you allow 2 000 of your trading capital to be risked on any one trade then 5 trades taken at the same time will incur a total risk of 10 000 or 10 of total trading capital In other words your portfolio heat is 10 If you limit your portfolio heat to a maximum of Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 148 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 6 6 000 then only three trades at 2 000 risk per trade could be taken without exceeding your maximum risk exposure 4 The Fixed Percent Risk Position Sizing Model In this model we risk a percentage of our total trading capital on each trade This should not be confused with the actual position size which is derived from the amount of capital risked on each trade This model requires an Initial Stop parameter to be included along with each trade in the trade database data that was generated with the MetaStock plug in If valid Initial Stop data is not detected in the trade data then this model will be disabled from the radio group Important The initial risk 1s only really valid if a protective sto
456. tock user manual or other references but augments the information in a way to make the learning process as simple as possible If the reader is unsure of a topic a reference is usually given so that the reader can explore the topic further A list of references can be found at the back of this manual As a prerequisite to understanding the information contained in this manual we suggest that the reader should be familiar with the operation of MetaStock and concepts such as indicators and explorations It is not necessary to have a Ph D in building indicators you can draw upon the many examples used in the MetaStock software and manual in order to build your own trading system however it is necessary to have some basic experience in writing indicators in order to construct trade database explorations There are a lot of traders forums and websites where you can get examples of trading systems A list of relevant websites is given in the reference section at the back of this manual The success of a trading system is not proportional to how complex you can make an indicator and traders who think this is the case would probably be quite surprised about the simulated trading results of such systems Sometimes a simple trading system can be more successful than a complex one just by the mere fact that suitable position sizing and hence money management strategies are employed You might ask why TradeSim is primarily aimed at people who own MetaStock and n
457. tor When this button is clicked down it enables the Open Trade Inspector The Open Trade Inspector shows all currently open trades at the chart focus point A blue rectangular border surrounding the trade indicates an actual trade entry condition at the chart focus point whilst a red rectangular border surrounding the trade indicates an actual trade exit condition at the chart focus point 10 x Open Trade Equity Chart for all trades zanio St So SSce Soe See o kee aoe See eke ee be E EN TE E ee eral Se gi O E A Nace ee le Rl le AE etc i i eed eh 18 000 a The Open Trade Inspector shows all currently r Meee open trades at the chart focus point Fe eS eS SE ee ee ful 3 ee Pe ee O ee Oe Dee fee ve ci t m Open Trade Inspector TIE A a ae symbol Status Tos Tianstie Lew i nae i e e E H 52 000 Ss ae 46 000 A 54 000 1554 0 Long svOrre001 42 000 1562 1004 0 WFT Exit Long 1408 2001 0 21 43 2000 3 3 1565 1007 0 FGL Exit Long 16 08 2001 0 16 45 2360 45 2 F so oon as 1563 395 0 TLS Exit Long 2008 2001 0 42 z 44 8500 4 5 1571 1008 0 SGE Exit Long at0e 2001 0 21 413 9500 413 3 f as oon 1531 1005 0 CML Exit Long 2808 2001 0 a2 47 3300 7 3 Ei Date 31 07 2001 Open Trade Equity 20 689 965 Closed Trade Equity 21 022 32 Delta 132 34 0 19 Trade Stal More Open Trade Charts Version 6 introduces 8 new open trade charts These are Bar by Bar D
458. tp Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 O Simulation This column represents the actual simulation index That is it is a numerical representation of the ordering of the simulations O Total Trades This column represents the total number of trades executed during a simulation O Winning Trades This column represents the number of winning trades during a simulation O Winning Trades This column represents the percentage of winning trades during a simulation O Variance This column represents the winning trades variance Losing Trades This column represents the number of losing trades during a simulation O Losing Trades This column represents the percentage of losing trades during a simulation O Variance This column represents the losing trades variance Q Net Profit This column represents the total net profit at the end of a simulation QO Profit Same as the above but expressed as a percentage of the initial capital O Int Rate This column represents the equivalent annualized yearly compound interest rate based on the Net Profit and the Total Trade Duration for each simulation It is calculated based on 365 days in each year O Largest Win This column represents the largest winning trade O Largest Loss This column represents the largest losing trade UO Expectation This column represents the normalized trade expectation and is expressed in the number of dollars returne
459. trades For example to only include trades with an entry date that fell in the year 2000 you can do one of the following Method A Select the entry dates from the drop down calendars Select the start entry date from the Start Entry Date calendar Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 138 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 10 x SIKH Es trade Database Manager lolx gt Trads ID Pos Symbol Enty Date ExitDate Level Bars Days l Bent aes iat f E mg ea gt mf mj fe z H pS E H K X i r Ke Pek M Mas E Mon Tue Wed Thu Fri Sat Sun Ban 2 4 5 6 7 g 9 11 12 13 14 15 16 18 19 20 3 22 233 2 26 26 29 30 23 06 2004 Select the stop entry date from the Stop Entry Date calendar loxi Trade a iD Pos Symbo EntyDae EstDate Level Bas Days zr a Tag Ero eae en eee Saran ES Sal z EDN AR SS Start Ent Date 0170172000 Stop Entry Date 3171272000 a December 2000 Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 5 9 10 11 12 13 14 15 16 17 18 15 20 2 22 23 M 25 26 27 28 29 30 lt 23 06 2004 Note All excluded trades are now greyed out and even though they are still checked they will not be included in any simulations Copyright 2000 2009 by Compuvision Australia
460. tralia Pty Ltd All Rights Reserved Page 287 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Appendix F Exporting the Reports into Microsoft Word and Excel The new report format in Version 6 of TradeSim makes it easy to export the results into numerous formats as well as copy and paste into a variety of applications whilst maintaining the original appearance of the reports The reports can either be printed copied and pasted into another application or simply exported in a variety of different formats including RTF rich text format HTML hypertext markup language TX T standard text format When exporting as a HTML format all of the original text formatting formats displayed in the reports 1s preserved and charts are exported as individual JPEG images The HTML files can then be downloaded to a server for others to view on the net NOTE Export capability is only available with the Professional and Enterprise Editions However Copy and Paste is available in all editions including Standard Edition By default all files are saved to the Export directory which is inside the TradeSim Data directory 1 e c tradesimdata exports Copying into the Clipboard After running a simulation right click on the required report and click Select All If you only need to copy a partial amount of the report left click and drag the mouse to select the desired portion of the report
461. tribution Charts Monte Carlo Report Monte Carlo Report Equis Bollinger Bands Simulation Summary Simulation Date 9 09 2002 Simulation Time 5 00 04 PM Simulation Duration 3 86 seconds Trade Parameters Initial Capital 50 000 00 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 261 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Portfolio Limit Position Size Model Trade Size value Pyramid profits Transaction cost Trade Entry Transaction cost Trade Exit Trade Preferences Trading Instrument Break Even Trades Trade Position Type Entry Order Type Exit Order Type Minimum Trade Size Accept Partial Trades Volume Filter Simulation Stats Number of trade simulations Trades processed per simulation Maximum Number of Trades Executed Average Number of Trades Executed Minimum Number of Trades Executed Standard Deviation Profit Stats Maximum Profit Average Profit Minimum Profit Standard Deviation Probability of Profit Probability of Loss Winning Trade Stats 100 00 0 0 Equal Dollar Units 5 000 00 No 00 00 Stocks 500 1 3 86 728 99 173 4 51 962 21 103 9 19 888 14 39 7 10 981 34 21 9 100 0 72 Process separately Process all trades Default Order Default Order 00 No Ignore Volume Information 000 720 97 86 76 49 6 2 8 63
462. trigger to occur at any arbitrary date Example The following example sets an entry trigger to occur on 1 February 2002 EntryTrigger ExtFml TradeSim SetTriggerAtDate 1 2 2002 The same thing could be coded using the MS formula language as follows EntryTrigger DayOfMonth 1 AND Month 2 AND Year 2002 To create multiple entry triggers at specific dates say for example at 22 Feb 2000 14 Mar 2000 13 Jun 2002 EntryTrigger ExtFm1l TradeSim SetTriggerAtDate 22 2 2000 OR ExtFm1 TradeSim SetTriggerAtDate 14 3 2000 OR ExtFm1 TradeSim SetTriggerAtDate 13 6 2002 Or using the MS formula language Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 101 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 EntryTrigger DayOfMonth 22 AND Month 2 AND Year 2000 OR DayOfMonth 14 AND Month 3 AND Year 2000 OR DayOfMonth 13 AND Month 6 AND Year 2002 EnableUserExitEncoding ExtFml TradeSim EnableUserExitEncoding Normally the ExitTrigger is flagged as a Normal Exit status so that even though your exit may be the combination of a number of exits it is not possible to distinguish between the exits as they all appear as Normal Exit in the Exit Status column ExitTrigger ExitTriggerl OR ExitTrigger2 OR ExitTrigger3 OR By using exit encoding it is now possible to as
463. ts trading capital per trade 0 100 trade 0 100 0 100 4 Fixed Percent Risk pee ie Position Value Limit Portfolio Heat Limit 0 2 0 0 100 0 100 0 100 Fixed Volatility Capital Assigned to Position Value Limit Trade 0 100 Fixed Percent Fraction of Capital Position Value Limit Volatility Assigned to Trade 0 100 0 100 UO Example The following example is the complete trade database exploration code for an MACD trading system which assigns the Equal Dollars Position Size model to ANZ trades and Fixed Risk Position Size model to BHP trades All other symbols will default to the position size model as selected in TradeSim EntryTrigger Cross MACD Mov MACD 9 E EntryPrice OPEN ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 110 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 InitialStop OPEN Ref 3 ATR 10 1 ExtFml TradeSim Initialize ExtFml TradeSim InitializeValues ExtFml TradeSim AssignValue PositionSizeModel ANZ 1 Equal Dollars Units PS Model for ANZ trades ExtFml TradeSim AssignValue PSMParml ANZ 5000 5000 Capital per trade for ANZ trades ExtFml TradeSim AssignValue PositionSizeModel BHP 3 Fixed Dollar Risk PS Model for BHP trades ExtFml TradeSim AssignValue P
464. ttle effort Well I m sorry to say that if you have already parted with your hard earned money let that be a lesson of not taking anything at face value Just to set the records straight for any vendor touting fantastic results with their mega buck trading packages I would like to propose the challenge to these vendors by scrutinizing their trading systems using TradeSim That is we would like to put their trading systems through the ringer and see how they would have performed in the past Any takers I doubt it Some Trading Tips and Suggestions We digress in this chapter to talk about some of the common mistakes made by new entrants in the trading arena What I would like to point out is that there is nothing wrong with making mistakes in trading they are usually unavoidable as a trader It is part of the learning process and the value of making mistakes is that you learn from them so that you don t repeat the mistake again Because trading is mostly a psychological endeavour making mistakes is part of the mind conditioning process Unfortunately some things just can t be learned without making the mistake yourself at first hand no matter how much advice is given from books and other people who probably have made these mistakes themselves Some mistakes can have subtle effects but some can be totally disastrous The following list shown below is by no means exhaustive but just some that come to mind and ones that have been learnt from the school
465. tware is for educational purposes and of the nature of a general comment and neither purports nor intends to be specific trading advice The information obtained from using this software should not be considered as an offer or enticement to buy sell or trade and is given without regard to any particular person s investment objectives financial situation and particular needs This software is not designed to replace your Licensed Financial Consultant or your Stockbroker You should seek appropriate advice from your broker or licensed investment advisor before taking any action Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 2 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Copyright and Licensing Agreement TradeSim is Copyright 2000 2009 by Compuvision Australia Pty Ltd IMPORTANT READ CAREFULLY This license statement and limited warranty constitutes a legal agreement License Agreement between you Licensee either as an individual or a single entity and Compuvision Australia Pty Ltd Vendor for the software product TradeSim Software of which Compuvision Australia Pty Ltd is the copyright holder BY INSTALLING COPYING OR OTHERWISE USING THE SOFTWARE YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THE LICENSE AGREEMENT Upon your acceptance of the terms and conditions of the License Agreement Compuvision Australia Pty Ltd grants
466. ty Ltd All Rights Reserved Page 67 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 m TradeSim Coin Toss ox 0 9 0 9 0 8 0 8 0 7 0 7 0 6 0 6 0 5 0 5 04 04 0 3 0 3 0 2 0 2 0 1 0 1 0 0 0 0 Created with MetaStock by Equis 2001 A realistic Random Entry Strategy The Coin Toss random entry strategy has a 1 in 2 chance of a favorable outcome which means that as soon as we exit a trade and follow it with a Coin Toss random entry trigger there will be a 1 in 2 chance of entering on the next bar after the exit trigger This means that our entry trigger will follow our exit trigger within a few bars of the point of exit and thus not really provide the truly random entry trigger that we desire To alleviate this problem we need to make the random entry less dependent on the exit trigger We can do this simply by changing the balance of probability so that instead of a 1 in 2 chance we have a 1 in 10 or even a 1 in 100 probability of a favorable outcome For example a random entry trigger with a 1 in 10 chance of entering on a given bar can be expressed as follows EntryTrigger ExtFml TradeSim Rand lt 0 1 A random entry example The following is an example of using random entry with the MACD crossover system with a 1 in 10 chance of entry on any bar EntryTrigger ExtFm1l TradeSim Rand lt 0 1 EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice
467. u details on the actual trade information at the chart focus point Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 193 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ia Charts a loj x amp Capital in Trades Reward Risk ratio Porttolia Heat Portholia Heat 2 Winning Trades Losing Trades bi The Open Trade Inspector shows all currently DATE open trades at the chart focus point me ra See Open Trade Inspector E 15 x me tee a e sane Pee tase 9 feet l ow T musel Pie see ea Paw n Long iErgreggi Long tar rzggi 4 0250 41 3500 Long atienii 40 0725 0 1450 Long Erieg 40 2593 41 0100 Lana Mien 15074 t annn 2 annn Date 15 10 2001 Equity i 43 597 314 Symbol aM Trade Log Index 197 2 a Export Chart P E You can export the chart graphics and information in a variety of formats Please refer to Appendix G for more information regarding this feature Ln o E Linking Charts E This button brings up a drop down menu if appropriate of available linkable charts More information regarding linking charts can be found in the following section on Linking Charts fe Q Chart Preferences This button brings up the global preferences with the appropriate chart preferences tab selected See Chart Preferences for more information Advanced Chart control using the Left and Right Mouse Buttons
468. umber of Simulations This parameter is a numeric value and represents the number of trade simulations to be performed during a Monte Carlo Analysis During each analysis a random number generator is used to select stocks based on the same entry date As a result no two simulations will produce the same results unless the number of security permutations is small You can either type in a value that is greater than 1 or select a value from the drop down combo box O Reset Ordering When this option is checked the ordering of securities is reset to the same ordering as displayed in the Trade Database Window before a Monte Carlo analysis is run When this option is unchecked then the last ordering used in the last simulation is used A Monte Carlo Simulation using TradeSim E As an example we will use TradeSim Enterprise Edition to build a profile of our earlier example MACD crossover trading system Later we will use these results and make some simple modifications to the system that will make dramatic improvements to the system performance The trading system can be specified using the following indicators EntryTrigger Cross MACD Mov MACD 9 E Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 231 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 EntryPrice CLOSE ExitTrigger Cross Mov MACD 9 E MACD ExitPrice CLOSE Initial Stop Use
469. us security to the left of the average percentage net profit bar This charting information can be toggled on and off and by default is off Average Percentage Net Profit versus Security Displays the average net profit versus security A green bar indicates a positive average percentage net profit whilst a red bar indicates a negative average percentage net profit This charting information is always displayed and cannot be turned off Maximum Percentage Net Profit versus Security Displays a maximum percentage net profit bar versus security to the right of the average percentage net profit bar This charting information can be toggled on and off and by default is off Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 175 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 By default the Security Profit Chart only displays the Average Percentage Net Profit You can also display the minimum and maximum percentage net profit by enabling or disabling the respective series on the chart legend Net Profit versus Security Net Profit 4 Chart Legend The chart legend displays the color coding used on the charts and also allows additional charting information to be toggled on or off Clicking on the relevant checkbox within the legend toggles the chart information on and off Note that the Average Percentage Net Profit chart cannot be turned off Chart
470. vanansies 181 ED Column Ty SG AAS ensena AE A AE deiner gia actaiana cise nea aaanee enn 181 G Color minal SON dspace ccna epee E AEA A ao set sete yeaa anette 181 NS TN Be ances E aint EEE EA EEEE aca cesta ade ENEE 181 I Column Actual Pice P E va icecsavsacausieasavnsnensacasyniessessiniasasdw AANA EAEAN EEA tes dnneaenaeeanenereacesysnwosanerewensiv dione 181 A Coumi Sippare P E haz aesaians ty scececsrctaciccsgemacincaseisocen shoaucustig tou a AT EE STA SE E 181 E Columa Esi SUS oreinen Ee AE EE A E aaea iA 181 A Coumi Tade Capital secsi ARN EAN AAA ENEE EARI 182 Gl Colom Imaal Risk P E ear EA EE AE E EEE E EE ER 182 O Columi Initial Risk 0 PE asraon aaka aea aN ikae a aa iia 182 E a o S E E E T A O T E OOE 182 a Colomo Heat Oa PE a a tni es ener etter ner ineae ene rny erent 183 EL RE olum Pos On A eemeneet err eee a A fy mee nN teeter raaa oe eee ee tre or 183 EY Column Position Vale scsi ceascasxacderewescedensecchentnsagdanicnetasennssaiendaxnstnsbnaccanaicvekansenncsdaatevectaentiacecsuacnedenawescetendiecs 183 EN Column PS Status FC Sunsiin aiia AE AAAA E AA EAEN aAA aaas 183 E Coinn TT E ear aa AAAA E A A TAAS 183 Q Column Total Trans Cost PE wo cccccccsccccsseccesseceesseceessecesssecessseccsssecesssecesseecesseceesseeeesseceesseeeesseceesaeeess 183 EE Coumi Trade loert PE ae sossevancnisanereiseeiecassteeeoesionnatnasane rena cvese ea wiasaene acetates eae eee 183 LJ Column Total Trade Interest PE oc
471. ve enabled the Load Default Parameters option in the Global Parameters dialogue box Global Parameters this default set of parameters and preferences will override the built in set any time a trade database is loaded From then on you can alter the parameters and preferences if you wish and even update the default session file to reflect the changes To create a default session file first load a trade database file then adjust all of the trade parameters and preferences to your preferred values and then use the Save as Default Session option from the file menu to create a default session file If the default session file does not exist then one is automatically created However if a default session file exists then you will be asked if you want to overwrite the existing default session file This file is saved as a file with the name default ses in the TradeSim data directory Open Trade Database H Save Session FL Printer Setup Bs Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 131 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 The Trade Database Manager Window Click on the Trade DatabaseManager window to bring it to the foreground and maximize it by clicking on the maximize icon on the top right hand side of this window Start Entry Date 1371271995 Stop Entry Date 067 02003 Trade Database manaoer OOOO Trade SysID Pos Symbo
472. ves into this aspect more deeply and the introduction to this chapter should be read whether or not your software supports this option Using TradeSim The previous chapters outlined strategies to generate trade data using MetaStock This is the data acquisition phase of our whole back testing strategy Without trade data we cannot test our trading system Now that we have valid trade data it is time to test 1t using TradeSim To run TradeSim you can double click on the TradeSim icon from the desktop or access the program via the Program Menu 1 e Select Start gt Programs gt TradeSim gt TradeSim The main screen will look like the following Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 114 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Main Menu Main Toolbar sa TradeSim Enterprise Edition Ioj x I Fie Tools Window Help e Blg ala ET Baek p Phe are atm Cage AEREE W F iF ie A GGO Security map completed The Main Toolbar The main toolbar located below the main menu allows quick access to many of the commonly used functions These functions mirror equivalent functions that are available from the main menu e H Tt Start Simulation NIZE OB B eba 1 ws File Control Q Open Trade Database File This toolbar button is a shortcut for opening a Trade Database file Trade Database files can also be opened using th
473. w messages that maybe sent to the report log Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 51 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Report Log Tool Window The Report Log Window is updated when the RecordTrades function is called from within Metastock and provides feedback pertaining to many types of messages fj TradeSim DLL Plugin Trade Database Report Log for C tradesimdata MTLCFD1 4ATR50 in3 traili4 trb Ioj x File Help Symbol Position Description SSS A Report Created on 27 01 2006 2 50 19 PM Trade Database File C tradesimdata MTLCFD1 4ATR50 in3 traill 4 trb 1 AMP Long Opening trade database file and Writing Trade Database Header for C tradesimdata MTLCFD1 4ATR50 in3 traili 4 trb Trade Database Version 8 ERROR Trade rejected because error found in trade for AMP on 17 Jan 2006 caused by Invalid Exit Price Data CAUSE Exit Price 6 438193 is less than Exit Bar Low Price 880000 HINT To see the rejected trade details call the ShowRejectedTradeDetails function in your exploration code Long ERROR Trade rejected because error found in trade for AMP on 17 Jan 2006 caused by Invalid Exit Price Data CAUSE Exit Price 6 438193 is less than Exit Bar Low Price 7 880000 HINT To see the rejected trade details call the ShowRejectedTradeDetails function in your exploration code ERROR Trade rejecte
474. when calculating the position predefined data array e g CLOSE 3 ATR 10 size for a trade It can be any formula or predefined data array a The Exit Trigger parameter is used to Any formula that gives a binary result e g 7 specify when to exit a trade It can be C lt Ref H 1 any formula which gives a binary result The Exit Price parameter is the price of Any formula or predefined data array such as the underlying security when the Exit CLOSE OPEN HIGH LOW H L 2 etc Trigger is true It can be any formula or Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 47 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 sd predefined data array The Trade Recorder control parameter is START CONTINUE used to control the trade recording process It is always set to START for the first reference to the Trade Recorder function call in an indicator or exploration In subsequent calls to the Trade Recorder function it is set to CONTINUE Problems using the TradeSim Plug In We digress at this point to remind users that it is important to understand the limitations and problems that can arise when using the MetaStock plugin These issues are covered in detail at the end of this chapter in Problems using the TradeSim Plug In and we suggest that you come back to it after you have familiarized yourself with all of the concepts in the remaining sections o
475. when plotting the Closed Trade charts Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 207 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Compressed Time Scale See Compressed Time Scale for more information Linear Time Scale See Linear Time Scale for more information Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 208 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Dynamic Object Cross Referencing P E TradeSim provides dynamic object cross referencing between the Charts the Trade Log and the Trade Database provided that the Trade Log has been enabled throughout the course of a trade simulation This allows trading entities to be easily cross referenced from one data display to another although there are some restrictions to this A typical use for this facility would be for excluding certain trades from a trade simulation once it has been established that these trades should not be included in the simulation For example you may want to exclude a particular trade from appearing in a simulation because it is producing a rather large profit gain on the equity chart and is affecting or masking the trading system s true performance To do this simply line up the chart focus on the chart in question and then double click on the chart which will bring the Trade Log window to the foreg
476. will indicate that the trade was taken at a better price than the target entry price whilst a positive slippage value will indicate that the trade was taken at a worse price than the target entry price o Status Trade Exit The slippage on exit represents the difference between the Target and Actual Exit Prices Irrespective of whether a trade position is long or short a negative slippage value at exit will indicate that the trade was exited at a better price than the target exit price whilst a positive slippage value will indicate that the trade was exited at a worse price than the target exit price QO Column Exit Status The exit status indicates the way a trade was closed and is the same exit status shown for the corresponding trade in the Trade Database o Normal Exit This type of trade exit was caused when a normal Exit Trigger forced a trade exit o Delayed Exit This type of trade exit was caused when the SetExitTriggerDelay external function was used to set an exit delay in the RecordTrades function See the section on the The TradeSim Function Library for more information o Open Trade This type of trade exit was caused when an internal mechanism in the RecordTrades function forced closure of an open trade o Stopped Out This type of trade exit was caused when the EnableProtectiveStop external function was used to force the InitialStop to be used as a protective stop in the RecordTrades function See the section on the The TradeSim Function L
477. wnloaded from the following website location http www compuvision com au DownloadTradeSim htm The TradeSim DLL Plug In contains a number of internal variables which can alter the behaviour of the RecordTrades function These variables can be changed by calling a number of external functions from within the MetaStock environment We have already talked about one of these functions which is used to enable a protective money management stop when using the RecordTrades function When called these functions act like switches to change the internal variables which remain active at their changed state throughout a MetaStock session unless the function is called again with a different set of parameters if any or the Initialization function 1s called in which case all of the TradeSim internal variables will return to their default state which is the state when MetaStock is executed When using the RecordTrades function you should always proceed its use with a call to the initialization function otherwise any internal variables previously set will still remain active at the last state they were altered and may cause the trade database to produce incorrect trade data To Initialize the RecordTrades function to a default state insert the following code prior to the call to the RecordTrades function ExtFml1 TradeSim Initialize The function library can be grouped into following sections Function Category Function __ ___ General Co
478. www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Results of a simulation When a trade simulation has been run successfully the user will be greeted with a number of newly opened windows These new windows are the Trade Simulation Report window Charts window and the optional Trade Log window i TeadeSim Enterprise Edition Equis Bollinger Bands File Tools Window Help S ee 2 C Eee Parameters E Be p Trade Parameters Equis Bollinger Bands Trade Parameters Initial Capital 50 000 00 Portfolio Limit 100 00 Position Size Model Equal Dollar Unites Trade Size value 25 000 00 Pyramid profits Ho Transaction cost Trade Entry 0 00 Transaction cost Trade Exit 0 00 m E rma Trade Parameters Detailed Report Performance Summar Combined Report Trade Simulation complete The Trade Simulation Report window This report is generated when a single trade simulation is completed It is divided up into two sections on a tabbed page The first tabbed page contains the Trade Simulation Report for the last simulation that was run The Trade Simulation Report 1s further divided up into three sections four for the Professional and Enterprise Editions The first page contains a summary report of the trade parameters and preferences used in the simulation These parameters mirror the parameters set up in the Trade Parameters and Trade Preferences window The sec
479. x in MetaStock which is accessed via the Options menu in the Open dialogue box as shown below You can either specify the exact number of periods of data that you want loaded each time you load a chart or you can get MetaStock to prompt you every time you open a chart Note If you have security with missing data then the number of bars loaded and the actual number of bars in the trade may be different It is important to bear this in mind when setting the Load Options in MetaStock Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 65 Final Release Version 6 4 1 Open Io x x g Tools Options Look in Se E t History EAST AFRICAN COFFEE Daily 15 08 1990 2603 2 ELDERS AUSTRALIA Daily eeflef1993 1404 1 YE EASTERN ALUMINIUM Daily 171171994 19 102 EUMUNDI BREWING Daily 03 08 1990 2o6 osye Local Data Load Options Ea 30 07 1993 26 032 18 08 1999 26 032 02701 1996 fe foe ye 16 06 2000 2o6 osye PES Re Cre er Yee ee 07 12 2000 28 03 2 eee a eee i ete ee ene eee ee ae 24 08 1993 28 03 2 1711 1999 2412 7 cot __ OF 02 2000 2ofosye 09 08 1990 26fosye EAST COAST MINERALS Daily 1203 1997 26032 E COM GLOBAL LIMITED Daily 1712 1999 26 032 FCORP LIMITED Dail TAANRATSS4 Pate Open Periodicity File z Cancel rick z Files of type Smart C
480. ximum Percentage Net Profit versus SCCUIILY cccccccccesscecesscecssseeesseeecesseceesseceessecesssecesseecesseecetaeeess 175 65 1 eal Bere 06 eee eee ee ae eee enn es eRe nn ee eae en ee ee ee ee ae ee ee 176 CMMI OO Se E E 176 E 2 Horzonal Zooni Mecs ae EEEE a EEE N E ie 176 Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 13 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 ooo ES A N 9 Toggle 3D Attributes 0nn nnnooonnnnseooeeeesssseeesessererssssssrrensssserersssserrrssssererssssesrentssssreressssereesssseereeensene 176 E Foon Chae P E ianen a a aN a a T 176 Beea S E N 176 Advanced Chart control using the Left and Right Mouse Buttons cccccccccccccccccccceceeeeeeeeeeeeeeeeeeees 177 Q Horizontal Panning using the right mouse button FUNCTION ieee eececssecesteceseeeeseeceseceeeeeeseeeeseseeseeeaeens 177 Q Horizontal Zooming using the left mouse button function ssssssssesssesesssnsssersssrssrersseessnnessreesrresserssersseees 177 Dynan Cross Reet re te PE escena a 177 LJ Cross Referencing from the Security Profit Chart to the Trade Statistics Table cccccceccsseceeseeeeneeeees 77 LJ Cross Referencing from the Trade Statistics Table to the Security Profit Chart 0 cccccccsccccsseeesseeeens 177 Trade Pront DiSti 10 WU OD ssrin E 177 Remuliple Distribution 1P E scssi eiiiai EA EE AAEE ENTE a SEE AAN 178 C
481. y Licensee which fully complies with the terms in this license agreement may use it according to the terms of this license agreement You must not give copies of the Software or your license key to other persons or entities If you have received a download password or an URL with an embedded password for downloading the Software you must keep this password secret You must also take reasonable steps to prevent any third party from copying the software from one of your machines without your permission The Vendor reserves the right to revoke your license without prior notice if you violate any or all of the terms of this license agreement Trademarks MetaStock is a registered trademark of Equis International BullCharts is a registered trademark of BullSystems Microsoft Windows 1s a registered trademark of Microsoft Corporation Microsoft Vista is a registered trademark of Microsoft Corporation Microsoft Excel 1s a registered trademark of Microsoft Corporation Word for Windows is a registered trademark of Microsoft Corporation TradeStation is a registered trademark of Omega Research Corporation Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 4 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Contents MES DAVE BR ate a eects cs ee E sian cu bewevectessesuesseseeces EE E E E 2 COPYRIGHT AND LICENSING AGREEMENT eesssssssseccccccssssscccccccssssesece
482. y at a time Is it possible to draw any conclusions about the trading system without some sort of in depth analysis Just to prove a point we ran another simulation on the same trading system but this time with random walking of trade selection with identical entry dates With this option enabled the simulator randomly selects trades from a group of trades with identical entry dates that meet our trading criteria and enters new trade positions according to the position size model used After running the simulation the Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 27 http www compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 system displayed an overall loss of 32 4 Running another simulation came up with a profit of 2 48 Contrary to what most traders would expect what we are seeing here is an inconsistency in the outcomes giving weight to the fact that one cannot possibly draw a conclusion from only trading a portfolio once To thoroughly evaluate this trading system we ran a Monte Carlo simulation using TradeSim Enterprise Edition and generated the following net profit distribution chart A Monte Carlo analysis is used to repeatedly analyse a system with the aim of exhaustively testing it with every possible combination of trade combinations See the Chapter on Advanced Statistical Techniques for more information A profit frequency distribution chart for this trading system wa
483. y encountered and date of occurrence throughout the Trade Simulation Total Net Profit Finishing Capital Starting Capital specified in dollars and as a percentage Gross Trade Profit This value represents the total gross profit that was made for all of the profitable trades Adding this value to the Gross Trade Loss yields the Total Net Profit value Gross Trade Loss This value represents the total gross loss that was made for all of the losing trades Adding this value to the Gross Trade Profit yields the Total Net Profit value Net Profit per Trade This value represents the average profit made on each of the trades executed in the simulation It is derived by dividing the Total Net Profit value by the number of trades executed in the simulation Trades Taken Profit Factor This value is the ratio of the Gross Trade Profit to the Gross Trade Loss Profit Index This value is the ratio of the Total Net Profit to the Gross Trade Profit and is expressed as a percentage It is a measure of the efficiency of a trading system in generating profits A maximum profit index of 100 indicates a highly efficient trading system with no losing trades A profit index of 0 indicates a trading system that breaks even and produces no net profit or loss A negative profit index indicates an inefficient trading system with a profit index that approaches a negative infinite value indicating the worst case performance Total Transaction Cost This is th
484. yed in yellow color When a Trade Simulation or Monte Carlo analysis is run the following progress bar color coding is used to denote the state of the total capital pool I Purple Bar Bankrupt condition 1 e Total Capital 0 2 Red Bar Loss condition 1 e Total Capital lt Initial Capital 3 Grey Bar Break Even condition 1 e Total Capital Initial Capital 4 Green Bar Profit condition 1 e Total Capital gt Initial Capital F Yellow Bar Monte Carlo analysis in progress The Message Log The Message Log window displays messages that display the current status of the simulation Pause Continue Button This button pauses the simulation When paused this button displays Continue so that clicking this button again will continue the simulation from where it left off Minimize Maximize Button When this button is clicked the TradeSim window will be minimized but the simulation window will still remain open to remind the user that a simulation is still in progress When minimized the button will display Maximize so that when it 1s clicked the TradeSim window will reopen again Note that the Simulation Status window is a modal window so the underlying TradeSim window cannot be brought to the foreground Abort Button When this button is clicked the simulation will abort and TradeSim will be reset to the state before a simulation was run Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 163 http
485. ypes Default Order C Market Order C Worst Case Enty Order Control Exit Order Control Three types of entry order mechanisms are available These are 1 Exit Order At Default 2 Exit Order At Market 3 Exit Order At Worst Case Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved http Awww compuvision com au Last updated on 26 March 2009 Page 158 Final Release Version 6 4 1 Q Exit Order At Default This option exits a trade as determined by the exit price specified in the trade database No slippage is generated using this option See the following diagram or summary table for more details Default Order Trade Exit High XH Target Exit Price as defined by the ExitPrice parameter in the RecordTrades function O Exit Order At Market This option exits the trade at a price that is determined by a random algorithm In this case the exit slippage is defined by the difference between the target exit price and actual exit price The actual exit price is always limited to fall within the high and low range of the day See the following diagram or summary table for more details Market Order Trade Exit High XH Target Exit Price XT as defined by the ExitPrice parameter in the RecordTrades function Valid Actual Exit Price XA Range on the Long or Short Side Low XL Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights R
486. yramid Profits Pyramid Trades Simulation Type 100 according to Margin Requirement Margin Requirement Interest Aate Long Trades Debit o 0000 Short Trades Credit 0 0000 Parameters Equal Dollar Units Capital per Trade 5000 00 Portfolio Simulation amp Portfolio Simulation Ignore Dates Basket test Monte Carlo Analysis Simulation Options Specify Daily Interest Rate f Use Original Ordering Random Walk Select Position Size Model from Trade Database The Trade Parameters window is used to set up the trading methodology and trading parameters as well as to select the type of simulation that is to be carried out There are two tabs in this window the Trade Parameters tab and the Preferences tab Note that some simulation options will be permanently disabled depending on which edition of software you have purchased Setting up a trading methodology first requires one to select a position size model The term position size usually goes hand in hand with money management and before we go on we shall briefly recap this very important topic Copyright 2000 2009 by Compuvision Australia Pty Ltd All Rights Reserved Page 144 http Awww compuvision com au Last updated on 26 March 2009 Final Release Version 6 4 1 Money Management Money management is that part of your system that answers the question how much or how many throughout the course of a t

Download Pdf Manuals

image

Related Search

Related Contents

  取付説明書  取扱説明書 Made in Germany  Ratón y Teclado inalámbrico de IBM: Guía del usuario - ps  1.9MB    Winchester 4RAC36Q17-30 Instructions / Assembly  HP Color LaserJet Pro MFP M476 Getting Started Guide  Intel ASUS X Series P4PE2-X Motherboard REV 1.02 (ASUSP4PE2XUAYZREV102)  Viking Pump Technical Service Manual 340 for Spur Gear Pumps  

Copyright © All rights reserved.
Failed to retrieve file