| DTN IQFeed Forced Upgrade, Java 1.6.0 TWS, Links for Designing System and Backtesting, Dyo Library and Discussion of #, Getting Started with ESPL |
May 23, 2007
Java 1.6.0 and TWS
16:34 Ensign Howard: Welcome to today's training class. For those who use the IB feed, we have some feedback from users that the Java 1.6.0 version should be avoided because it does not work well with the TWS and affects ability to transmit orders, stops, and causes data latency. So stick with the earlier Java version instead of upgrading Java. We will keep you informed as we learn more.
Forced IQFeed Upgrade
16:38 Ensign Howard: For those using the IQFeed, DTN is using the next 10 days to disable sets of users from logging in on old versions of IQFeed. They intend for all users to be on the 4.2.1.4 version of IQFeed quite immediately because they are switching to the new server feed on June 4th. All must be off of the older IQFeed versions by that date, because older versions will NOT work with the new feed come June 4th. We have posted a message to our IQFeed users that they really do need to get the IQFeed upgrade, and also upgrade Ensign Windows, so they will not be interrupted by the transition to the new IQFeed on June 4th. Our message block that shows on running Ensign Windows will be removed on Friday... so please tolerate it another day as we try to use that means to inform all IQFeed users of the need to upgrade.
16:42 Ensign Howard: Any questions ?
http://www.ensignsoftware.com/download.htm
16:43 Ensign Howard: The minor changes I have made in Ensign over the past 2 weeks are in a Beta version that can be downloaded using the Internet Services form in Ensign Windows..... you have to select the Beta bullet to get that version.
16:44 Ensign Howard: I am doing a short Beta phase with this version just because I have been away for much of last week, and because I have been working on making the program more efficient and have been changing code in several places in the program. So, it will be in Beta status for a week pending any feedback about anything I might have broken because of the multiple changes. So if you were waiting for some change, and I said it was done in my reply e-mail, the version that has the change is the Beta version.
16:47 Ensign Howard: MOW, you were one who had a change implemented to the Trade Detail column selection, so if you want to use that feature now, you do so by getting the Beta version.
16:47 MakesOwnWeather: Thank you Ensign Howard.
16:48 Flag: Thanks so much Howard for adding all the new private GV's...
http://www.ensignsoftware.com/whatsnew.htm
Links to Designing Trading Systems and Backtesting
16:48 Ensign Howard: Judging from the flavor of the e-mail for the past couple of weeks, there has been increased interest in designing trading systems and backtesting. I guess that was to be expected since the last Trading Tips newsletter issue was on the topic of backtesting.
6:50 Ensign Howard: The training classes for 2 and 3 weeks ago were also on backtesting, and are a good resource to review.
www.dacharts.org/archives/Ensign_Wed_class_transcripts/Designing_trad_systems_part2_05-09-07.htm
16:51 Ensign Howard: I do not have anything specific to train on today, so we will open the class now for general Q&A and let your questions direct the flow of the training today. The time is now yours to ask questions.
DYO Library and Discussion of #
17:11 MakesOwnWeather: Ensign Howard, you send me a wonderful link so rich with examples of various DYO commands. Can you discuss / point-out some of the five most practical commands to use for logic control of program and five for arithmetic usage?
17:11 Ensign Howard: MOW is referring to the Library of Examples page
http://www.ensignsoftware.com/help/dyo-cross.htm
17:12 Ensign Howard: This page has more than just a listing of examples, there is also a cross reference for types of DYO statements to examples that contain the statement. Scroll down on the page above to see the cross reference tables.
17:14 Ensign Howard: For example, in the Statements section, the first category is Bar Value and the first selection is Close + #. This is followed by cross references to 3 DYOs, such as Band, Hull Average, and Volatility Bands.
17:15 Ensign Howard: When you click on the Hull Average link you go to a web page example that shows the DYO implementation for the Hull Average
http://www.ensignsoftware.com/tips/tradingtips72.htm
17:15 Ensign Howard: Line F of the example shows Bar Value | Close + # being used in context
17:16 Ensign Howard: Lets go back to the Library cross reference page, and to the Expression category
17:17 Ensign Howard: The 1st selection in the table is Value + # - Next, and the 1st example is Ave True Range.
http://www.ensignsoftware.com/tips/tradingtips63.htm#Average
17:18 Ensign Howard: The Line C and E in the DYO example show expression statements where Value is having a number added or subtracted.
17:18 Ensign Howard: In our notation, Value is the content of the Global Variable referenced by the Read GV, which in the example is GV[1]
17:19 Ensign Howard: The - # or + # means the content of the number field is being subtracted or added to Value
17:19 Ensign Howard: In the example the number field contains a reference to another Global Variable and the GV referenced is [2] or GV[2].
17:20 Ensign Howard: If the Number field had just a number, like 2.0, it would have added 2 to Value, so Result of the line would be Value + 2.0
17:21 Ensign Howard: In the example, the digit 2 in the number filed has brackets around it, which changes the meaning to be a reference to a global variable, and [2] is the 2nd global variable.
17:21 Ensign Howard: So the Value - # with # = [2] means Result = Global Variable [1] - Global Variable [2]
17:22 Ensign Howard: And we see that GV[1] received its value on Line A and GV[2] received its value on Line B
17:23 Ensign Howard: So Line C results in plotting Ave High[3] - Ave True Range[5]
17:23 Ensign Howard: The Ave High[3] is a 3 period average of the bar highs and Ave True Range[5] is a 5 period average of the True Ranges.
17:25 Ensign Howard: Some of the Expression selections refer to Next and this is our notation for the Global Variable that immediately follows the Value reference.
17:25 Ensign Howard: So if Value is set by the Read GV and the Read GV index is a 15, then Next is GV[16]
17:26 Ensign Howard: Some expressions have 3rd in the formula, such as (Value + Next + 3rd*(#-2))/#
17:26 Ensign Howard: 3rd is the notation for the 3rd GV in sequence. So if Value is GV[15], Next is GV[16], and 3rd is GV[17]
17:27 Ensign Howard: The formula expression has just one starting pointer which is the Read GV selection. Lacking additional pointers, we use Next and 3rd to be defaults for adjacent GVs from the Read GV selection. Use Value + # with the GV reference in Number to operate on 2 non-adjacent GV references.
17:29 MakesOwnWeather: When I see a number sign (#) I always think of the value in the number field; but, by what indication will I know we are referring to GVs. When I see more than one, it is GVs. that are being referred to.
17:29 Ensign Howard: The expression will be in the form of Value + # It is YOU that controls the content of the Number field. If your number field entry is just a pure number, than the number is being added.
17:30 Ensign Howard: if the number field has a digit surrounded by square brackets, the brackets tell the program that this is a GV that needs to be looked up and the GV value is used as the number in the expression
17:31 Ensign Howard: So 2.0 is a pure number but [2] is Global Variable [2]'s content that is the number to be used in the expression or [241] is the content of GV [241] that is the number
17:32 MakesOwnWeather: OK, so let me lock that in: Whenever there are multiple # in a formula, I must put the numbers I want to use in GVs and refer to them in brackets within the number field. Is that correct? (in sequential order)
17:33 Ensign Howard: In one of my examples there were 2 # characters in the formula. Let me repost the example
17:33 Ensign Howard: (Value + Next + 3rd * (#-2))/ #
17:34 Ensign Howard: there is ONLY one number field, so in the formula with # in two places, the value in the number field will be used TWICE. Just one number, but used in 2 places. You do NOT try to enter 2 numbers in the number field to have 2 different numbers
17:34 Ensign Howard: [1][2] would not work -- [1] would work
17:35 MakesOwnWeather: OK, NOT EVER [1] [2] for that example.
17:35 Ensign Howard: correct, never try [1][2]
17:36 Ensign Howard: Lets find an easy one to mentally use as example
17:37 Ensign Howard: (Value - # ) / # would be used to show the percent change from # to Value
17:37 Ensign Howard: or 100 * ( Value - # ) / # would show the percent as a percentage
17:38 Ensign Howard: if # is 5 and Value is 6 then we have (6 - 5) / 5 for a 0.20 increase result
17:38 Ensign Howard: The point illustrated is that # is one value used in 2 places in the expression
17:41 Ensign Howard: any more questions?
Getting Started with ESPL
17:42 mikey: I wanted to say that I too have some difficulty working my way through the syntax of the DYO windows and often wished that I could just kind of type in a semiprogrammatic form what it is I wanted done.
17:43 Ensign Howard: Your wish can be fulfilled.... the general typing of the syntax is the ESPL programming language. You can do it there and ESPL even has more flexibility and supports much greater complexity
17:44 Ensign Howard: This is welcomed and used by those with programming experience. For those who do not want to learn the acceptable syntax, they revert to using the DYO selections and find it is also powerful to do lines and markers and other visuals without learning to do the same thing using ESPL
http://www.ensignsoftware.com/espl/espl.htm
17:45 Ensign Howard: Start with the programming lessons and examples shown on this page of the documentation. The link for the ESPL Manual shows you a directory of several hundred statements available, and typically each includes a short example
17:46 Ensign Howard: For example, lets say you wanted to upload a file to the Internet. That can be done in ESPL but not as a DYO.
17:47 Ensign Howard: We also have ESPL documentation in the program on the Help menu.
17:47 Ensign Howard: click Help | ESPL Help - click Internet Functions link on the directory you see
procedure www(WebAddress: string);
procedure FTPupload(HostName, HostDirectory, HostFileName, LocalFileName, UserName, Password: string, Binary: Boolean);
procedure FTPdownload(HostName, HostDirectory, HostFileName, LocalFileName, UserName, Password: string, Binary: Boolean);
procedure HTTP( URL: string, FileName: string);
procedure DownloadData(List: integer, Flag: boolean);
procedure Email(Subject, SenderAddress, FileAttachment, RecipientAddress[,RecipientAddress2…]: string);
Description
WWW: The WWW command is used to open the default web browser at the specified Internet web address. This command might be useful to open your browser to your on-line trading web site, when a trade is triggered.
FTPupload: This command is used to upload a file from the computer to a remote Internet server. This allows you to upload files to an Internet site. The command returns a True value if the upload is successful, otherwise a False value.
FTPdownload: This command is used to download files from a remote Internet server. This allows you to download files from an Internet site. The command returns a True value if the download is successful, otherwise a False value.
HTTP: This command is used to read and save the HTML source code from an Internet web page. An active Internet connection is required if accessing web pages from the Internet. The HTML code from the specified URL page will be saved to the specified FileName. The HTML code can then be loaded, edited, viewed, or used in other programs.
DownloadData: This command is used to Download Charts using the Internet services window. the List parameter should be a value of 1 through 9. This specifies which Chart Symbol List to download. The Internet services window displays 9 lists of symbols that can be downloaded, with various download Time Frames. The Flag parameter should be True or False. Set the value to False to download Daily, Weekly, or Monthly data. Set the value to True to download Intraday data. NOTE: The Internet services window must be open before executing the DownloadData command. Use the btnInternet.click command to open the window beforehand. The chart data will automatically be downloaded and merged into the charts. The following example program opens the Internet Services window and then Downloads Chart Symbol List 1.
17:49 Ensign Howard: This shows sample documentation of various Internet statements and their parameters
17:48 mikey: I think there may be a use for something in between the very PASCAL-like ESPL and the DYO windows. For example, If I could write, "If EMA(40) >EMA(60) and CCI(14)<0, the put up some study alert
17:51 Ensign Howard: That example would be easiest to prototype in the DYO
Incrementing/decrementing Bar Offset
17:53 bl: Hi Howard - A few weeks ago, you showed a way to increment (or decrement) the Bar Offset value of a DYO line from a different line within the same DYO. (to loop back through bars on chart for example) I looked hard but can not find it. Could you point me to an example or briefly explain again? Thanks
17:54 Ensign Howard: On the Library page, go to Global Action category, last selection is the Inc(Line A Bar Offset, # ) and the examples are High Low Counts and Modified MA by Sharp
17:55 bl: Thanks
Rating of DYO Command Usage
17:58 MakesOwnWeather: What are the five DYO control structures which you use most, Ensign Howard?
17:59 Ensign Howard: Bar Value, Study Value, Expression, Function and Global Flag
17:59 Ensign Howard: 2nd set oft used would be Bar Flag, Study Flag, Global Action, DYO Value
18:00 Ensign Howard: least used are Trade Value, Trade Flag, DYO Flag, Do Next IF, Abort IF False, and Go to Line IF and Quote Value and Quote Flag
17:59 MakesOwnWeather: Thanks.
17:57 Ensign Howard: ok, anything else
17:58 Ensign Howard: Thanks for attending class today. e-mail me if you need help or have feedback not covered in the class.
17:58 @Buffy2: Thank you Howard and enjoy the long weekend
17:58 mikey: Thank you.
18:01 Ensign Howard: ok, you all have a good holiday and be safe
18:01 @Buffy2: tks same to you and yours
18:01 MakesOwnWeather: You too Ensign Howard.
18:01 Ensign Howard: bye