AFL Function Reference - Alphabetical list of functions
- #include -
preprocessor include command (AFL 2.2)
- #include_once -
preprocessor include (once) command (AFL 2.70)
- #pragma -
sets AFL pre-processor option (AFL 2.4)
- abs -
absolute value
- AccDist -
accumulation/distribution
- acos -
arccosine function
- AddColumn -
add numeric exploration column (AFL 1.8)
- AddTextColumn -
add text exploration column (AFL 1.8)
- AddToComposite -
add value to composite ticker (AFL 2.0)
- ADLine -
advance/decline line (AFL 1.2)
- AdvIssues -
advancing issues (AFL 1.2)
- AdvVolume -
advancing issues volume (AFL 1.2)
- ADX -
average directional movement index (AFL 1.3)
- AlertIf -
trigger alerts (AFL 2.1)
- AlmostEqual -
rounding error insensitive comparison (AFL 2.80)
- AMA -
adaptive moving average (AFL 1.5)
- AMA2 -
adaptive moving average (AFL 1.5)
- ApplyStop -
apply built-in stop (AFL 1.7)
- Asc -
get ASCII code of character (AFL 2.80)
- asin -
arcsine function
- atan -
arc tan
- atan2 -
calculates arctangent of y/x (AFL 2.90)
- ATR -
average true range (AFL 1.3)
- BarIndex -
get zero-based bar number (AFL 2.3)
- BarsSince -
bars since
- BBandBot -
bottom bollinger band
- BBandTop -
top bollinger band
- BeginValue -
Value of the array at the begin of the range (AFL 2.3)
- CategoryAddSymbol -
adds a symbol to a category (AFL 2.5)
- CategoryFind -
search for category by name (AFL 3.0)
- CategoryGetName -
get the name of a category (AFL 2.5)
- CategoryGetSymbols -
retrieves comma-separated list of symbols belonging to given category (AFL 2.5)
- CategoryRemoveSymbol -
remove a symbol from a category (AFL 2.5)
- CCI -
commodity channel index
- ceil -
ceil value
- Chaikin -
chaikin oscillator
- ClipboardGet -
retrieves current contents of Windows clipboard (AFL 2.60)
- ClipboardSet -
copies the text to the Windows clipboard (AFL 2.6)
- ColorHSB -
specify color using Hue-Saturation-Brightness (AFL 2.80)
- ColorRGB -
specify color using Red-Green-Blue components (AFL 2.80)
- Correlation -
correlation (AFL 1.4)
- cos -
cosine
- cosh -
hyperbolic cosine function (AFL 2.80)
- CreateObject -
create COM object (AFL 1.8)
- CreateStaticObject -
create static COM object (AFL 1.8)
- Cross -
crossover check
- Cum -
cumulative sum
- Date -
date (AFL 1.1)
- DateNum -
date number (AFL 1.4)
- DateTime -
retrieves encoded date time (AFL 2.3)
- DateTimeConvert -
date/time format conversion (AFL 2.90)
- DateTimeToStr -
convert datetime to string (AFL 2.8)
- Day -
day of month (AFL 1.4)
- DayOfWeek -
day of week (AFL 1.4)
- DayOfYear -
get ordinal number of day in a year (AFL 2.4)
- DaysSince1900 -
get number of days since January 1st, 1900 (AFL 3.20)
- DecIssues -
declining issues (AFL 1.2)
- DecVolume -
declining issues volume (AFL 1.2)
- DEMA -
double exponential moving average (AFL 2.0)
- EMA -
exponential moving average
- EnableRotationalTrading -
Turns on rotational-trading mode of the backtester (AFL 2.5)
- EnableScript -
enable scripting engine
- EnableTextOutput -
enables/disables text output in the Chart Commentary window (AFL 2.2)
- EncodeColor -
encodes color for indicator title (AFL 2.2)
- EndValue -
value of the array at the end of the selected range (AFL 2.3)
- Equity -
calculate single-symbol equity line (AFL 2.0)
- EXP -
exponential function
- EXREM -
remove excessive signals (AFL 1.5)
- EXREMSPAN -
remove excessive signals spanning given number of bars (AFL 2.0)
- fclose -
close a file (AFL 2.5)
- fdelete -
deletes a file (AFL 2.70)
- feof -
test for end-of-file (AFL 2.5)
- FFT -
performs Fast Fourier Transform (AFL 2.90)
- fgets -
get a string from a file (AFL 2.5)
- fgetstatus -
retrieves file status/properties (AFL 2.90)
- FLIP -
(AFL 1.5)
- FLOOR -
floor value
- fmkdir -
creates (makes) a directory (AFL 2.70)
- fopen -
open a file (AFL 2.5)
- FOREIGN -
access foreign security data (AFL 1.5)
- fputs -
write a string to a file (AFL 2.5)
- FRAC -
fractional part
- frmdir -
removes a directory (AFL 2.70)
- FullName -
full name of the symbol (AFL 1.1)
- GAPDOWN -
gap down
- GAPUP -
gap up
- GetBacktesterObject -
get the access to backtester object (AFL 2.60)
- GETBASEINDEX -
retrieves symbol of relative strength base index (AFL 2.1)
- GetCategorySymbols -
retrieves comma-separated list of symbols belonging to given category (AFL 2.4)
- GETCHARTID -
get current chart ID (AFL 2.3)
- GetCursorMouseButtons -
get current state of mouse buttons (AFL 2.80)
- GetCursorXPosition -
get current X position of mouse pointer (AFL 2.80)
- GetCursorYPosition -
get current Y position of mouse pointer (AFL 2.80)
- GetDatabaseName -
retrieves folder name of current database (AFL 2.3)
- GETEXTRADATA -
get extra data from external data source (AFL 1.9)
- GetFnData -
get fundamental data (AFL 2.90)
- GetOption -
gets the value of option in automatic analysis settings (AFL 2.60)
- GetPerformanceCounter -
retrieves the current value of the high-resolution performance counter (AFL 2.90)
- GetPlaybackDateTime -
get bar replay position date/time (AFL 3.0)
- GetPriceStyle -
get current price chart style (AFL 2.70)
- GetRTData -
retrieves the real-time data fields (AFL 2.60)
- GetRTDataForeign -
retrieves the real-time data fields (for specified symbol) (AFL 2.80)
- GETSCRIPTOBJECT -
get access to script COM object (AFL 1.8)
- GetTradingInterface -
retrieves OLE automation object to automatic trading interfac (AFL 2.70)
- GfxArc -
draw an arc (AFL 3.0)
- GfxChord -
draw a chord (AFL 3.0)
- GfxCircle -
draw a circle (AFL 3.0)
- GfxDrawText -
draw a text (clipped to rectangle) (AFL 3.0)
- GfxEllipse -
draw an ellipse (AFL 3.0)
- GfxGradientRect -
draw a rectangle with gradient fill (AFL 3.0)
- GfxLineTo -
draw a line to specified point (AFL 3.0)
- GfxMoveTo -
move graphic cursor to new position (AFL 3.0)
- GfxPie -
draw a pie (AFL 3.0)
- GfxPolygon -
draw a polygon (AFL 3.0)
- GfxPolyline -
draw a polyline (AFL 3.0)
- GfxRectangle -
draw a rectangle (AFL 3.0)
- GfxRoundRect -
draw a rectangle with rounded corners (AFL 3.0)
- GfxSelectFont -
create / select graphic font (AFL 3.0)
- GfxSelectPen -
create / select graphic pen (AFL 3.0)
- GfxSelectSolidBrush -
create / select graphic brush (AFL 3.0)
- GfxSetBkColor -
set graphic background color (AFL 3.0)
- GfxSetBkMode -
set graphic background mode (AFL 3.0)
- GfxSetOverlayMode -
set low-level graphic overlay mode (AFL 3.0)
- GfxSetPixel -
set pixel at specified position to specified color (AFL 3.0)
- GfxSetTextAlign -
set text alignment (AFL 3.0)
- GfxSetTextColor -
set graphic text color (AFL 3.0)
- GfxTextOut -
writes text at the specified location (AFL 3.0)
- GROUPID -
get group ID/name (AFL 1.8)
- HHV -
highest high value
- HHVBARS -
bars since highest high
- HIGHEST -
highest value
- HIGHESTBARS -
bars since highest value
- HIGHESTSINCE -
highest value since condition met (AFL 1.4)
- HIGHESTSINCEBARS -
bars since highest value since condition met (AFL 1.4)
- HOLD -
hold the alert signal
- HOUR -
get current bar's hour (AFL 2.0)
- IIF -
immediate IF function
- INDUSTRYID -
get industry ID / name (AFL 1.8)
- INSIDE -
inside day
- INT -
integer part
- INTERVAL -
get bar interval (in seconds) (AFL 2.1)
- InWatchList -
watch list membership test (by ordinal number)
- InWatchListName -
watch list membership test (by name) (AFL 3.0)
- IsContinuous -
checks 'continuous quotations' flag state (AFL 2.60)
- ISEMPTY -
empty value check (AFL 1.5)
- IsFavorite -
check if current symbol belongs to favorites (AFL 2.5)
- ISFINITE -
check if value is not infinite (AFL 2.3)
- IsIndex -
check if current symbol is an index (AFL 2.5)
- ISNAN -
checks for NaN (not a number) (AFL 2.3)
- ISNULL -
check for Null (empty) value (AFL 2.3)
- ISTRUE -
true value (non-empty and non-zero) check (AFL 1.5)
- LASTVALUE -
last value of the array
- LineArray -
generate trend-line array (AFL 2.5)
- LINEARREG -
linear regression end-point (AFL 2.2)
- LINREGINTERCEPT -
(AFL 2.2)
- LINREGSLOPE -
linear regression slope (AFL 1.4)
- LLV -
lowest low value
- LLVBARS -
bars since lowest low
- LOG -
natural logarithm
- LOG10 -
decimal logarithm
- LOWEST -
lowest value
- LOWESTBARS -
bars since lowest
- LOWESTSINCE -
lowest value since condition met (AFL 1.4)
- LOWESTSINCEBARS -
barssince lowest value since condition met (AFL 1.4)
- MA -
simple moving average
- MACD -
moving average convergence/divergence
- MARKETID -
market ID / name (AFL 1.8)
- MAX -
maximum value of two numbers / arrays
- MDI -
minus directional movement indicator (-DI) (AFL 1.3)
- Median -
calculate median (middle element) (AFL 2.5)
- MFI -
money flow index
- MIN -
minimum value of two numbers / arrays
- MINUTE -
get current bar's minute (AFL 2.0)
- MONTH -
month (AFL 1.4)
- mtRandom -
Mersene Twister random number generator (AFL 3.0)
- mtRandomA -
Mersene Twister random number generator (array version) (AFL 3.0)
- NAME -
ticker symbol (AFL 1.1)
- NoteGet -
retrieves the text of the note (AFL 2.6)
- NoteSet -
sets text of the note (AFL 2.6)
- NOW -
gets current system date/time (AFL 2.3)
- NumToStr -
convert number to string (AFL 2.5)
- NVI -
negative volume index
- NZ -
Null (Null/Nan/Infinity) to zero (AFL 2.3)
- OBV -
on balance volume
- OPTIMIZE -
define optimization variable (AFL 1.7)
- OSCP -
price oscillator
- OSCV -
volume oscillator
- OUTSIDE -
outside bar
- PARAM -
add user user-definable numeric parameter (AFL 2.3)
- ParamColor -
add user user-definable color parameter (AFL 2.3)
- ParamDate -
add user user-definable date parameter (AFL 2.60)
- ParamField -
creates price field parameter (AFL 2.70)
- ParamList -
creates the parameter that consist of the list of choices (AFL 2.70)
- PARAMSTR -
add user user-definable string parameter (AFL 2.3)
- ParamStyle -
select styles applied to the plot (AFL 2.70)
- ParamTime -
add user user-definable time parameter (AFL 2.60)
- ParamToggle -
create Yes/No parameter (AFL 2.70)
- ParamTrigger -
creates a trigger (button) in the parameter dialog (AFL 2.70)
- PDI -
plus directional movement indicator (AFL 1.3)
- PEAK -
peak (AFL 1.1)
- PEAKBARS -
bars since peak (AFL 1.1)
- Percentile -
calculate percentile (AFL 2.5)
- PLOT -
plot indicator graph (AFL 1.8)
- PLOTFOREIGN -
plot foreign security data (AFL 2.2)
- PLOTGRID -
Plot horizontal grid line (AFL 2.3)
- PLOTOHLC -
plot custom OHLC chart (AFL 2.2)
- PLOTSHAPES -
plots arrows and other shapes (AFL 2.3)
- PlotText -
write text on the chart (AFL 2.80)
- PLOTVAPOVERLAY -
plot Volume-At-Price overlay chart (AFL 2.4)
- PopupWindow -
display pop-up window (AFL 3.0)
- PREC -
adjust number of decimal points of floating point number
- PREFS -
retrieve preferences settings (AFL 1.4)
- printf -
Print formatted output to the output window. (AFL 2.5)
- PVI -
positive volume index
- RANDOM -
random number (AFL 1.9)
- REF -
reference past/future values of the array
- RELSTRENGTH -
comparative relative strength (AFL 1.3)
- RequestTimedRefresh -
forces periodical refresh of indicator pane (AFL 2.90)
- RestorePriceArrays -
restore price arrays to original symbol (AFL 2.5)
- RMI -
Relative Momentum Index (AFL 2.1)
- ROC -
percentage rate of change
- ROUND -
round number to nearest integer
- RSI -
relative strength index
- RWI -
random walk index
- RWIHI -
random walk index of highs
- RWILO -
random walk index of lows
- SAR -
parabolic stop-and-reverse (AFL 1.3)
- Say -
speaks provided text (AFL 2.90)
- SECOND -
get current bar's second (AFL 2.0)
- SECTORID -
get sector ID / name (AFL 1.8)
- SELECTEDVALUE -
retrieves value of the array at currently selected date/time point (AFL 2.1)
- SetBacktestMode -
Sets working mode of the backtester (AFL 3.0)
- SetBarFillColor -
set bar/candlestick/cloud chart fill color (AFL 3.1)
- SETBARSREQUIRED -
set number of previous and future bars needed for script/DLL to properly execute (AFL 2.1)
- SetChartBkColor -
set background color of a chart (AFL 2.80)
- SetChartBkGradientFill -
enables background gradient color fill in indicators (AFL 2.90)
- SetChartOptions -
set/clear/overwrite defaults for chart pane options (AFL 2.70)
- SetCustomBacktestProc -
define custom backtest procedure formula file (AFL 2.70)
- SetForeign -
replace current price arrays with those of foreign security (AFL 2.5)
- SetFormulaName -
set the name of the formula (AFL 2.5)
- SetOption -
sets options in automatic analysis settings (AFL 2.3)
- SetPositionSize -
set trade size (AFL 2.70)
- SetSortColumns -
sets the columns which will be used for sorting in AA window (AFL 2.90)
- SETTRADEDELAYS -
allows to control trade delays applied by the backtester (AFL 2.1)
- sign -
returns the sign of the number/array (AFL 2.50)
- SIGNAL -
macd signal line
- SIN -
sine function
- sinh -
hyperbolic sine function (AFL 2.80)
- SQRT -
square root
- StaticVarGet -
gets the value of static variable (AFL 2.60)
- StaticVarGetText -
gets the value of static variable as string (AFL 2.60)
- StaticVarRemove -
remove static variable (AFL 2.80)
- StaticVarSet -
sets the value of static variable (AFL 2.60)
- StaticVarSetText -
Sets the value of static string variable. (AFL 2.60)
- STATUS -
get run-time AFL status information (AFL 1.65)
- STDERR -
standard error (AFL 1.4)
- STDEV -
standard deviation (AFL 1.4)
- STOCHD -
stochastic slow %D
- STOCHK -
stochastic slow %K
- StrExtract -
extracts given item (substring) from comma-separated string (AFL 2.4)
- StrFind -
find substring in a string (AFL 2.5)
- StrFormat -
Write formatted output to the string (AFL 2.5)
- StrLeft -
extracts the leftmost part (AFL 2.0)
- StrLen -
string length (AFL 1.5)
- StrMid -
extracts part of the string (AFL 2.0)
- StrReplace -
string replace (AFL 2.90)
- StrRight -
extracts the rightmost part of the string (AFL 2.0)
- StrToDateTime -
convert string to datetime (AFL 2.80)
- StrToLower -
convert to lowercase (AFL 2.80)
- StrToNum -
convert string to number (AFL 2.5)
- StrToUpper -
convert to uppercase (AFL 2.80)
- STUDY -
reference hand-drawn study (AFL 1.5)
- SUM -
sum data over specified number of bars
- tan -
tangent function (AFL 1.0)
- tanh -
hyperbolic tangent function (AFL 2.80)
- TEMA -
triple exponential moving average (AFL 2.0)
- TimeFrameCompress -
compress single array to given time frame (AFL 2.5)
- TimeFrameExpand -
expand time frame compressed array (AFL 2.5)
- TimeFrameGetPrice -
retrieve O, H, L, C, V values from other time frame (AFL 2.5)
- TimeFrameMode -
switch time frame compression mode (AFL 2.80)
- TimeFrameRestore -
restores price arrays to original time frame (AFL 2.5)
- TimeFrameSet -
switch price arrays to a different time frame (AFL 2.5)
- TIMENUM -
get current bar time (AFL 2.0)
- TRIN -
traders (Arms) index (AFL 1.2)
- TRIX -
triple exponential smoothed price
- TROUGH -
trough (AFL 1.1)
- TROUGHBARS -
bars since trough (AFL 1.1)
- TSF -
time series forecast (AFL 2.2)
- ULTIMATE -
ultimate oscillator
- UNCISSUES -
unchanged issues (AFL 1.2)
- UNCVOLUME -
unchaged issues volume (AFL 1.2)
- VALUEWHEN -
get value of the array when condition met (AFL 1.1)
- VarGet -
gets the value of dynamic variable (AFL 2.60)
- VarGetText -
gets the text value of dynamic variable (AFL 2.80)
- VarSet -
sets the value of dynamic variable (AFL 2.60)
- VarSetText -
sets dynamic variable of string type (AFL 2.80)
- VERSION -
get version info (AFL 1.9)
- WILDERS -
Wilder's smoothing (AFL 1.4)
- WMA -
weighted moving average (AFL 2.0)
- WRITEIF -
commentary conditional text output
- WriteVal -
write number or value of the array
- YEAR -
year (AFL 1.4)
- ZIG -
zig-zag indicator (AFL 1.1)
- _DEFAULT_NAME -
retrive default name of the plot (AFL 2.70)
- _N -
no text output (AFL 2.1)
- _PARAM_VALUES -
retrieve param values string (AFL 2.70)
- _SECTION_BEGIN -
section begin marker (AFL 2.70)
- _SECTION_END -
section end marker (AFL 2.70)
- _SECTION_NAME -
retrieve current section name (AFL 2.70)
- _TRACE -
print text to system debug viewer (AFL 2.4)
|