TradeStation Math Function Equivalents

Top  Previous  Next

The following table lists ChaosHunter basic operations (functions) and the TradeStation function equivalents, according to our understanding of the TS help files.
 
The last column contains the equivalent math functions we have coded in EasyLanguage. They will be better to use than the TradeStation equivalents in some cases because they handle cases where the input parameters are out of bounds. For example, in ChaosHunter, the division operator / returns a 0 result if the denominator is zero instead of issuing an error. To assure your formula produces the correct answers in TradeStation, you should use our divide function instead of the / operation if there is any possibility the denominator can be zero.

 
 

ChaosHunter

EasyLanguage

WSG written TS function

sqrt(abs(x))            

SquareRoot(AbsValue(x))                      

sqrt(x)

-x                      

-x                                      

-

1/x                      

1/x                                          

divide

x^2                      

x * x or Square(x)

-

x^3                      

x * x * x                                    

cube(x)

Abs(x)                  

AbsValue(x)                                  

abs(x)

x^y                      

Power(x,y)                                  

pow(x,y)

exp(x)                  

ExpValue(x)                                  

exp(x)

10^x                    

Power(10,x)                                  

power10(x)

log(x)                  

Log(x)/2.302585092994                        

log10(x)          

ln(x)                    

Log(x)                                      

ln(x)

sin(x)                  

Sine(x * 57.2957795785)                      

sin(x)

cos(x)                  

Cosine(x * 57.2957795785)                    

cos(x)

min(x,y)                

MinList(x,y)                                

min(x,y)

max(x,y)                

MaxList(x,y)                                

max(x,y)

avg(x,y)                

AvgList(x,y)                                

avg(x,y)

Mom(series, lookback)    

Momentum(series, lookback)                  

Mom(series, lookback)

ROC(series, lookback)

series / series[lookback]                    

Roc(series, lookback)

ROC%(series, lookback)  

100*series / series[lookback]

Proc(series, lookback)

%chg(series, lookback)

100*PercentChange(series, lookback)          

Pchg(series, lookback)

Vel(series, lookback)    

(series - series[lookback])/lookback        

Vel(series, lookback)

Acc(series, lookback)

(vel-vel[lookback]/lookback                  

Acc(series, lookback)

Min(series, lookback)    

Lowest(series, lookback)                    

MinV(series, lookback)

Max(series, lookback)    

Highest(series, lookback)                    

MaxV(series, lookback)

Sprd(series1, series2)  

series1 - series2                            

Sprd(series1, series2)

Sprd%(series1, series2)  

100*(series1 - series2)/series1              

SprdP(series1, series2)

RelStr(series1, series2)

series1/series2                              

RelStr(series1, series2)

Eff(series, lookback)    

unknown*                                    

Eff(series, lookback)

SMA(series, lookback)    

Average(series, lookback)                    

SMA(series, lookback)

EmA(series, lookback)    

XAverage(series, lookback)                  

EMA(series, lookback)

Slope(series, lookback)  

LinearRegSlope(series, lookback)            

Slope(series, lookback)

Lag(series, lookback)    

series[lookback]                            

Lag(series, lookback)

 
*unknown - We could not find TS equivalent so we coded this function in EasyLanguage
 
Notes:
 
1. The WSG sqrt(x) TS function includes the abs(x) within it.
2. TS trig functions are only in degrees, CH uses radians.
3. TS uses Log to represent the natural logarithm instead of the usual Ln.
4. The TS function PercentChange does not report percents at all.
5. Click here to obtain the ChaosHunter Neuron functions.
 
TradeStation and EasyLanguage are registered trademarks of TradeStation Securities