MATHEMATICAL OPERATIONS
abs, 1 // Absolute value of n
add, 2 // Add lhs and rhs
divide, 2 // Divide lhs by rhs
subtract, 2 // Subtract lhs and rhs
sqrt, 1 // Square root of x, where x > 0
sign, 1 // Sign of n, -1 where x < 0, +1 where x > 0, else zero
power, 2 // Take lhs to the rhs power
multiply, 2 // Multiply lhs and rhs
BOOLEAN OPERATIONS
logicaland, 2 // Logical and lhs and rhs
logicalor, 2 // Logical or lhs and rhs
hastag, 1 // Has a tag
STATISTICAL
avg, 1, // Average, weighted if x is present and time series
bin, 2, // Place data into bins
count, 1 //Count all values that aren't NaN
sum, 1 // Sum of inputs
meanmax, 2 // Mean maximal value
meanmax, 1 // Man maximal curve
slr, 1 // Simple linear regression
SELECTION
min, 1 // Smallest value of all the inputs
max, 1// Largest value of all the inputs.
first, 2 // Limit to the first n elements
last, 2 // Limit to the last n elements
least, 2 // Limit to the least n elements greatest, 2 // Limit to the greatest n elements
if, 2 // Conditional selection
if 3, // Conditional selection
UNITS
english, 1 // Convert metric to english if appropriate
metric, 1 // Convert english to metric if appropriate
POWER-DURATION
frc, 1 // FRC from a mean max curve
frc, 2 // Rolling FRC
frce, 1 // FRC error from a mean max curve
ftp, 1 // FTP from a mean max curve
ftp, 2 // Rolling FTP
ftpe, 1 // FTP error from a mean max curve
pmax, 1 // pmax from a mean max curve
pmax, 2 // Rolling Pmax
pmaxe, 1 // pmax from a mean max curve
phenotype, 1 // phenotype from a mean max curve
pdcurve, 1 // Power-duration curve
pdcurve, 2 // Power-duration curve
pdprofile, 1 // Power-duration profile
SMOOTHING
ewma, 2 // exponentially-weighted moving average
tl, 2 // Training load (ATL, CTL)
filter, 3 // Convolve
gaussian, 2 // Gaussian filter kernel
SORTING AND RESHAPING
sort, 1 // Sort ascending sortd, 1 // Sort descending
shift, 2 // Shift data forward or backward
nozero, 1 // Replace all zero values with NaN
TRAINING LEVELS
levelfrom, 2 // Training level from
levelto, 2 // Training level to
levelname, 2 // Training level name
ROUNDING
ceil, 1 // Smallest integer that is greater than or equal to n
floor, 1 // Largest integer that is less than or equal to n
frac, 1 // Fractional portion of n
trunc, 1 // Integer portion of n
DATE AND TIME
date, 3 // Date serial number
Global variables:
today (today’s date)
Need more help? Visit the Trainingpeaks.com Help Center.
Ready to get started with WKO4? Click below to purchase or to try free for 14 days.