Time series analyis 
Source code available 
AC  Accelerator Oscillator 
✔ 
ADO  Accumulation/Distribution
Oscillator 
✔ 
AGC  Automatic gain control 
✔ 
ADX  Average Directional Movement Index 
✔ 
ADXR 
Average Directional Movement Rating 
✔ 
Alligator  Alligator 3line indicator 
✔ 
ALMA  Arnaud Legoux Moving Average 
✔ 
Amplitude  Amplitude
of series 
✔ 
AO  Awesome Oscillator 
✔ 
APO  Absolute Price Oscillator 
✔ 
Aroon  Aroon Indicator 
✔ 
AroonOsc  Aroon Oscillator 
✔ 
ATR  Average True Range, original 
✔ 
ATRS  Average True Range,
simple MA 
✔ 
AvgPrice  Average Price 
✔ 
BandPass  Bandpass filter 

BBands  Bollinger Bands 
✔ 
BBOsc  Bollinger Bands oscillator 
✔ 
Beta  Beta value 
✔ 
BOP  Balance Of Power 
✔ 
Butterworth  Butterworth filter 
✔ 
CBI  Cold Blood Index 

CCI  Commodity Channel Index 
✔ 
CDL2Crows...  60 classic candle patterns 
✔ 
CGOsc  Center Of Gravity oscillator 
✔ 
ChandelierLong  Chandelier exit long 
✔ 
ChandelierShort  Chandelier exit short 
✔ 
Chikou  Ichimoku Chikou line 
✔ 
CI  Choppiness Index 
✔ 
CMO  Chande Momentum Oscillator 
✔ 
concave  Curve concavity  
ConnorsRSI  Connors RSI indicator 
✔ 
Coral  Coral indicator 
✔ 
Correlation  Pearson correlation coefficient 
✔ 
Covariance  Covariance coefficient 
✔ 
crossOver  Curve cross over 

crossOverF  Fuzzy cross over 

crossUnder  Curve cross under 

crossUnderF  Fuzzy cross under 

DChannel  Donchian Channel 
✔ 
DCOsc  Donchian Channel Oscillator 
✔ 
Decycle  Ehlers' Decycler 
✔ 
DEMA  Double Exponential Moving Average 
✔ 
DominantPeriod  Fundamental
price oscillation 

DominantPhase  Fundamental
price phase 

DPO  Detrended Price Oscillator 
✔ 
DX  Directional Movement Index 
✔ 
EMA  Exponential Moving Average 
✔ 
FIR3  Finite Impulse Response filter, 3 taps 

FIR4  Finite Impulse Response filter, 4 taps 

FIR6  Finite Impulse Response filter, 6 taps 

falling  Curve falling 

fallingF  Curve falling, fuzzy 

findIdx 
Find element 

Fisher  Fisher transform 
✔ 
FisherInv  Inverse Fisher
transform 
✔ 
FisherN  Fisher transform with
normalization 
✔ 
FractalDimension  Fractal
Dimension 
✔ 
FractalHigh  High Fractal indicator 
✔ 
FractalLow  Low Fractal indicator 
✔ 
frechet  Frechet pattern detection 

Gauss  Gauss filter 

HAClose  Haiken Ashi Close 
✔ 
HAHigh  Haiken Ashi High  ✔ 
HALow  Haiken Ashi Low  ✔ 
HAOpen  Haiken Ashi Open  ✔ 
HH  Highest High  ✔ 
HMA  Hull Moving Average  ✔ 
HighPass  Wide highpass filter 

HighPass1  1pole highpass filter 

HighPass2  2pole highpass filter  ✔ 
HTDcPeriod  Hilbert transform
cycle period  ✔ 
HTDcPhase  Hilbert transform
cycle phase  ✔ 
HTPhasor  Hilbert transform
phasor components  ✔ 
HTSine  Hilbert transform sine
wave  ✔ 
HTTrendline  Hilbert transform
instantaneous trendline  ✔ 
HTTrendMode  Hilbert transform
trend indicator  ✔ 
Hurst  Hurst exponent  ✔ 
IBS  Internal Bar Strength  ✔ 
Ichimoku  Ichimoku indicator  ✔ 
KAMA  Kaufman Adaptive Moving Average  ✔ 
Keltner  Keltner channel  ✔ 
Laguerre  Laguerre filter  ✔ 
LinearReg  Linear regression  ✔ 
LinearRegAngle  Linear
regression angle  ✔ 
LinearRegIntercept  Linear
regression intercept  ✔ 
LinearRegSlope  Linear
regression slope  ✔ 
LL  Lowest Low  ✔ 
LowPass  Lowpass filter 

