|
Perform general operations on single values. Any parameter of a function can be a literal number, a single value, or a formula.
?AccountSize - value of the AccountSize setting
?EndDate - end date of the script being run
?LocalTime - the current local date and time
?OrdersDate - date for which orders are being generated
?RunMode - mode in which the script is being run
?ScriptName - name of the script being run (without path or extension)
?StartDate - start date of the script being run
Abs - absolute value of a number
ArcCos - determines which angle has the specified cosine
ArcSin - determines which angle has the specified sine
ArcTan - determines which angle has the specified tangent
Assert - require a condition to be true for the script to continue
Bound - limit the range of a value
CDF - cumulative distribution function
Combined - evaluate stats expression using combined strategy results
Cosine - trigonometric cosine of a number of degrees
Cross - value1[1] < value2[1] and value1 > value2
DataType - causes value to be treated as a specific type (price vs. volume)
Date - get the numeric date for a given year, month, day
DateBars - count of bars since (or until) a specific date
DateDay - extract the day number from a date
DateMonth - extract the month number from a date
DateYear - extract the year number from a date
Days - number of calendar days between two dates
DebugEval - stop script execution and log the details of a strategy formula's evaluation when a condition is met
DllDataCalc - call a custom external DLL function to calculate a Data item
Exp - exponential function (e^x)
Extern - evaluate expression for a different stock/contract or strategy
ICDF - inverse cumulative distribution function
IF - conditional branch
InSet - whether a value is in a specific set of values
IsNaN - true if value can't be evaluated, false if it can
Item - refer to a Data or Library item by name
Log - natural logarithm of a number
Logit - inverse logistic function
Max - largest of a group of values
MaxN - Nth largest of a group of values
Min - smallest of a group of values
MinN - Nth smallest of a group of values
MissingBars - number of bars missing before the current bar in this symbol
MostRecent - evaluate expression as of the most recent available bar when one is missing on the current date
NoNan - evaluate an expression with no possibility of a nan (not a number) result
NthOfMonth - whether current bar date is nth specific weekday of current month
OrderSum - evaluates a formula for each non-skipped setup and returns the sum of the values
PositionSum - evaluates a formula for each open position and returns the sum of the values
Random - random number from min to max rounded to step
Reason - return both a value and a string for use in e.g. ExitLimit
Rescale - map a value from one scale to another
Round - round value to nearest step
Select - multi-part conditional branch
SetupSum - evaluates a formula for each setup and returns the sum of the values
Sign - sign of a number (1 or -1)
Sine - trigonometric sine of a number of degrees
SkipNans - evaluate a multi-bar function using only non-NaN values within the lookback period
Sqr - square root of a number
StratRef - find the number of a given strategy, and/or allow dynamic Extern strategy references
Switch - value switch function
SymRef - find the number of a given symbol, and/or allow dynamic Extern symbol references
Tangent - trigonometric tangent of a number of degrees
TanH - hyperbolic tangent of a number
TargetPrice - calculate the value of tomorrow's close that would cause an indicator to reach a specific level
This - anchored term in multi-bar function
Top - top N digits of a number
UntilEvent - market days until next event of given type (works past end of imported data)
|