What is the MetaStock Formula Language?
The MetaStock formula terminology is a exceptional programming vocabulary used to specify and create custom signals, system testing, explorations, and experts. It is patterned after popular spreadsheet languages. In the simplest type, the MetaStock formula vocabulary is comprised of high-level features (e. g., mov(), rsi(), abs() ), mathematical employees (e. g., +, -, /, *), and parameters (open, high, low, close, etc . ). Each of these simple components could be combined to produce your individual indicators together with the Indicator Contractor, backtest your trading suggestions with the Increased System Tester, rank and filter your securities with all the Explorer, and generate chart-specific feedback together with the Expert Advisor. To be able to effectively use the Indicator Constructor, Enhanced System Tester, Manager, or Expert Advisor, you need to be familiar with the MetaStock formula dialect. The MetaStock formula dialect is the base and common link for every of these four tools. The Indicator Contractor will be used through this chapter to teach the MetaStock formula language. For specific tutorials to each of the several formula-based tools, refer to their specific chapters. For information within the Equis Answer Provider software and the MetaStock Developers System, go to http://www.equis.com. Price Array Identifiers:
One of the most basic building blocks of a formula is called a cost array designation. A price mixture identifier " identifies" particular price fields that the formulation should operate on. The valid price mixture identifiers happen to be open, large, low, close, volume, open interest, and indicator. Cost array verifications can be shortened as displayed in the following table. Be aware that these are not case-specific. Very long NameAbbreviation ©
Volume Sixth is v
Open Fascination OI
Instances of the use of price array identifiers in formulas are demonstrated below. You see, the price array identifier element of the formulations are in bold for these examples. mov( close, 10, simple )
if (h > ref(h, -1), mov(h, 20, s), mov(c, 20, s) )
stdev( volume, 20 )
Mathematical workers are the " glue" that binds formulas. Formulas may contain the subsequent mathematical employees. (They may also contain advanced operators including square main, as described later. ) +Addition
-Subtraction (or negative)
The following remedies illustrate the usage of operators (bolded) in a method: ( They would + D ) / 2
mov(c, 10, s)-mov(c, 20, s) / (h + t + c)
close & ((1. 02 * high)-high)
Parentheses were chosen for manyof the preceding formulas in this phase to control the operation precedence (the buy in which the employees are calculated). MetaStock always does operations within the innermost parentheses initial. When parentheses are not used, the precedence is as follows: -Negative beliefs
> Greater than
=Greater than or equal to
Not really equal to
AndLogical " And"
OrLogical " Or"
: =Variable assignment agent: phép tính được gắn cho biến. The expression " H & L as well as 2" (without parenthesis) will be calculated simply by MetaStock because " T / 2" plus " H, " since division has a larger precedence. This may result in a much different value than " (H + L) / installment payments on your " For ease of browsing, we advise that you always work with parenthesis to regulate precedence. Formulation Functions
Besides the four mathematical operators, MetaStock contains over 200 " functions" that perform mathematical operations. Observe Functions for any complete report on all pre-installed functions. The subsequent formula includes a single function that plots the sq . roots of the closing rates. The names of the actual capabilities in the next examples are in...