MACD  Moving Average
Convergence/Divergence  ✔ 
MACDExt  MACD with various MA types  ✔ 
MACDFix  MACD with standard parameters  ✔ 
MAMA  MESA Adaptive Moving Average  ✔ 
MAVariablePeriod  Moving Average with
variable period 
✔ 
MaxVal  Highest value 
✔ 
MaxIndex  Index of highest
value 
✔ 
Median  Median filter 

MedPrice  Center price of candle  ✔ 
MidPoint  Center value of period  ✔ 
MidPrice  Center price of period  ✔ 
MinVal  Lowest value 
✔ 
MinIndex  Index of lowest
value 
✔ 
MinMax  Lowest and highest
values 
✔ 
MinMaxIndex  Indexes of lowest
and highest values 
✔ 
MMI  Market Meanness Index  ✔ 
MinusDI  Minus Directional Indicator  ✔ 
MinusDM  Minus Directional Movement  ✔ 
Mode  Most frequent value 
✔ 
Mom  Momentum  ✔ 
Moment  Mean, variance, skew, kurtosis 
✔ 
MovingAverage  Moving Average with
various MA types 
✔ 
NATR  Normalized Average True Range  ✔ 
Normalize  Normalize to 1 .. +1  ✔ 
NumInRange  Count ranges in
interval  ✔ 
NumDn  Count of
falling elements  ✔ 
NumRiseFall  Length of streak  ✔ 
NumUp  Count of rising elements  ✔ 
NumWhiteBlack  Difference of white and
black candles  ✔ 
peak  Curve peak  
peakF  Curve peak, fuzzy  
Percentile  Percentile 

PercentRank  Percent rank 

PlusDI  Plus Directional Indicator  ✔ 
PlusDM  Plus Directional Movement  ✔ 
polyfit  Polynomial regression 

polynom  Regression polynomial 

PPO  Percentage Price Oscillator  ✔ 
predict  Curve peak / crossover
prediction 

predictMove  Predict price move by
statistics 
✔ 
predictSeason  Predict price move
by seasonal analysis 
✔ 
ProfitFactor  Ratio of positive to
negative returns  ✔ 
rising  Curve rising 

risingF  Curve rising, fuzzy 

ROC  Rate of change  ✔ 
ROCP  Rate of change percentage  ✔ 
ROCR  Rate of change ratio  ✔ 
ROCL  Logarithmic return  ✔ 
ROCR100  Rate of change ratio, 100
scale  ✔ 
Roof 
Ehlers' roofing filter 
✔ 
RSI  Relative Strength Index,
original  ✔ 
RSIS  Relative Strength Index, simple
MA  ✔ 
RVI  Ehlers' Relative Vigor Index  ✔ 
SAR  Parabolic SAR  ✔ 
SentimentLW  Williams' Market Sentiment  ✔ 
SentimentG  Genesis Sentiment Index  ✔ 
ShannonEntropy  Randomness metric  ✔ 
ShannonGain  Expected gain rate  ✔ 
SIROC  Smoothed Rate of Change  ✔ 
SMA  Simple Moving Average  ✔ 
SMom  Smoothed Momentum  ✔ 
Smooth  Ehlers' supersmoother  ✔ 
Spearman  Spearman's rank correlation coefficient  ✔ 
Spectrum  Spectral analysis 

StdDev  Standard deviation  ✔ 
Stoch  Stochastic oscillator  ✔ 
StochEhlers  Ehlers' predictive
stochastic 
✔ 
StochF  Stochastic Fast  ✔ 
StochRSI  Stochastic RSI  ✔ 
Sum  Sum of elements  ✔ 
SumDn  Sum of falling elements  ✔ 
SumUp  Sum of rising elements  ✔ 
T3  Triple smoothed MA  ✔ 
TEMA  Triple EMA  ✔ 
touch  Curve touches another 

Trima  Triangular Moving Average  ✔ 
Trix  TEMA rate of change  ✔ 
TrueRange  True range  ✔ 
TSF  Time Series Forecast  ✔ 
TSI  Trend Strength Index  
TypPrice  Typical price  ✔ 
UltOsc  Ultimate Oscillator  ✔ 
UO  Universal Oscillator  ✔ 
Variance  Variance  ✔ 
valley  Curve valley  
valleyF  Curve valley, fuzzy 

