STUDY
- reference hand-drawn study
|
Miscellaneous functions
(AFL 1.5) |
| SYNTAX |
study( STUDYID, CHARTID = 1 ) |
| RETURNS |
ARRAY |
| FUNCTION |
generates an array equivalent to a trendline study drawn by the user
- allows detecting trendline breakouts from AFL.
STUDYID is a two-character identifier of the study. identifiers
are: "UP" - uptrend, "DN" - downtrend, "SU"
- support, "RE" - resistance, "ST" - stop loss, however
you can use ANY identifiers (there are no limitations except that AmiBroker
accepts only 2 letter codes).
CHARTID - identifies the chart pane where the study was drawn - you can find out what is the chart ID for given chart by looking in Parameters dialog, Axes & Grid, Miscellaneous: Chart ID
or using GetChartID() AFL function.
More information about this function is included in the
Tutorial: Using Studies in AFL formulas
|
| EXAMPLE |
// this example plots filled area between
// support (SU) and resistance (RE) lines
Plot(C, "Price", colorBlack, styleCandle );
su = Study("SU", GetChartID() );
re = Study("RE", GetChartID() );
PlotOHLC( re, re, su, su, "", colorYellow,styleCloud );
|
| SEE ALSO |
GETCHARTID() function |
References:
The STUDY function is used in the following formulas
in AFL on-line library:
|