Below is a list of the functions, their syntax and a brief description about what they exactly do.

Price Volume Data

These are the parameters that you will use the most.

Parameter

Function

Description

Example

open

open

Opening price of a stock at a particular minute

high

high

Highest price of a stock at a particular minute

close

close

Closing price of a stock at a particular minute

low

low

Lowest price of a stock at a particular minute

volume

volume

Volume Trading in a stock at a particular minute

Additional Price and Costs

These parameters are generally used in setting the target, stoploss and trailing stop loss

Parameter

Function

Description

Example

buy_price

buy_price

Price at which a stock was bought by the system.

current_price

current_price

Current Price of the stock at the given moment in simulation time

trading_cost

trading_cost

Transactional Costs attached with a given order

Central Tendencies

Central tendencies are used genrally for mean-reverting strategies.

Parameter

Function

Description

Example

sum

sum(p1,n1)

Evaluates sum of last n values of parameter

mean

mean(p1,n1)

Evaluates average of last n values of parameter

median

median(p1,n1)

Returns the median number of last n data points of parameter selected

mode

mode(p1,n1)

Evaluates mode of last n values of parameter

Range

Can be used to set stop loss and targets. Give a recent movement of the prices/

Parameter

Function

Description

Example

min

min(p1,n1)

Evaluates minimum value of parameter among last n values

max

max(p1, n1)

Evaluates maximum value of parameter among last n values

standard deviation

std(p1,n1)

Evaluates standard deviation of parameter among last n values

skewness

skewness(p1,n1)

Evaluates skewness of last n values of parameter

kurtosis

kurt(p1,n1)

Evaluates kurtosis of last n values of parameter

rank

rank(p1,n1)

Returns the rank of last value of parameter among last n values in ascending order

covariance

cov(p1,p2,n1)

Evaluates the covariance between parameter1 and parameter2 of last n values

correlation

corr(p1,p2,n1)

Evaluates the correlation between parameter1 and parameter2 of last n values

scale

scale(p1,p2)

Normalizes parameter1 to the scale of parameter2

autocorrelation

auto_corr

Returns correlation with self

Time movement

To be used when you want to retrieve older values of a particular parameter

Parameter

Function

Description

Example

difference

diff(p1,n1)

Evaluates the different between last and nth last value of parameter

delay

delay(p1,n1)

Returns the nth last value of parameter

Technical Indicators

One of the most commonly used operators. Note: Using just a technical indicator might not work most of the times. Combine it with some other parameter.

Parameter

Function

Description

Example

Moving Average Convergence Divergence

macd(n1)

Momentum indicator showing how the moving averages are changes over time

Exponential Moving Average

ema(p1,n1)

Evaluates the exponential moving average for parameter for last n days

Relative Strength Index

rsi(n1)

Indication of overbought or oversold securities, if RSI <30, implies oversold, if RSI > 80, implies overbought

Volume Weighted Average Price

vwap(n1)

Evaluates the volume weighted moving average for last n periods

True Range

tr()

Gives an indication of the movement of stock prices

Average True Range

atr()

Evaluates the mean of True range over last n periods

Average Movement

average_movement(p1,n1 )

Indicates how much change in parameter is there per given frequency in last n time

Ease of Movement

emv(n)

Indicates the rate of movement of stock with volume

Money Flow Index

mfi(n1)

Volume adjusted RSI indicator

On Balance Volume

obv(n)

Postive/negative culmination of volume

Rate of Change

roc(p1,n1)

Rate of change of parameter

Aaron Up

aaron_up( p1,n1)

Indication of frequency of postive and negative movements of parameter

Aaron Down

aaron_down(p1,n1)

Indication of frequency of postive and negative movements of parameter

Historical Profitability

hist_profit(n)

Gives a % of number of profitable candles in last n candle/total candles

Pivot Point

pivot()

It helps to calculate the pivot point

Support Level 1

support_1()

It is the first level where the price tends to find support as it falls

Support Level 2

support_2()

It is the Second level where the price tends to find support as it falls

Support Level 3

support_3()

It is the third level where the price tends to find support as it falls

Resistance Level 1

resistance_1()

It is where the price tends to find its first resistance as it rises

Resistance Level 2

resistance_2()

It is where the price tends to find its second resistance as it rises

Resistance Level 3

resistance_3()

It is where the price tends to find its third resistance as it rises

Simple Moving Average

sma(p1,n1)

Evaluates the simple moving average of last n values of parameters

Bollinger Band

bb(p1,n1)

Reversal indicator which creates a 1 standard deviation envelope around moving average