Creating a file
To create a Technique file in the Editor, type either Ctrl + N or go to File/New. The following window will come up, and the Technique type should be chosen.
File Components
Each file type (stEA, Indicator, Function) created in the Strategy Language Editor contain the following three base components: • Construct() The Construct() is a function, indicator or stEA is the section of code where new instances of all declared functions. • Initialize() Initialize is the section of code where declared variables are assigned values. • Execute()
Execute is where stEA, indicators, and functions do the calculations associated with the file. In the case of stEA’s, this is the section where orders are created based on given parameters. For indicators, this is where the indicator is plotted on the chart. Compiling a file To compile a file, either click the Compile button on the toolbar, or hit F7. Any syntax errors associated with the code will show up in the errors message at the bottom of the screen. Compiling a file doesn't catch logical errors, so thorough testing is highly recommended. Studies Window The Studies Window, located on the right side of the screen in the Strategy Language Editor, contains the library of available stEA’s, indicators and functions.
Insert Menu
General Overview
Symbol Tab
Settings Tab
stEA
• Insert stEA’s (F8) under the Insert Menu allows the user to insert stEA’s into the current active chart. The window below appears when this menu item is chosen. This window contains a list of all the stEA’s available in the platform, and shows their status. If a stEA
shows to be uncompiled, revisions need to be made to its code. To make the necessary revisions, the stEA will need to be opened and compiled in the Strategy Language Editor. To select a stEA, left click on it and click OK (or hit Enter). To select multiple stEA’s for a chart, hold down the CTRL button and left click on the desired stEA’s, then hit OK (or hit Enter). This will then open up a window for formatting the stEA(s) chosen. Details on formatting a stEA can be found under the Format Menu.
Insert stEA’s
Format stEA
• By choosing stEA, on the Format menu, the Format Objects Window (below) opens with the stEA’s tab selected (Formatting a stEA can also be done by clicking on a drawing on a chart, and right clicking and choosing "Format...Strategy Advisor"). If there isn't a stEA listed, it's because one has not been initiated for the current active chart window. The window below has the following column headings: o Name This is the file name of the stEA. o Input String These are the input values set for the stEA. o Status
This shows if the stEA is activated for the chart.
Strategy Optimization Report
Exhaustive: Exhaustive, also called Brute‐Force, optimization systematically goes through all the potential combinations in search for the best solution. The advantage of this approach is every single combination will be checked and the absolute optimum solution identified. The length of time required for Exhaustive optimization is proportional to the total number of all possible solutions. The drawback of this approach is that, unless relatively few parameters are involved, the period of time required to reach a solution may turn out to be unacceptably long. Thus, exhaustive optimization may only be suitable when there are a limited number of possible solutions. Genetic: Genetic Algorithms optimization evaluates only the more promising combinations, finding near‐optimum solutions in a fraction of time that would be required by the brute‐force approach, making Genetic Algorithms optimization powerful enough to analyze stEA’s with hundreds of parameters. Genetic Optimizer settings add flexibility to this technique.
Walk forward:
How to Add a stEA?
1. Load the desired chart that the user wants to run the strategy on. 2. Double click on Strategy Advisors folder.
3. Double click on the stEA to add it to the chart.
4. A format dialog box will open. From there, choose to format any input by clicking the Format... button. You can also optimize any stEA with inputs by clicking on Optimize... button. The status button turns the stEA on or off.
6. In Figure 2, we applied Trade_Every_Bar strategy to the chart.
7. To trade based on the stEA, click on the AUTO button on the top left of the chart window. When the auto button changes from red to green, the stEA is trading live.
Data feed provides only history data There exists a multitude of End‐of‐Day and intraday historical data vendors. Data from such vendors is used by in‐depth analysis by experienced traders or for filling gaps in data from other vendors. When this data is used on its own, without requiring combination with data from other vendors, we insist on importing data into symbols of real‐time only vendors, such as Universal DDE. This guarantees that the data will not be mixed up with already existing data and will be charted exactly the way it was downloaded. The program saves to the database 1 tick, 1 minute and 1 day resolutions and generates all others from them. When data is imported, existing data in the database will be overwritten by the data from the file if the timestamps are the same.
eSignal
eSignal is one of the leading professional data vendors. The company has been working in the financial information area for decades, constantly improving its services. The program performance and stability is the best with this data vendor.Click here to subscribe to eSignal at a special price.
Universal DDE
DDE (Dynamic Data Exchange) is a widely used protocol for exchanging data between applications in the MS Windows environment.
Please see the developer's website for more detailed information on DDE.
Limitations • Presently the following field types are not supported: Time, Open, High, Low, Close, Total Volume, Change • The program receives ticks only and assigns the current system time to them. Sometimes the tick's real time may differ from the assigned one due to delay • The Status Bar is not displayed on the chart as there aren't enough fields to chart it Setting up To create a DDE Template: 1. On the Tools menu, click Data Sources. 2. Select Universal DDE and click Settings. 3. Indicate a template name in Template (up to 20 symbols long). 4. Indicate the DDE Links in the corresponding sections (the sections include Trade, Bid and Ask. The Price and Volume/Size must be indicated in each section; if Volume/Size cannot be used (e.g for Forex), indicate Price instead. Since for every price the program queries for a volume, this field will never be empty as the program will be waiting for volume data to form a new tick. 5. Before creating DDE links in Universal DDE make sure they are functional in Excel. After that, copy the link to the corresponding field in Universal DDE and replace the static symbol name with the asterisk symbol *. For instance, replace =WINROS|LAST!MSFT with =WINROS|LAST!*. After that the program will automatically use the symbol name for which the given template is used. Do the same for all fields. 6. To make sure that the created template is functional, click Test. Enter the symbol name in Symbol and click OK. If the DDE Server is running, the template is properly created and the queried symbol is accessible, you'll see the current value for each field and the number of updates. If quotes do not arrive, check the template and symbol name. If fixing them does not resolve the problem, please send an e‐mail to [email protected] and indicate the DDE Server, symbol and template names, confirm that an identical template functions in Excel and share any other information you deem important.
To create a symbol using Universal DDE as the Data Source see Adding Symbol(s) to Symbol list section for more detailed information.