Home

The Universal Text Trade Database File Format

image

Contents

1. In TradeSim to use the point value and initial margin values from the text trade database you will have to check the boxes as shown below If you assign a zero value in any of these columns then TradeSim will automatically use the default values specified in the trade parameters tab Initial Margin 2500 00 W Use Initial Margin from Trade Database Faint value 25 00 M Use Point Yalue from Trade Database Adding Extra Data to a Binary Trade Database File New functions added to the TradeSim plugin allow you to assign additional information to the trade database file at the time the trade database is created using the Metastock Explorer For more information see the Extended Data Value Functions under The TradeSim Function Library section in the TradeSim User Manual Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved Page 9 http www compuvision com au TB 2 The Universal Text Trade Database File Format Reference Literature This list of references is by no means exhaustive but represents material which is either recommended or for general reading 1 Compuvision Australia TradeSim User Manual 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 Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved Page 10 http www compuvision com au
2. 0 152 4 69 4 45 952 4 65 9 95 10966695 13 BHP L 20011231 20020117 0 10 5 10 72 10 45 10 55 10 71 10 70 056249 14 BHP L 20020125 20020131 0 11 42 11 16 11 59 11 72 11 12 11 41 12759230 15 BHP L 20020205 20020220 0 11 665 11 7 11 61 11 56 11 539 11 76 19210612 16 BHP L 20020313 20020314 0 11 055 11 502 11 64 12 11 5 11 7 13019716 17 BHP L ZO020408 20020417 0 11 74 11 74 11 7 11 69 11 6 11 77 6235688 18 BHP L 20020418 20020422 0 11 66 11 46 11 66 11 735 11 46 11 59 43530304 19 BHP L 20020510 20020526 0 11 25 11 16 11 25 11 36 11 03 11 2 93630626 20 BHP L 20020529 20020530 0 10 9 11 10 87 10 97 10 92 11 04 14197772 2 eae Wlall e Indicator example Trade Databas Draw le G AutoShapes a gt BE A m Saving the Spreadsheet as a Universal Text Trade Database file If you have edited or changed the values in the spreadsheet and want to use the data in a simulation then you need to save the database as a Universal Text Trade Database in order for TradeSim to read it To do this use the File gt Save As command and from the Save As dialogue box select the Text Tab delimited txt filter Select or type in the filename and change the filename extension from txt to trt If the file is not saved with the correct filename extension then TradeSim will not recognize it Prioritizing Trades using the Trade Ranking Column ae In certain circumstances it is necessary to prioritize trades according to a certain
3. Export TradeDatabase Save irr amp E sports de i EE 3 Rand Entry Bollinger Bands Exit Simulation Log c5 H Indicator example Trade Logh CSW Indicator example Trade Database Coy 3 Equis CMO Expert Trade Summary CSW File name Indicator examplelT rade Database Cancel Save as hype Ze Once the file has been saved in the correct format you now run Excel and import the trade database file Run Excel and select the Open file dialogue box from the file menu From the Open dialogue box select Text Files prn tct csy in the Files of type drop down menu Navigate to the Tradesim data export directory ie c tradesimdata exports then select and open the relevant CSV file Z Equis Bollinger Bands Trade Database TST Z Equis Bollinger Bandsi Trade Statistics TAT H Indicator example Trade Database CSY Z Indicator examplel Trade Datab TAT My Documents Indicator examplel Trade Log cSy Z Indicator examplel Trade Log TST Z Indicator examplel Trade Summary TAT Pema Rand Entry Bollinger Bands Exitt Simulation Logh cS Desktop Z Threshold Stop S0 Trade Logi THT File name e on Files of type Text Files prn txt csvy Cancel Once the file has been correctly imported into Excel you can then manipulate or massage the data as you would a normal spreadsheet However when changing any values to make sure that the values are not changed so that t
4. file from a Binary Trade Database file You can generate a text trade database file from an existing database loaded in TradeSim using the Export Trade Database facility available in the Professional and Enterprise Editions of TradeSim 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 Universal Text Trade Database file trt 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 Using Excel to View or Edit a Text Trade Database File You can use Microsoft Excel to view or edit a text trade database file However due to formatting issues it is more convenient to save the trade database as a Comma Separated Variable CSV file so that all of the fields in the trade database file are separated correctly once it has been loaded into your spreadsheet program To do this you need to export your trade database file as a CSV file When exporting a trade database file select the CSV format as shown in the following Export Trade Database dialogue box and save the file Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved Page 6 http www compuvision com au TB 2 The Universal Text Trade Database File Format
5. TB 2 The Universal Text Trade Database File Format Tradesim Advanced Trading Simulator and Back Tester Technical Brief 2 The Universal Text Trade Database File Format v TradeSim Professional Edition v TradeSim Enterprise Edition Last Update 29 March 2007 Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved Page 1 http www compuvision com au TB 2 The Universal Text Trade Database File Format Contents CONTENTS rna E A 2 The Universal Text Trade Database File Format P E GGG cc cccsstssssssseeeee 3 Data Formal Seca a a 3 OIC n E E A E R E E E E A E E A E E E E 3 Ie Oars Pond Torni oaeen E EEN 4 ELO DTO ee E E E E eet eheaneacas coeandaoes 4 The Required Field and Place Holders ccccc cc cccccccccccce cece cece eee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 4 aport TACO OS eoruni E E EAEEREN 4 A Simple Text Trade Database Example eesseecececcccsssssssssseccecccccccossssssssseeececocososssssssssssssseeeeeeceoso 4 An Extended Text Trade Database Example ssssseccccssssseccccosssseccecosssseececosssesecccosssesecesossssseessos 5 Importing a Text Trade Database into TradeSim sssssssscecccccccccsssssssssscccecccccosssssssssessssseceseesoso 5 Creating a Text Trade Database file from a Binary Trade Database file ooooossssssssssssssssssse 6 Using Excel to View or Edit a Text Trade Database File sssssssssssscsccccccccccssssssseee
6. TVESPE O CO O Rm O OOGO RR OGR O ARA G OG O ee OOG O OGO 2G 386000 286000 319000 307000 448402 830000 700000 o 107000 o 071000 o 761000 222000 3471000 o2 LLOOQO 392 J000 249000 648000 177900 155500 637000 445000 500000 9950000 ORF O OGOR OR C km A oO OGO N NANG Go OGO 170000 o 961000 695000 446000 OGIS 800000 580000 288000 4360000 580000 2912000 444000 1336000 3 8000 22000 o 620000 054700 069000 813000 a3 1 3000 9390000 a 780000 OOR OQOOGOR OGR oH U O OGOR OO G G G OO 237 7000 286000 2 J LIOOO 730 7000 448402 o 830000 700000 698000 o 111000 o 161000 222000 o 347000 a 162000 o 329000 249000 o 639000 165000 s 155500 637000 o 436000 500000 950000 Sooro GO G l G T GO l a E S ooo o 366000 286000 3919000 326000 448402 830000 o 100000 o 107000 o 771000 o 161000 2260000 347000 2211000 362000 200000 648000 2177900 1876000 666000 455000 500000 550000 OSQoroeooororror Ss OGO O N IY O O O 2170000 817000 o 695000 437000 831615 800000 500000 288000 381000 5600000 o 512000 444000 336000 378000 2222000 610000 053700 069000 804000 o 1 9000 530000 780000 Importing a Text Trade Database into TradeSim To import a text trade database into TradeSim simply bring up the Open trade database dialogue box by selecting the Open Trade Database menu item fro
7. ace character and the file name must be appended with a trt file extension for TradeSim to accept it efinition Required yae pacs q Values Holder Symbol Yes Character ABC String Trade L long or postin Ye Semon tors fo o to Entry Date YYYYMMDD 19970502 Exit Date YYYYMMDD 199707235 Initial Stop Floating point 17 5900 O 0 Entry Price Floating point 18 0400 Floating point 19 0000 Low Entry l 18 2500 High Entry 3 a Low Exit l Optional Floating point 18 5300 Optional_ Floating point Point Value Optional Floating point Initial Margin Optional Floating point 30000 High Exit l Optional Floating point 19 1600 n os oma iso Tf Initial Stop data is not available then the placeholder should be used Data Formats When generating a text trade database there are certain rules that should be followed regarding data formatting These rules are described in the following sections Comments You can add comments to your text trade database file The first character of a comment should always be a hash character which indicates to TradeSim that the remaining data be ignored when processing If a hash character is not used as the first character then TradeSim will try and interpret the comment data as valid trade data and most likely will generate an error Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved Page 3 http www compuvi
8. criteria For example you may have a group of trades with the same entry date but a certain trade should always have preference over another with the same entry date When a simulation is run in TradeSim the trade with the lowest trade number in the trade database manager is usually taken in preference to a trade with the same entry date and a higher trade number The way that TradeSim sorts the trades when the trade database is first loaded into TradeSim determines which trade is assigned the lowest trade number By default this list 1s sorted by symbol and a trade with symbol ABC will appear before BCD in the trade database manager TradeSim allows you to alter this sorting so that the trade database can be loaded and sorted in such away that the ranking column determines the sorting criteria within a group of trades with the same entry date For example you might use the security PE ratio to determine the trade ranking so that a trade with a higher PE ratio may appear before a trade with a lower PE ratio Alternatively TradeSim allows this ranking to be reversed so that the trade with the highest PE ratio would appear after a trade with a lower PE ratio The trade database sorting options can be accessed from the global preferences dialog box Sort Options C No sorting f Sort by Symbol A first Z last C Sort by Rank Lower rank first C Sort by Rank Higher rank first Copyright 2000 2002 by Compuvision Australia Pty L
9. eeeeees 6 Saving the Spreadsheet as a Universal Text Trade Database file cccceeseeeeseesesssesssessesseseseees 8 Prioritizing Trades using the Trade Ranking Column Using the Point Value and Initial Margin Columns Adding Extra Data to a Binary Trade Database File cccssssssscsccccccccscssscsesssssssssscscecs IRE RE RENCE LTPEIRA PORE a E E 10 Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved Page 2 http www compuvision com au TB 2 The Universal Text Trade Database File Format The Universal Text Trade Database File Format P E lt ossesce gt 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 The Universal text trade database file format must meet certain requirements otherwise the file will be rejected when it is loaded into TradeSim The data within the text file is organized into columns and is separated by at least one space character Some columns are required to have valid data fields whereas the optional columns should be left blank if the correct data cannot be generated The data should be separated by at least one sp
10. felelemeeiect i yelelemieien me ooroo 0 170000 Import Limitations There is no Exit Status column so all trades are assigned a Normal Exit status Because the original chart data is not available it is not possible to calculate the bars in trade however the days in trade is computed from the entry and exit dates as it 1s with the normal native binary trade database files A Simple Text Trade Database Example Shown below is an example of a simple text trade database file with the minimal required columns of data Note that in this example the optional extended price and volume data is not used Comments always begin with the character ave Mi WOO AIS ISSO a OOO IE AAO Ms SSG Jey Ee rs alk SNC GIO INEM INO etc ROCIO Ic ese 00 a7 Ora G PUPPER OS Orla sp 0 272 e100 010 Sel 0 A100 Sb e050 Babes oo TU 2 oe oo S0Ze 6 OO COs OSC Oars 20200 esie Ie LQ ONO LES WO zs 10 OO tis UM le 9 0 O10 Bae oo I TOs lors OIN SO ACO Is AWOUWG hs SOG Boe wie oS nOo eo SUS s UOC Or TS so 0 00m le 00 Byler ao IEC Se a See JES Src O ego le OOOO In Giy S750 Olea alba este 450 16 Bae ec Oe doo Uy Sle Or OlO CO IAT GAG Ome wo 50 PAPE MENS Silk IE Sra IOI S Oe OOOO INS SSS 610 ose 0010 Bitty elie Cnn Ce Coe i OOO Oma 00 U0 maine O00 Bie ogo eZ oo T TOTOO OOR TIT Ss UO ORE AUS 00 esie Why LOY SOL ZA MeN 22 1 OIG 2 Se Cl SG sd ers 10 Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved http www co
11. he trading records are invalidated due to incorrect values Once you have edited the spreadsheet you can save it using the File Save command Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au Page Ed Microsoft Excel Indicator example Trade Database CS ioj xi File Edit wiew Insert Format Tools Data Window Help Acrobat EE JDsE S6RY sBASO TB 2 The Universal Text Trade Database File Format ASZ iy too gaio B Fo g 10 566 E a a Dd a a R 1 BHP L 20000911 20000926 0 3 3030 g 1272 g 3373 4 4119 4 1059 9 24652 10046905 2 BHP L 20001027 20001116 0 0 9964 0 9964 0 9267 a 0497 0 07 of g 0303 7323290 3 BHP L 20001121 20001216 0 g 1717 9 1465 g 1272 g 2095 g 0707 9 1756 5703306 4 BHP L 20010105 20010116 0 4 5563 9 1756 4 4661 9 5726 3 0636 9 1504 7110215 5 BHP L 20010202 20010314 0 g 272 3 926 g 224 g 3254 9 9019 10 0423 15450722 amp BHP L 20010412 20010504 O 10 3251 10 4064 10 2408 1041035 10 2408 10 4761 24993340 7 BHP L 20010518 20010531 0 11 064 10 5945 10 9671 11 1366 10 7977 10 86945 16006534 8 BHF L 20010704 20010720 0 10 561 10 23 10 52 10 96 10 15 10 33 6175571 3 BHP L 20010806 20010613 0 10 04 GH 9 5 1 95 10 06 9 5 9 45 15910657 10 BHFP L 20010827 20010914 0 9 63 9 15 9 49 9 64 9 09 9 2 7111503 11 BHP L 20011003 20011101 0 0 04 0 95 0 0 0 96 0 91 9 06 11971339 12 BHP L 20011114 20011214
12. m the File menu or simply select the Open File icon from the toolbar Once the Open Trade Database dialogue box is open then select Text Trade Database files trt from the Files of type drop down menu This will allow you to view all of the text trade database files in the current directory as is shown in the example below Copyright 2000 2002 by Compuvision Australia Pty Ltd All Rights Reserved http www compuvision com au SOoooreeoqororeoreho owns oo oe 170000 o 9G L000 o 695000 446000 OMIS 800000 600000 200000 436000 580000 1512000 444000 3396000 o3 18000 222000 o 620000 054700 074800 823000 no 13000 o 930000 800000 8000 630000 4000 26666 40588 47506 406330 2000 46666 JIG O86 3300 307000 32000 15000 4000 32500 255584 54346 1396700 108000 10000 S200 Page 5 TB 2 The Universal Text Trade Database File Format Open trade database BE Look in TradesimUata Ez cl AscillradeDatabase TRT Files of type Text Trade Database files tr Cancel ue All tiles trb trt ses Binary Trade Database files trb Text Trade Database files tr session files ses Load Setup fram Session file ses Just click on the relevant file and click on the Open button and the trade database file should be imported If there are any problems importing the trade database then you should check the Message Log window for the error details Creating a Text Trade Database
13. mpuvision com au Page 4 PRE PHE BHE BHE BEE BHP PEP An Extended Text Trade Database Example T9990129 WOE OMe IS Oke AUS LOS ol Za 20000204 ZO COORG TB 2 The Universal Text Trade Database File Format MS NG 2 Me IS DOr Ms slg SS 20000204 ZAO OVO ARG ZA OOREOIES A E A e A E A AO CORIO ie NO MIOZA S 0 0000 OOOO 0 0000 OS HONCHO 0 0000 HONCHO OSOON Tl xs 0 Me 200 18 4500 92 6000 Iie Ao 2106 Ios e S10 9400 Hist AWG IES SOC oO Ils ro S106 Ms SO Lie I a AW JSW0 Shown below is an example of a text trade database file which uses the extended price data and trade volume S68 L 19920210 ETR L 19920803 GDP L 19921105 HFY L 19921203 GRD L 19930114 SBC L 19930407 ION L 19930924 HFY L 19931001 ETR L 19931202 TEL L 19931209 SOH L 19931210 SRT e 19931216 TECHN ROOAG sac KSM L 19940322 SOH L 19940324 BDL L 19940330 HDR L 19940331 PAL I LOSMOADE PAS L 19940502 TMS L 19940510 DOW L 19940511 SHL L 19940511L 19950929 19930927 I 9000 IED SOSA 19960122 19931021 19940311 19960401 19950531 19940322 19940120 19980605 19950830 19950628 19940922 19940803 19960328 19960522 19940811 19951016 deo LOLS 19960131 C eO EO S LSL GO l OO T CO l O O O S O SS oe So 309122 o LGAJLG 193063 1230637 ays ago 12 Pucho ies 2236009 542545 o 6160952 53606606 048620 RS sie 2097350 2060967 1109720 592656 EA ONS o LLGOGI 4660909 999055 440542
14. sion com au TB 2 The Universal Text Trade Database File Format Floating Point Format When TradeSim processes numerical data all floating point numbers are stored internally in 32 bit IEEE format Long Date Format The entry and exit dates are expressed in long date format which means they are written as a single number with no separation characters between the year month and day fields Therefore the date dd mm yyyy or mm dd yyyy would be rewritten as Y YYMMDD where DD day of month 1 31 MM month of year 1 12 and YY Y Y year As an example 26 7 1991 would be written as 19910721 The day and month fields are 1 based which means the lowest value is 1 not 0 The Required Field and Place Holders If the required field is Optional and the field is not required then the place holder value in the above table should be used if the field is not the last field used otherwise the field can be left blank The following examples are used to illustrate how the placeholders are used when certain optional data fields are unavailable Traded Volume used but extended price data unavailable SGS L 19920210 19950929 0 309122 0 386000 0 170000 O O O O Jooo Extended Prices and the Initial Margin field used XPI L 20000530 20000714 2952 802734 3048 899902 3303 000000 EXtKRiyolelejeye 100 3 io op ec ako bdo ewer O 0 0 PARI Only the Extended Price Data fields used SGS L 19920210 19950929 0 309122 0 386000 0 170000 ei wa
15. td All Rights Reserved http www compuvision com au Page 8 TB 2 The Universal Text Trade Database File Format Note The ranking will not have any significance when the Random Walk is enabled or a Monte Carlo simulation is run in which case trades of a given entry date will be randomly ordered irrespective of ranking An example of a single trade with a ranking applied to it is shown in the next line XPI L 20000530 20000714 2952 802734 3048 899902 3303 000000 3031 500000 3049 199951 3295 199951 3307 899902 0 30 2700 Using the Point Value and Initial Margin Columns 3S By default when simulating commodities trading systems the Point Value and Initial Margin values provided in the Trade Parameters tab of TradeSim are applied to each trade in the simulation However in some situations where you are simulating more than one commodity trading system at the one time you may need to use differing point values and initial margins depending on which commodity is being traded TradeSim facilitates this by allowing you to assign a point value and initial margin to each trade in the text trade database files To enable this facility first populate the relevant columns in the text trade database files An example of one line of the trade database with the relevant fields populated is shown by the following example XPI L 20000530 20000714 2952 802734 3048 899902 3303 000000 3031 500000 3049 199951 3295 199951 3307 899902 0O O LEPAL

Download Pdf Manuals

image

Related Search

Related Contents

SEpARAbILE (IEFC-S)  Char-Broil Smoker 10201598 User's Manual  ダウンロード  GL770 - Comtec    Sundance Spas 850 Series User's Manual  MODE D`EMPLOI DU CFM  KBWS Inst. Manual  Turbo air Speeds UP the Pace of Innovation  zBoost YX645 Specifications  

Copyright © All rights reserved.
Failed to retrieve file