Volatility  Annualized volatility  ✔ 
VolatilityC  Chaikin Volatility indicator  ✔ 
VolatilityMM  Min/Max volatility  ✔ 
VolatilityOV  Empirical volatility  ✔ 
WCLPrice  Weighted Close Price  ✔ 
WillR  Williams' Percent Range  ✔ 
WMA  Weighted Moving Average  ✔ 
ZigZag  ZigZag indicator 
✔ 
ZMA  Zerolag Moving Average 
✔ 



Markets & trading
 
adviseLong  Machine learning
training/prediction 

adviseShort  Machine learning
training/prediction 

algo  Select algorithm 

asset  Select asset  
assetAdd  Add asset to list  
assetHistory  Download price history  
assetList  Select asset list  
assetType  Type of asset  
brokerAsset  Download asset parameters 

brokerCommand  Send command to broker 

cancelTrade  Undo trade 

ccyMax  Strongest Forex pair  ✔ 
ccyMin  Weakest Forex pair  ✔ 
ccyReset  Initialize currency strength  ✔ 
ccySet  Store currency strength  ✔ 
ccyStrength  Get currency strength  ✔ 
contract 
Select option/future contract 

contractCheck  Check for
termination 

contractCPD 
Price probability analysis 

contractDays  Contract duration 

contractDelta  Delta value from
strike 
✔ 
contractExercise  Exercise
option 

contractFind 
Find contract by parameter 

contractIntrinsic  Intrinsic value 
✔ 
contractNext 
Next contract in chain 

contractPosition  Get current
position size 

contractPrice  Get current value 

contractProfit  Get current
profit/loss 

contractRecord  Save contract chain to history  ✔ 
contractRisk  Max risk of option
combo  ✔ 
contractRoll  Roll expired
contract forward  ✔ 
contractStrike  Strike value from
Delta  ✔ 
contractUpdate  Load contract chain 

cpd  Predicted price
probability 

cpdv  Price at given probability 

COT  Commitment Of Traders report 
✔ 
COT_CommercialPos  COT
commercials net position 
✔ 
COT_CommercialIndex  COT
index 
✔ 
COT_OpenInterest  COT open interest 
✔ 
dataDownload  Market data from online
source 

dataFromCSV 
Market data from CSV file 

dataFromQuandl 
Market reports from Quandl™ 
✔ 
dayClose 
Day close 
✔ 
dayHigh 
Day high 
✔ 
dayLow 
Day low 
✔ 
dayOpen 
Day open 
✔ 
dayPivot 
Day pivot 
✔ 
distribute 
Calculate portfolio weights 

enterLong  Open long position 

enterShort  Open short position 

exitLong  Close long positions 

exitShort  Close short positions 

exitTrade  Close selected position 

for(trades...)  Enumerate trades,
assets, algos 

frame  Timeframe state  
frameSync  Timeframe synchronization  
loadStatus  Load system status 

login 
Connect to broker 

loop  Loop through assets/algos  
marketVal 
Bar value (spread) 

marketVol 
Bar value (volume) 

markowitz  Meanvariance
optimization  
markowitzReturn  Max return for given
variance  
markowitzVariance  Min variance for
given return  
optimize  Optimal parameter value  
orderCVD 
Order flow analysis 

orderUpdate 
Read order book 

price 
Mean price at bar 

priceClose 
Close at bar 

priceHigh 
High at bar 

priceLow 
Low at bar 

priceOpen 
Open at bar 

priceQuote 
Enter current price 

priceRecord 
Save price to history 

priceSet 
Modify price at bar 

results  Statistics of trade
results  
saveStatus  Save system status  
suspended  Trading permission 

yield 
Riskfree rate at bar 
✔ 
  
Math 

abs 
Magnitude 

aboveF 
Fuzzy >= 

andF 
Fuzzy && (and) 

asin 
Arc sine 

acos 
Arc cosine 

atan 
Arc tangent 

atan2 
Arc tangent, high precision 

belowF 
Fuzzy <= 

between 
Range check 

betweenF 
Fuzzy range check 

cdf 
Gaussian cumulative distribution 

ceil 
Round up 

center 
Center about median 

