AFL Function Reference - Alphabetical list of functions
- #include ( Miscellaneous functions) -
preprocessor include command (AFL 2.2)
- #include_once ( Miscellaneous functions) -
preprocessor include (once) command (AFL 2.70)
- #pragma ( Miscellaneous functions) -
sets AFL pre-processor option (AFL 2.4)
- abs ( Math functions) -
absolute value
- AccDist ( Indicators) -
accumulation/distribution
- acos ( Math functions) -
arccosine function
- AddColumn (Exploration / Indicators) -
add numeric exploration column (AFL 1.8)
- AddMultiTextColumn (Exploration / Indicators) -
adds exploration text column based on array (AFL 4.20)
- AddRankColumn (Exploration / Indicators) -
add ranking column(s) according to current sort set by SetSortColumns (AFL 5.70)
- AddRow (Exploration / Indicators) -
add raw text row to exploration (AFL 4.0)
- AddSummaryRows (Exploration / Indicators) -
add summary row(s) to the exploration output (AFL 3.2)
- AddTextColumn (Exploration / Indicators) -
add text exploration column (AFL 1.8)
- AddToComposite ( Composites) -
add value to composite ticker (AFL 2.0)
- ADLine ( Composites) -
advance/decline line (AFL 1.2)
- AdvIssues ( Composites) -
advancing issues (AFL 1.2)
- AdvVolume ( Composites) -
advancing issues volume (AFL 1.2)
- ADX ( Indicators) -
average directional movement index (AFL 1.3)
- AlertIf ( Trading system toolbox) -
trigger alerts (AFL 2.1)
- AlmostEqual ( Math functions) -
rounding error insensitive comparison (AFL 2.80)
- AMA ( Moving averages, summation) -
adaptive moving average (AFL 1.5)
- AMA2 ( Moving averages, summation) -
adaptive moving average (AFL 1.5)
- ApplyStop ( Trading system toolbox) -
apply built-in stop (AFL 1.7)
- Asc ( String manipulation) -
get ASCII code of character (AFL 2.80)
- asin ( Math functions) -
arcsine function
- atan ( Math functions) -
arc tan
- atan2 ( Math functions) -
calculates arctangent of y/x (AFL 2.90)
- ATR ( Indicators) -
average true range (AFL 1.3)
- BarIndex ( Date/Time) -
get zero-based bar number (AFL 2.3)
- BarsSince ( Trading system toolbox) -
bars since
- BarsSinceCompare ( Trading system toolbox) -
bars since comparision between past and present array values was true (AFL 4.40)
- BBandBot ( Indicators) -
bottom bollinger band
- BBandTop ( Indicators) -
top bollinger band
- BeginValue ( Date/Time) -
Value of the array at the begin of the range (AFL 2.3)
- CategoryAddSymbol ( Information / Categories) -
adds a symbol to a category (AFL 2.5)
- CategoryCreate ( Information / Categories) -
add new category (such as watch list) (AFL 3.70)
- CategoryFind ( Information / Categories) -
search for category by name (AFL 3.0)
- CategoryGetName ( Information / Categories) -
get the name of a category (AFL 2.5)
- CategoryGetSymbols ( Information / Categories) -
retrieves comma-separated list of symbols belonging to given category (AFL 2.5)
- CategoryRemoveSymbol ( Information / Categories) -
remove a symbol from a category (AFL 2.5)
- CategorySetName ( Information / Categories) -
set the name of category (group, market, watch list, industry) (AFL 3.20)
- CCI ( Indicators) -
commodity channel index
- ceil ( Math functions) -
ceil value
- Chaikin ( Indicators) -
chaikin oscillator
- Chr ( String manipulation) -
get string with given ASCII code (AFL 4.40)
- ClipboardGet ( Miscellaneous functions) -
retrieves current contents of Windows clipboard (AFL 2.60)
- ClipboardSet ( Miscellaneous functions) -
copies the text to the Windows clipboard (AFL 2.6)
- ColorBlend ( Indicators) -
blends (mixes) two colors (AFL 3.30)
- ColorHSB ( Miscellaneous functions) -
specify color using Hue-Saturation-Brightness (AFL 2.80)
- ColorRGB ( Miscellaneous functions) -
specify color using Red-Green-Blue components (AFL 2.80)
- Correlation ( Statistical functions) -
correlation (AFL 1.4)
- cos ( Math functions) -
cosine
- cosh ( Math functions) -
hyperbolic cosine function (AFL 2.80)
- CreateObject ( Miscellaneous functions) -
create COM object (AFL 1.8)
- CreateStaticObject ( Miscellaneous functions) -
create static COM object (AFL 1.8)
- Cross ( Trading system toolbox) -
crossover check
- Cum ( Moving averages, summation) -
cumulative sum
- CumProd ( Moving averages, summation) -
cumulative product of all array elements (AFL 4.20)
- Date ( Date/Time) -
date (AFL 1.1)
- DateNum ( Date/Time) -
date number (AFL 1.4)
- DateTime ( Date/Time) -
retrieves encoded date time (AFL 2.3)
- DateTimeAdd ( Date/Time) -
adds specified number of seconds/minutes/hours/days to datetime (AFL 3.40)
- DateTimeConvert ( Date/Time) -
date/time format conversion (AFL 2.90)
- DateTimeDiff ( Date/Time) -
get difference in seconds between two datetime values (AFL 3.30)
- DateTimeFormat ( Date/Time) -
converts datetime to string (AFL 4.20)
- DateTimeToStr ( Date/Time) -
convert datetime to string (AFL 2.8)
- Day ( Date/Time) -
day of month (AFL 1.4)
- DayOfWeek ( Date/Time) -
day of week (AFL 1.4)
- DayOfYear ( Date/Time) -
get ordinal number of day in a year (AFL 2.4)
- DaysSince1900 ( Date/Time) -
get number of days since January 1st, 1900 (AFL 3.20)
- DecIssues ( Composites) -
declining issues (AFL 1.2)
- DecVolume ( Composites) -
declining issues volume (AFL 1.2)
- DEMA ( Moving averages, summation) -
double exponential moving average (AFL 2.0)
- EMA ( Moving averages, summation) -
exponential moving average
- EnableRotationalTrading ( Trading system toolbox) -
Turns on rotational-trading mode of the backtester (AFL 2.5)
- EnableScript ( Miscellaneous functions) -
enable scripting engine
- EnableTextOutput ( Miscellaneous functions) -
allows to enable or disable text output (AFL 2.20)
- EncodeColor (Exploration / Indicators) -
encodes color for indicator title (AFL 2.2)
- EndValue ( Date/Time) -
value of the array at the end of the selected range (AFL 2.3)
- Equity ( Trading system toolbox) -
calculate single-symbol equity line (AFL 2.0)
- erf ( Math functions) -
calculates Gauss error function (erf) (AFL 4.40)
- Error ( Miscellaneous functions) -
displays user-defined error message and stops the execution (AFL 3.7)
- EXP ( Math functions) -
exponential function
- ExRem ( Trading system toolbox) -
remove excessive signals (AFL 1.5)
- ExRemSpan ( Trading system toolbox) -
remove excessive signals spanning given number of bars (AFL 2.0)
- fclose (File Input/Output functions) -
close a file (AFL 2.5)
- fdelete (File Input/Output functions) -
deletes a file (AFL 2.70)
- fdir (File Input/Output functions) -
list directory content (AFL 3.70)
- feof (File Input/Output functions) -
test for end-of-file (AFL 2.5)
- FFT ( Basic price pattern detection) -
performs Fast Fourier Transform (AFL 2.90)
- fgetcwd (File Input/Output functions) -
get current working directory (AFL 4.10)
- fgets (File Input/Output functions) -
get a string from a file (AFL 2.5)
- fgetstatus (File Input/Output functions) -
retrieves file status/properties (AFL 2.90)
- FindIndex ( Miscellaneous functions) -
find index of array item matching specified value (AFL 4.40)
- FIR ( Moving averages, summation) -
Finite Impulse Response filter (AFL 3.40)
- FirstVisibleValue ( Indicators) -
get first visible value of array (AFL 3.40)
- Flip ( Trading system toolbox) -
(AFL 1.5)
- floor ( Math functions) -
floor value
- fmkdir (File Input/Output functions) -
creates (makes) a directory (AFL 2.70)
- fopen (File Input/Output functions) -
open a file (AFL 2.5)
- Foreign (Referencing other symbol data) -
access foreign security data (AFL 1.5)
- fputs (File Input/Output functions) -
write a string to a file (AFL 2.5)
- frac ( Math functions) -
fractional part
- frmdir (File Input/Output functions) -
removes a directory (AFL 2.70)
- FullName ( Information / Categories) -
full name of the symbol (AFL 1.1)
- GapDown ( Basic price pattern detection) -
gap down
- GapUp ( Basic price pattern detection) -
gap up
- GetAsyncKeyState ( Miscellaneous functions) -
query the current state of keyboard keys (AFL 3.60)
- GetBacktesterObject ( Trading system toolbox) -
get the access to backtester object (AFL 2.60)
- GetBaseIndex (Referencing other symbol data) -
retrieves symbol of relative strength base index (AFL 2.1)
- GetCategorySymbols ( Information / Categories) -
retrieves comma-separated list of symbols belonging to given category (AFL 2.4)
- GetChartBkColor ( Indicators) -
get the RGB color value of chart background (AFL 3.20)
- GetChartID (Exploration / Indicators) -
get current chart ID (AFL 2.3)
- GetCursorMouseButtons ( Indicators) -
get current state of mouse buttons (AFL 2.80)
- GetCursorXPosition ( Indicators) -
get current X position of mouse pointer (AFL 2.80)
- GetCursorYPosition ( Indicators) -
get current Y position of mouse pointer (AFL 2.80)
- GetDatabaseName ( Information / Categories) -
retrieves folder name of current database (AFL 2.3)
- GetExtraData ( Miscellaneous functions) -
get extra data from external data source (AFL 1.9)
- GetExtraDataForeign ( Miscellaneous functions) -
get extra data from external data source for specified symbol (AFL 4.20)
- GetFnData ( Information / Categories) -
get fundamental data (AFL 2.90)
- GetFnDataForeign ( Information / Categories) -
get fundamental data for specified symbol (AFL 4.20)
- GetFormulaPath ( Miscellaneous functions) -
get file path of current formula (AFL 3.90)
- GetLastOSError ( Miscellaneous functions) -
get text of last operating system (Windows) error (AFL 4.30)
- GetObject ( Miscellaneous functions) -
get handle to already running OLE object (AFL 4.40)
- GetOption ( Trading system toolbox) -
gets the value of option in automatic analysis settings (AFL 2.60)
- GetPerformanceCounter ( Miscellaneous functions) -
retrieves the current value of the high-resolution performance counter (AFL 2.90)
- GetPlaybackDateTime ( Date/Time) -
get bar replay position date/time (AFL 3.0)
- GetPriceStyle (Exploration / Indicators) -
get current price chart style (AFL 2.70)
- GetRTData ( Miscellaneous functions) -
retrieves the real-time data fields (AFL 2.60)
- GetRTDataForeign ( Miscellaneous functions) -
retrieves the real-time data fields (for specified symbol) (AFL 2.80)
- GetScriptObject ( Miscellaneous functions) -
get access to script COM object (AFL 1.8)
- GetTradingInterface ( Trading system toolbox) -
retrieves OLE automation object to automatic trading interfac (AFL 2.70)
- GfxArc (Low-level graphics) -
draw an arc (AFL 3.0)
- GfxChord (Low-level graphics) -
draw a chord (AFL 3.0)
- GfxCircle (Low-level graphics) -
draw a circle (AFL 3.0)
- GfxDrawImage (Low-level graphics) -
draw bitmap image (AFL 4.20)
- GfxDrawText (Low-level graphics) -
draw a text (clipped to rectangle) (AFL 3.0)
- GfxEllipse (Low-level graphics) -
draw an ellipse (AFL 3.0)
- GfxFillSolidRect (Low-level graphics) -
fill rectangle with solid color (AFL 4.10)
- GfxGetTextWidth (Low-level graphics) -
get pixel width of text (AFL 2.80)
- GfxGradientRect (Low-level graphics) -
draw a rectangle with gradient fill (AFL 3.0)
- GfxLineTo (Low-level graphics) -
draw a line to specified point (AFL 3.0)
- GfxMoveTo (Low-level graphics) -
move graphic cursor to new position (AFL 3.0)
- GfxPie (Low-level graphics) -
draw a pie (AFL 3.0)
- GfxPolygon (Low-level graphics) -
draw a polygon (AFL 3.0)
- GfxPolyline (Low-level graphics) -
draw a polyline (AFL 3.0)
- GfxRectangle (Low-level graphics) -
draw a rectangle (AFL 3.0)
- GfxRoundRect (Low-level graphics) -
draw a rectangle with rounded corners (AFL 3.0)
- GfxSelectFont (Low-level graphics) -
create / select graphic font (AFL 3.0)
- GfxSelectHatchBrush (Low-level graphics) -
select hatch style brush (AFL 4.0)
- GfxSelectPen (Low-level graphics) -
create / select graphic pen (AFL 3.0)
- GfxSelectSolidBrush (Low-level graphics) -
create / select graphic brush (AFL 3.0)
- GfxSelectStockObject (Low-level graphics) -
select built-in graphic object (AFL 4.00)
- GfxSetBkColor (Low-level graphics) -
set graphic background color (AFL 3.0)
- GfxSetBkMode (Low-level graphics) -
set graphic background mode (AFL 3.0)
- GfxSetCoordsMode (Low-level graphics) -
set low-level graphics co-ordinate mode (AFL 2.80)
- GfxSetOverlayMode (Low-level graphics) -
set low-level graphic overlay mode (AFL 3.0)
- GfxSetPixel (Low-level graphics) -
set pixel at specified position to specified color (AFL 3.0)
- GfxSetTextAlign (Low-level graphics) -
set text alignment (AFL 3.0)
- GfxSetTextColor (Low-level graphics) -
set graphic text color (AFL 3.0)
- GfxSetZOrder (Low-level graphics) -
set current low-level graphic Z-order layer (AFL 2.80)
- GfxTextOut (Low-level graphics) -
writes text at the specified location (AFL 3.0)
- GicsID ( Information / Categories) -
get GICS category information (AFL 3.40)
- GroupID ( Information / Categories) -
get group ID/name (AFL 1.8)
- GuiButton (GUI functions) -
create on-chart button control (AFL 4.30)
- GuiCheckBox (GUI functions) -
creates on-chart checkbox control (AFL 4.30)
- GuiDateTime (GUI functions) -
creates on-chart date-time picker control (AFL 4.30)
- GuiEdit (GUI functions) -
create on-chart edit control (AFL 4.30)
- GuiEnable (GUI functions) -
enables or disables on-chart control (AFL 4.30)
- GuiGetCheck (GUI functions) -
get checked state of control (AFL 4.30)
- GuiGetEvent (GUI functions) -
get GUI event (AFL 4.30)
- GuiGetText (GUI functions) -
get text from on-chart control (AFL 4.30)
- GuiGetValue (GUI functions) -
get numeric value of on-chart control (AFL 4.30)
- GuiRadio (GUI functions) -
creates on-chart radio button control (AFL 4.30)
- GuiSendKeyEvents (GUI functions) -
request GUI notifications for specified keys (AFL 4.40)
- GuiSetCheck (GUI functions) -
set checked state of on-chart control (AFL 4.30)
- GuiSetColors (GUI functions) -
set colors for GUI controls (AFL 2.30)
- GuiSetFont (GUI functions) -
set the font for on-chart control (AFL 4.30)
- GuiSetRange (GUI functions) -
set slider control range (AFL 4.30)
- GuiSetText (GUI functions) -
set text value of on-chart control (AFL 4.30)
- GuiSetValue (GUI functions) -
set numeric value of on-chart control (AFL 4.30)
- GuiSetVisible (GUI functions) -
shows or hides on-chart control (AFL 4.30)
- GuiSlider (GUI functions) -
creates on-chart slider control (AFL 4.30)
- HHV ( Lowest/Highest) -
highest high value
- HHVBars ( Lowest/Highest) -
bars since highest high
- Highest ( Lowest/Highest) -
highest value
- HighestBars ( Lowest/Highest) -
bars since highest value
- HighestSince ( Lowest/Highest) -
highest value since condition met (AFL 1.4)
- HighestSinceBars ( Lowest/Highest) -
bars since highest value since condition met (AFL 1.4)
- HighestVisibleValue ( Indicators) -
get the highest value within visible chart area (AFL 3.30)
- HMA ( Moving averages, summation) -
Hull Moving Average (AFL 3.40)
- Hold ( Trading system toolbox) -
hold the alert signal
- Hour ( Date/Time) -
get current bar's hour (AFL 2.0)
- IcbID ( Information / Categories) -
get ICB category information (AFL 3.60)
- IIf ( Trading system toolbox) -
immediate IF function
- IIR ( Moving averages, summation) -
infinite impulse response filter (AFL 4.0)
- IndustryID ( Information / Categories) -
get industry ID / name (AFL 1.8)
- InGICS ( Information / Categories) -
test GICS membership (AFL 3.40)
- InICB ( Information / Categories) -
test ICB membership (AFL 3.60)
- Inside ( Basic price pattern detection) -
inside day
- Int ( Math functions) -
integer part
- InternetClose (File Input/Output functions) -
close Internet file handle (AFL 4.20)
- InternetGetStatusCode (File Input/Output functions) -
returns HTTP status code of last Internet call (AFL 4.40)
- InternetOpenURL (File Input/Output functions) -
opens Internet web resource (URL) (AFL 4.20)
- InternetPostRequest (File Input/Output functions) -
send HTTP Post request to Internet web resource (URL) (AFL 4.30)
- InternetReadString (File Input/Output functions) -
read a string from Internet resource (AFL 4.20)
- InternetSetAgent (File Input/Output functions) -
set agent string for Internet function (AFL 4.30)
- InternetSetHeaders (File Input/Output functions) -
set custom HTTP headers for subsequent web requests (AFL 4.40)
- InternetSetOption (File Input/Output functions) -
set HTTP option for internet session (AFL 4.40)
- Interval ( Date/Time) -
get bar interval (in seconds) (AFL 2.1)
- inverf ( Math functions) -
inverse Gauss erf function (AFL 4.40)
- InWatchList ( Information / Categories) -
watch list membership test (by ordinal number)
- InWatchListName ( Information / Categories) -
watch list membership test (by name) (AFL 3.0)
- IsContinuous ( Information / Categories) -
checks 'continuous quotations' flag state (AFL 2.60)
- IsEmpty ( Miscellaneous functions) -
empty value check (AFL 1.5)
- IsFavorite ( Information / Categories) -
check if current symbol belongs to favorites (AFL 2.5)
- IsFinite ( Miscellaneous functions) -
check if value is not infinite (AFL 2.3)
- IsIndex ( Information / Categories) -
check if current symbol is an index (AFL 2.5)
- IsNan ( Miscellaneous functions) -
checks for NaN (not a number) (AFL 2.3)
- IsNull ( Miscellaneous functions) -
check for Null (empty) value (AFL 2.3)
- IsTrue ( Miscellaneous functions) -
true value (non-empty and non-zero) check (AFL 1.5)
- Kurtosis ( Math functions) -
calculates kurtosis (AFL 4.20)
- LastValue ( Trading system toolbox) -
last value of the array
- LastVisibleValue ( Indicators) -
get last visible value of array (AFL 3.40)
- LineArray (Exploration / Indicators) -
generate trend-line array (AFL 2.5)
- LinearReg ( Statistical functions) -
linear regression end-point (AFL 2.2)
- LinRegIntercept ( Statistical functions) -
(AFL 2.2)
- LinRegSlope ( Statistical functions) -
linear regression slope (AFL 1.4)
- LLV ( Lowest/Highest) -
lowest low value
- LLVBars ( Lowest/Highest) -
bars since lowest low
- log ( Math functions) -
natural logarithm
- log10 ( Math functions) -
decimal logarithm
- Lookup ( Date/Time) -
search the array for bar with specified date/time (AFL 3.40)
- Lowest ( Lowest/Highest) -
lowest value
- LowestBars ( Lowest/Highest) -
bars since lowest
- LowestSince ( Lowest/Highest) -
lowest value since condition met (AFL 1.4)
- LowestSinceBars ( Lowest/Highest) -
barssince lowest value since condition met (AFL 1.4)
- LowestVisibleValue ( Indicators) -
get the lowest value within visible chart area (AFL 3.30)
- MA ( Moving averages, summation) -
simple moving average
- MACD ( Indicators) -
moving average convergence/divergence
- MapCreate (Map functions) -
creates a map/dictionary object (holding key-value pairs) (AFL 4.90)
- MarketID ( Information / Categories) -
market ID / name (AFL 1.8)
- Matrix (Matrix functions) -
create a new matrix (AFL 4.0)
- Max ( Math functions) -
maximum value of two numbers / arrays
- MDI ( Indicators) -
minus directional movement indicator (-DI) (AFL 1.3)
- Median ( Statistical functions) -
calculate median (middle element) (AFL 2.5)
- MFI ( Indicators) -
money flow index
- MicroSec ( Date/Time) -
get bar's microsecond part of the timestamp
- MilliSec ( Date/Time) -
get bar's millisecond part of the timestamp
- Min ( Math functions) -
minimum value of two numbers / arrays
- Minute ( Date/Time) -
get current bar's minute (AFL 2.0)
- Month ( Date/Time) -
month (AFL 1.4)
- mtRandom ( Statistical functions) -
Mersene Twister random number generator (AFL 3.0)
- mtRandomA ( Statistical functions) -
Mersene Twister random number generator (array version) (AFL 3.0)
- MxCopy (Matrix functions) -
copy rectangular block from one matrix to another (AFL 4.40)
- MxDet (Matrix functions) -
calculate determinant of the matrix (AFL 4.10)
- MxFromString (Matrix functions) -
creates a new matrix out of string (AFL 4.10)
- MxGetBlock (Matrix functions) -
get rectangular block of items from matrix (AFL 4.10)
- MxGetSize (Matrix functions) -
get size of the matrix (AFL 4.0)
- MxIdentity (Matrix functions) -
create an identity matrix (AFL 4.0)
- MxInverse (Matrix functions) -
calculate inverse matrix (AFL 4.10)
- MxSetBlock (Matrix functions) -
sets values in the rectangular block of matrix cells (AFL 4.10)
- MxSolve (Matrix functions) -
solves linear equation system A @ X = B (AFL 4.10)
- MxSort (Matrix functions) -
sorts the matrix (AFL 4.10)
- MxSortRows (Matrix functions) -
sort the rows of the matrix (AFL 4.10)
- MxSum (Matrix functions) -
calculate grand sum of the matrix (AFL 4.20)
- MxToString (Matrix functions) -
convert matrix to string (AFL 4.10)
- MxTranspose (Matrix functions) -
creates transpose of an input matrix (AFL 4.0)
- Name ( Information / Categories) -
ticker symbol (AFL 1.1)
- NormDist ( Statistical functions) -
normal distribution function (AFL 4.20)
- NoteGet ( Miscellaneous functions) -
retrieves the text of the note (AFL 2.6)
- NoteSet ( Miscellaneous functions) -
sets text of the note (AFL 2.6)
- Now ( Date/Time) -
gets current system date/time (AFL 2.3)
- NullCount ( Miscellaneous functions) -
count consecutive Null values (AFL 3.90)
- NumToStr ( String manipulation) -
convert number to string (AFL 2.5)
- NVI ( Indicators) -
negative volume index
- Nz ( Miscellaneous functions) -
Null (Null/Nan/Infinity) to zero (AFL 2.3)
- OBV ( Indicators) -
on balance volume
- Optimize ( Trading system toolbox) -
define optimization variable (AFL 1.7)
- OptimizerSetEngine ( Trading system toolbox) -
select external optimization engine (AFL 3.20)
- OptimizerSetOption ( Trading system toolbox) -
set the value of external optimizer engine parameter (AFL 3.20)
- OscP ( Indicators) -
price oscillator
- OscV ( Indicators) -
volume oscillator
- Outside ( Basic price pattern detection) -
outside bar
- Param (Exploration / Indicators) -
add user user-definable numeric parameter (AFL 2.3)
- ParamColor (Exploration / Indicators) -
add user user-definable color parameter (AFL 2.3)
- ParamDate (Exploration / Indicators) -
add user user-definable date parameter (AFL 2.60)
- ParamField (Exploration / Indicators) -
creates price field parameter (AFL 2.70)
- ParamList (Exploration / Indicators) -
creates the parameter that consist of the list of choices (AFL 2.70)
- ParamStr (Exploration / Indicators) -
add user user-definable string parameter (AFL 2.3)
- ParamStyle (Exploration / Indicators) -
select styles applied to the plot (AFL 2.70)
- ParamTime (Exploration / Indicators) -
add user user-definable time parameter (AFL 2.60)
- ParamToggle (Exploration / Indicators) -
create Yes/No parameter (AFL 2.70)
- ParamTrigger (Exploration / Indicators) -
creates a trigger (button) in the parameter dialog (AFL 2.70)
- PDI ( Indicators) -
plus directional movement indicator (AFL 1.3)
- Peak ( Basic price pattern detection) -
peak (AFL 1.1)
- PeakBars ( Basic price pattern detection) -
bars since peak (AFL 1.1)
- Percentile ( Statistical functions) -
calculate percentile (AFL 2.5)
- PercentRank ( Indicators) -
calculate percent rank (AFL 3.40)
- PlaySound ( Miscellaneous functions) -
play back specified .WAV file (AFL 3.40)
- Plot (Exploration / Indicators) -
plot indicator graph (AFL 1.8)
- PlotForeign (Referencing other symbol data) -
plot foreign security data (AFL 2.2)
- PlotGrid (Exploration / Indicators) -
Plot horizontal grid line (AFL 2.3)
- PlotOHLC (Exploration / Indicators) -
plot custom OHLC chart (AFL 2.2)
- PlotShapes (Exploration / Indicators) -
plots arrows and other shapes (AFL 2.3)
- PlotText ( Indicators) -
write text on the chart (AFL 2.80)
- PlotTextSetFont ( Basic price pattern detection) -
write text on the chart with user-defined font (AFL 2.80)
- PlotVAPOverlay (Exploration / Indicators) -
plot Volume-At-Price overlay chart (AFL 2.4)
- PlotVAPOverlayA ( Indicators) -
plot multiple-segment Volume-At-Price chart (AFL 3.20)
- PopupWindow ( Miscellaneous functions) -
display pop-up window (AFL 3.0)
- Prec ( Math functions) -
adjust number of decimal points of floating point number
- Prefs ( Miscellaneous functions) -
retrieve preferences settings (AFL 1.4)
- PriceVolDistribution (Matrix functions) -
general-purpose distribution function (AFL 4.20)
- printf ( String manipulation) -
Print formatted output to the output window. (AFL 2.5)
- Prod ( Moving averages, summation) -
cumulative product of array over specified range (AFL 4.20)
- ProdSince ( Moving averages, summation) -
cumulative product since condition is met (AFL 4.20)
- PVI ( Indicators) -
positive volume index
- Random ( Statistical functions) -
random number (AFL 1.9)
- Ref ( Trading system toolbox) -
reference past/future values of the array
- RelStrength (Referencing other symbol data) -
comparative relative strength (AFL 1.3)
- Remap ( Math functions) -
re-maps one range to another (AFL 4.30)
- RequestMouseMoveRefresh ( Indicators) -
request chart to be refreshed when user moves mouse cursor (AFL 4.30)
- RequestTimedRefresh ( Indicators) -
forces periodical refresh of indicator pane (AFL 2.90)
- RestorePriceArrays (Referencing other symbol data) -
restore price arrays to original symbol (AFL 2.5)
- Reverse ( Miscellaneous functions) -
reverse the order of the elements in the array (AFL 3.90)
- RMI ( Indicators) -
Relative Momentum Index (AFL 2.1)
- ROC ( Indicators) -
percentage rate of change
- Round ( Math functions) -
round number to nearest integer
- RSI ( Indicators) -
relative strength index
- RWI ( Indicators) -
random walk index
- RWIHi ( Indicators) -
random walk index of highs
- RWILo ( Indicators) -
random walk index of lows
- SafeDivide ( Math functions) -
division with divide-by-zero protection (AFL 4.40)
- SAR ( Indicators) -
parabolic stop-and-reverse (AFL 1.3)
- Say (Text-to-Speech functions) -
speaks provided text (AFL 2.90)
- Second ( Date/Time) -
get current bar's second (AFL 2.0)
- SectorID ( Information / Categories) -
get sector ID / name (AFL 1.8)
- SelectedValue (Exploration / Indicators) -
retrieves value of the array at currently selected date/time point (AFL 2.1)
- SendEmail ( Miscellaneous functions) -
send an e-mail message (AFL 3.90)
- SetBacktestMode ( Trading system toolbox) -
Sets working mode of the backtester (AFL 3.0)
- SetBarFillColor ( Indicators) -
set bar/candlestick/cloud chart fill color (AFL 3.1)
- SetBarsRequired ( Miscellaneous functions) -
set number of previous and future bars needed for script/DLL to properly execute (AFL 2.1)
- SetChartBkColor ( Indicators) -
set background color of a chart (AFL 2.80)
- SetChartBkGradientFill ( Indicators) -
enables background gradient color fill in indicators (AFL 2.90)
- SetChartOptions (Exploration / Indicators) -
set/clear/overwrite defaults for chart pane options (AFL 2.70)
- SetCustomBacktestProc ( Trading system toolbox) -
define custom backtest procedure formula file (AFL 2.70)
- SetForeign (Referencing other symbol data) -
replace current price arrays with those of foreign security (AFL 2.5)
- SetFormulaName ( Trading system toolbox) -
set the name of the formula (AFL 2.5)
- SetGradientFill ( Indicators) -
set the colors of a gradient fill plot (AFL 3.60)
- SetOption ( Trading system toolbox) -
sets options in automatic analysis settings (AFL 2.3)
- SetPositionSize ( Trading system toolbox) -
set trade size (AFL 2.70)
- SetSortColumns (Exploration / Indicators) -
sets the columns which will be used for sorting in AA window (AFL 2.90)
- SetStopPrecedence ( Trading system toolbox) -
set precedence of built-in stops (AFL 4.0)
- SetTradeDelays ( Trading system toolbox) -
allows to control trade delays applied by the backtester (AFL 2.1)
- ShellExecute ( Basic price pattern detection) -
execute a file (AFL 3.40)
- sign ( Math functions) -
returns the sign of the number/array (AFL 2.50)
- Signal ( Indicators) -
macd signal line
- sin ( Math functions) -
sine function
- sinh ( Math functions) -
hyperbolic sine function (AFL 2.80)
- Skewness ( Math functions) -
calculate skewness (AFL 4.20)
- Sort ( Miscellaneous functions) -
performs a quick sort of the array (AFL 3.90)
- SparseCompress ( Miscellaneous functions) -
compress sparse array (AFL 4.0)
- SparseExpand ( Miscellaneous functions) -
expand compressed array to sparse array (AFL 4.0)
- SparseInterpolate ( Miscellaneous functions) -
interpolate values between sparse points given as input (AFL 4.90)
- sqrt ( Math functions) -
square root
- StaticVarAdd ( Miscellaneous functions) -
an "atomic" addition for static variables (AFL 4.10)
- StaticVarCompareExchange ( Miscellaneous functions) -
atomic interlocked static variable compare-exchange operation (AFL 3.50)
- StaticVarCount ( Miscellaneous functions) -
get the total number of static variables in memory (AFL 3.30)
- StaticVarGenerateRanks ( Miscellaneous functions) -
generate ranking of multiple symbols and store it to static variables (AFL 3.70)
- StaticVarGet ( Miscellaneous functions) -
gets the value of static variable (AFL 2.60)
- StaticVarGetRankedSymbols ( Miscellaneous functions) -
retrieve a list of ranked symbols from static variables (AFL 3.70)
- StaticVarGetText ( Miscellaneous functions) -
gets the value of static variable as string (AFL 2.60)
- StaticVarInfo ( Miscellaneous functions) -
get the information about static variable(s) (AFL 3.60)
- StaticVarRemove ( Miscellaneous functions) -
remove static variable (AFL 2.80)
- StaticVarSet ( Miscellaneous functions) -
sets the value of static variable (AFL 2.60)
- StaticVarSetText ( Miscellaneous functions) -
Sets the value of static string variable. (AFL 2.60)
- Status ( Miscellaneous functions) -
get run-time AFL status information (AFL 1.65)
- StdErr ( Statistical functions) -
standard error (AFL 1.4)
- StDev ( Statistical functions) -
standard deviation (AFL 1.4)
- StochD ( Indicators) -
stochastic slow %D
- StochK ( Indicators) -
stochastic slow %K
- StrCount ( String manipulation) -
count the occurrences of substring within a string (AFL 3.20)
- StrExtract ( String manipulation) -
extracts given item (substring) from comma-separated string (AFL 2.4)
- StrFind ( String manipulation) -
find substring in a string (AFL 2.5)
- StrFormat ( String manipulation) -
Write formatted output to the string (AFL 2.5)
- StrLeft ( String manipulation) -
extracts the leftmost part (AFL 2.0)
- StrLen ( String manipulation) -
string length (AFL 1.5)
- StrMatch ( String manipulation) -
string pattern/wildcard matching (AFL 4.0)
- StrMid ( String manipulation) -
extracts part of the string (AFL 2.0)
- StrReplace ( String manipulation) -
string replace (AFL 2.90)
- StrRight ( String manipulation) -
extracts the rightmost part of the string (AFL 2.0)
- StrSort ( String manipulation) -
sort comma-separated item list (AFL 3.90)
- StrToDateTime ( String manipulation) -
convert string to datetime (AFL 2.80)
- StrToLower ( String manipulation) -
convert to lowercase (AFL 2.80)
- StrToNum ( String manipulation) -
convert string to number (AFL 2.5)
- StrToUpper ( String manipulation) -
convert to uppercase (AFL 2.80)
- StrTrim ( String manipulation) -
trim whitespaces from the string (AFL 3.90)
- Study ( Miscellaneous functions) -
reference hand-drawn study (AFL 1.5)
- Sum ( Moving averages, summation) -
sum data over specified number of bars
- SumSince ( Moving averages, summation) -
sum of array elements since condition was tru (AFL 4.10)
- tan ( Math functions) -
tangent function (AFL 1.0)
- tanh ( Math functions) -
hyperbolic tangent function (AFL 2.80)
- TEMA ( Moving averages, summation) -
triple exponential moving average (AFL 2.0)
- ThreadSleep ( Miscellaneous functions) -
suspend thread for specified number of milliseconds (AFL 3.50)
- TimeFrameCompress (Time Frame functions) -
compress single array to given time frame (AFL 2.5)
- TimeFrameExpand (Time Frame functions) -
expand time frame compressed array (AFL 2.5)
- TimeFrameGetPrice (Time Frame functions) -
retrieve O, H, L, C, V values from other time frame (AFL 2.5)
- TimeFrameMode (Time Frame functions) -
switch time frame compression mode (AFL 2.80)
- TimeFrameRestore (Time Frame functions) -
restores price arrays to original time frame (AFL 2.5)
- TimeFrameSet (Time Frame functions) -
switch price arrays to a different time frame (AFL 2.5)
- TimeNum ( Date/Time) -
get current bar time (AFL 2.0)
- TrimResultRows (Exploration / Indicators) -
trims Analysis result list to specified number of rows (AFL 4.90)
- Trin ( Composites) -
traders (Arms) index (AFL 1.2)
- TRIX ( Indicators) -
triple exponential smoothed price
- Trough ( Basic price pattern detection) -
trough (AFL 1.1)
- TroughBars ( Basic price pattern detection) -
bars since trough (AFL 1.1)
- TSF ( Statistical functions) -
time series forecast (AFL 2.2)
- Ultimate ( Indicators) -
ultimate oscillator
- UncIssues ( Composites) -
unchanged issues (AFL 1.2)
- UncVolume ( Composites) -
unchaged issues volume (AFL 1.2)
- ValueWhen ( Trading system toolbox) -
get value of the array when condition met (AFL 1.1)
- VarGet ( Miscellaneous functions) -
gets the value of dynamic variable (AFL 2.60)
- VarGetText ( Miscellaneous functions) -
gets the text value of dynamic variable (AFL 2.80)
- VarSet ( Miscellaneous functions) -
sets the value of dynamic variable (AFL 2.60)
- VarSetText ( Miscellaneous functions) -
sets dynamic variable of string type (AFL 2.80)
- Version ( Miscellaneous functions) -
get version info (AFL 1.9)
- VoiceCount (Text-to-Speech functions) -
get number of SAPI voices (AFL 4.20)
- VoiceSelect (Text-to-Speech functions) -
select SAPI voice (AFL 4.20)
- VoiceSetRate (Text-to-Speech functions) -
sets voice speech rate (AFL 4.30)
- VoiceSetVolume (Text-to-Speech functions) -
set the volume of speech (AFL 4.30)
- VoiceWaitUntilDone (Text-to-Speech functions) -
waits until TTS voice has finished speaking (AFL 4.30)
- Wilders ( Moving averages, summation) -
Wilder's smoothing (AFL 1.4)
- WMA ( Moving averages, summation) -
weighted moving average (AFL 2.0)
- WriteIf (Exploration / Indicators) -
commentary conditional text output
- WriteVal (Exploration / Indicators) -
converts number to string
- XYChartAddPoint (Exploration / Indicators) -
add point to exploration scatter (XY) chart (AFL 3.60)
- XYChartSetAxis (Exploration / Indicators) -
set the names of X and Y axes in exploration scatter charts (AFL 3.60)
- Year ( Date/Time) -
year (AFL 1.4)
- ZIG ( Basic price pattern detection) -
zig-zag indicator (AFL 1.1)
- _DEFAULT_NAME (Exploration / Indicators) -
retrive default name of the plot (AFL 2.70)
- _DT ( Date/Time) -
convert string to datetime (AFL 3.40)
- _exit ( Miscellaneous functions) -
terminate the execution of AFL formula (AFL 4.40)
- _N (Exploration / Indicators) -
no text output (AFL 2.1)
- _PARAM_VALUES (Exploration / Indicators) -
retrieve param values string (AFL 2.70)
- _SECTION_BEGIN (Exploration / Indicators) -
section begin marker (AFL 2.70)
- _SECTION_END (Exploration / Indicators) -
section end marker (AFL 2.70)
- _SECTION_NAME (Exploration / Indicators) -
retrieve current section name (AFL 2.70)
- _TRACE ( Miscellaneous functions) -
print text to system debug viewer (AFL 2.4)
- _TRACEF ( Miscellaneous functions) -
print formatted text to system debug viewer (AFL 4.0)