clamp 
Limits 

compress 
Scale to +/100 

cos 
Cosine 

cosh 
Hyperbolic cosine 

diff 
Change since last bar 

dnorm 
Gaussian probability 

equalF 
Fuzzy == 

exp 
Exponential 

floor 
Round down 

genNoise 
Random noise 
✔ 
genSine 
Sine wave chirp 
✔ 
genSquare 
Square wave chirp 
✔ 
ifelse 
Conditional assignment 

fuzzy 
Defuzzyfication 

log 
Logarithm 

max 
Maximum 

min 
Minimum 

modf 
Fractional part 

normalize 
Normalize to +/100 

notF 
Fuzzy ! (not) 

orF 
Fuzzy  (or) 

pow 
Nth power, Nth root 

qnorm 
Gaussian distribution value 

random 
Random number generator 

round 
Round to next integer 

roundto 
Round to next step 

scale 
Center and scale to +/100 

seed 
Random number initialization 

sign 
Sign 

sin 
Sine 

sinh 
Hyperbolic sine 

sqrt 
Square root 

tan 
Tangent 

tanh 
Hyperbolic tangent 

zscore 
ZScore 




Time / date  
day  Day of month 

dmy  YYYYMMDD to OLE time/date 
✔ 
dom  Days in month 

dow  Day of week 

dst  Daylight saving time 

hour  UTC hour 

ldow  Day of week at time zone 

lhour  Hour at time zone 

ltod  HHMM at time zone 

market  Market open time 

minute  Minute 

minutesAgo  Bar distance in minutes 

minutesWithin  Minute inside bar 

month  Month at given bar 

ndow  Nth weekday of month 

nthDay  Date of nth weekday of month 
✔ 
second  Second with microseconds 

tdm  Trading day of month 

timeOffset  Bar at given time 

tom  Trading days in month 

tod 
HHMM time of day 

tow  DHHMM time of week 

ltow  DHHMM at time zone 

utm  Unix time 

wdate  OLE time/date 

wdateBar  OLE time/date at bar 

wdatef  OLE time/date from
string  
week  Week number 

workday  Workday or holiday 

year  Year at given bar 

ymd  OLE time/date to YYYYMMDD 
✔ 



Data structures 

atof  String to var 

atoi  String to int 

dataAppend  Extend dataset 

dataAppendRow  Extend dataset by row 

dataClip  Remove records 

dataCompress  Remove duplicates 

dataFind  Find date/time in dataset 

dataLoad  Load dataset 

dataInt  Get integer from field 

dataNew  Create dataset 

dataParse  Create dataset from CSV 

dataParseJSON  Create OHLC dataset
from JSON 

dataSave  Save dataset 

dataSaveCSV  Save dataset to CSV 

dataSet  Set dataset field 

dataSort  Sort dataset by date 

dataStr  Get string from field 

dataVar  Get variable from field 

filter  Convolution filter 

matrix 
Matrix / vector creation 

me 
Matrix element 

matAdd 
Matrix addition 

matMul 
Matrix multiplication 

matScale 
Matrix scaling 

matSet 
Matrix copy 

matSub 
Matrix subtraction 

matTrans 
Matrix transpose 

randomize 
Shuffle array or time series 

renorm 
Normalize array 

rev 
Reverse array or time series 

series 
Create time series 

sftoa 
Convert number to string 

shift 
Shift array or time series 

sortData 
Sort array 

sortIdx 
Create sort index 

sortRank 
Create ranking list 

strcat  Append string 

strcmp  Compare strings 

strcpy  Copy string 

strlen  String length 

strstr  Find substring 

strchr  Find character 

strrchr  Find character from end 

strtok  Tokenize string 

strvar  Variable from ini string 

strtext  Text from ini string 

strdate  Time/date to string 

strf  Variables to string 

strx  Replace substrings 

strxc  Replace characters 

strmid  Strip string 

strcount  Count characters 

strw  Wide string 

stridx  String to index 

strxid  Index to string 

strtr  Trade ID string 

strcon  Contract ID string 

sprintf  Print into string 

sscanf  Parse string 

ve 
Vector element 




Input / output 

color  Define color range 

colorScale  Brighten / darken color 

dataParse  Create dataset from CSV 

dataParseJSON  Create OHLC dataset
from JSON 

file_append  Append data to end of file  
file_appendfront  Append data to
begin of file  
file_content  Read content of file  
file_copy  Copy file  
file_date  File date  
file_delete  Delete file  
file_length  File size  
file_next  Read directory  
file_read  Read file to string  
file_select  Open file dialog box  
file_write  Write string to file  
ftp_download  Download file from FTP
server  
ftp_upload  Upload file to FTP server  
ftp_getdate  Get file date and size from
FTP server  
ftp_stop  Stop the current FTP transfer  
ftp_size  Size of the received file  
ftp_sent  Size of the sent file  
ftp_timestamp  Get file timestamp  
ftp_status  FTP transfer status  
ftp_log  Enables FTP logging  
getvar  Get systemwide variable 

http_transfer  Load data from website  
http_send  Send HTTP command  
http_post  Start HTTP POST transfer  
http_proxy  Define a proxy server  
http_status  HTTP transfer status  
http_result  Retrieve received file  
http_free  Stop current HTTP transfer  
keys 
Send keystrokes to window 

mouse 
Mouse position 

msg 
Message box 

panel  Create user panel
from spreadsheet  
panelFix  Determine panel scroll
area  
panelGet  Get data from user panel  
panelLoad  Load panel state  
panelMerge  Merge cells on panel  
panelSave  Save panel state  
panelSet  Display data on user panel 

plot  Plot curve 

plotBar  Plot histogram bar 

plotCorrelogram  Plot correlation
histogram 
✔ 
plotData  Get plot data for export 

plotDay  Daily seasonal analysis 
✔ 
plotDayProfit  Daily profit
histogram 
✔ 
plotGraph  Plot symbol 

plotHeatmap  Plot heatmap matrix 
✔ 
plotMAEGraph  Max adverse
excursions histogram 
✔ 
plotMAEPercentGraph  Max adverse
excursions in percent 
✔ 
plotMFEGraph  Max favorable
excursion histogram 
✔ 
plotMFEPercentGraph  Max favorable
excursions in percent 
✔ 
plotMonth  Monthly seasonal
analysis 
✔ 
plotMonthProfit  Monthly profit
histogram 
✔ 
plotPriceProfile  Price difference
histogram 
✔ 
plotQuarterProfit  Quarterly
profit histogram 
✔ 
plotTradeProfile  Profit
distribution histogram 
✔ 
plotWeek  Weekly seasonal analysis 
✔ 
plotWeekProfit  Weekly profit
histogram 
✔ 
plotWFOCycle  WFO cycle analysis 
✔ 
plotWFOProfit  Percycle profit
histogram 
✔ 
plotYear  Annual seasonal analysis 
✔ 
printf 
Print message 

print 
Print to target 

progress 
Progress bar 

putvar  Set systemwide variable 

Rd 
Double float from R expression 

Ri 
Integer from R expression 

Rrun 
R status 

Rset 
Send variables to R 

Rstart 
Start R session 

Rv 
Vector from R expression 

Rx 
Execute R expression 

slider 
Slider input 

sound 
Play WAV file 

window 
Find active window 




System 

exec 
Run external program 

free 
Free memory space 

GetProcAddress 
Get DLL function 

is 
System state 

isf 
Flag state 

LoadLibrary 
Open DLL 

lock 
Lock process 

malloc 
Allocate memory space 

memcmp 
Compare memory space 

memcpy 
Copy memory space 

memory 
Get memory allocation 

memset 
Fill memory space 

mode 
System flag state 

quit 
Terminate simulation 

realloc 
Change memory space 

res 
Reset system flag 

resf 
Reset flag 

set 
Set system flag 

setf 
Set flag 

timer 
Performance timer 

unlock 
Unlock process 

version 
Zorro version 

wait 
Pause 

watch, _POS 
Debugging info 

Win32 API 
Windows API functions 




Optional usersupplied functions 

bar 
Special bar definition 
✔ 
click 
Button click function 
✔ 
callback 
Callback for broker API and messages 
✔ 
cleanup 
Run once at the end 
✔ 
evaluate 
Evaluate strategy results 
✔ 
main 
Run once at the begin. 
✔ 
neural 
External machine learning and prediction 
✔ 
objective 
Optimization objective 
✔ 
order 
Special order transmission 
✔ 
run 
Run at any bar 
✔ 
tick 
Run at any incoming price 
✔ 
tock 
Run at fixed time intervals 
✔ 
tmf 
Trade micromanagement 
✔ 




