Mathematical
Abs
Calculates an absolute/positive number.
Abs(input)
Returns an absolute/positive number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Acos
Calculates the angle whose cosine is the specified number.
Acos(input)
Returns the angle whose cosine is the specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Add
Adds numbers/tables and returns the result number/table.
Add(input1, [ input2 ])
Returns the total sum of a single value is provide, adds the 2 values if there are 2 provided.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | False | Input, Number |
AddPerc
Add a percentage to the value.
AddPerc(value, percentage)
Returns the value with the added percentage.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
value | NumberOrTable | True | - |
percentage | Number | True | Input, Number, SessionGet |
AddPercentage
Add a percentage to the value.
AddPercentage(value, percentage)
Returns the value with the added percentage.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
value | NumberOrTable | True | - |
percentage | Number | True | Input, Number, SessionGet |
Asin
Calculates the angle whose sine is the specified number.
Asin(input)
Returns the angle whose sine is the specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Atan
Calculates the angle whose tangent is the specified number.
Atan(input)
Returns the angle whose tangent is the specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Atan2
Calculates the angle whose tangent is the quotient of two specified numbers.
Atan2(input1, input2)
Returns the angle whose tangent is the quotient of two specified numbers.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | - |
input2 | NumberOrTable | True | - |
Average
Calculates the average value of the array, two numbers or averages between 2 arrays.
Average(input1, [ input2 ])
Returns the average value of the array, two numbers or averages between 2 arrays.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | - |
input2 | NumberOrTable | False | - |
Average2
Calculates the average value of the array for a certain period.
Average2(input, [ period ])
Returns the average value of the array for a certain period.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | ListNumbers | True | - |
period | Number | False | - |
Ceil
Calculates the smallest integral value greater than or equal to the specified number.
Ceil(input)
Returns the smallest integral value greater than or equal to the specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Change
Calculates the absolute price changes between the values.
Change(prices)
Returns the new-old change of the values in an array.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
prices | ListNumbers | True | BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices |
Clamp
Calculates the number or table of numbers clamped between the specified minimum and maximum.
Clamp(input, min, max)
Returns number or table of numbers clamped between the specified minimum and maximum.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
min | Number | True | - |
max | Number | True | - |
Compress
Calculates the average values of every 2 values in an array. When the input is [10, 20, 30, 40] the result will be [15, 35].
Compress(input)
Returns the compressed array.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
input | ListNumbers | True | - |
Cos
Calculates the cosine of the specified angle.
Cos(input)
Returns the cosine of the specified angle.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Cosh
Calculates the hyperbolic cosine of the specified angle.
Cosh(input)
Returns the hyperbolic cosine of the specified angle.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Delta
Calculates the percentage between input1 and input2 or the percentage change between the values of input1.
Delta(input1, [ input2 ])
Returns the percentage between input1 and input2. When for example input1 is 5 and input2 is 6, 20 is returned.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | - |
input2 | NumberOrTable | False | - |
Div
Divides input1 with input2. If one of the parameters is a single value, the other is divided by this.
Div(input1, input2)
Returns the divided numbers/tables.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | True | Input, Number |
Epsilon
Enumeration, returns 1 Satoshi (=Epsilon).
Epsilon
Returns 1 Satoshi (=Epsilon).
Return Type: Number
Exp
Calculates 'e' raised to the specified power.
Exp(input)
Returns 'e' raised to the specified power.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
FilterAbove
Filters out all values above a specific value.
FilterAbove(input, threshold)
Returns the filtered input.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
threshold | Number | True | - |
FilterBelow
Filters out all values below a specific value.
FilterBelow(input, threshold)
Returns the filtered input.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
threshold | Number | True | - |
Floor
Calculates the largest integral value less than or equal to the specified number.
Floor(input)
Returns the largest integral value less than or equal to the specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
GetHigh
Gets the highest value.
GetHigh(prices, depth, [ offset ])
Returns the highest value.
Return Type: Number
Parameter Name | Parameter Type | Required | Suggested |
prices | ListNumbers | True | BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices |
depth | Number | True | Input, Number, SessionGet |
offset | Number | False | Input, Number, SessionGet |
GetHighs
Gets the highest values within lookback period.
GetHighs(array, depth)
Returns the highest values within lookback period.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
array | ListNumbers | True | BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices |
depth | Number | True | Input, Number, SessionGet |
GetLow
Gets the lowest value.
GetLow(prices, depth, [ offset ])
Returns the lowest value.
Return Type: Number
Parameter Name | Parameter Type | Required | Suggested |
prices | ListNumbers | True | BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices |
depth | Number | True | Input, Number, SessionGet |
offset | Number | False | Input, Number, SessionGet |
GetLows
Gets the lowest values within lookback period.
GetLows(array, depth)
Returns the lowest values within lookback period.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
array | ListNumbers | True | BuyPrices, SellPrices, OpenPrices, HighPrices, LowPrices, ClosePrices, HLPrices, HLCPrices, OCPrices, OHLCPrices |
depth | Number | True | Input, Number, SessionGet |
Ln
Calculates the logarithm of a specified number.
Ln(input1, [ input2 ])
Returns the logarithm of a specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | - |
input2 | NumberOrTable | False | - |
Log10
Calculates the base 10 logarithm of a specified number.
Log10(input)
Returns the base 10 logarithm of a specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Max
Returns the maximum value. If the input is a single array, it returns the biggest number in that array (single value). If inputs are both numbers, it returns the biggest number (single value). If inputs are array and number, it returns the biggest number (array[1] vs number, single value). If inputs are both arrays, it returns an array of the biggest numbers per cell (array, length determined by the shorter array).
Max(values[])
Returns the biggest number or an array of biggest numbers per cell.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
values[] | NumberOrTableParams | True | - |
Min
Returns the minimum value. If the input is a single array, it returns the minimum in that array (single value). If inputs are both numbers, it returns the smallest number (single value). If inputs are array and number, it returns the smallest number (single value). If inputs are both arrays, it returns an array of the smallest numbers per cell (array, length determined by shortest array)
Min(values[])
Returns the smallest number or an array of smallest numbers per cell.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
values[] | NumberOrTableParams | True | - |
Mul
Multiplies input1 with input2. If one of the parameters is a single value, the other is multiplied by this.
Mul(input1, input2)
Returns the multiplied numbers/tables.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | True | Input, Number |
Mult
Multiplies input1 with input2. If one of the parameters is a single value, the other is multiplied by this.
Mult(input1, input2)
Returns the multiplied numbers/tables.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | True | Input, Number |
NumberMax
Enumeration, returns the maximum number.
NumberMax
Returns a maximum value (2147483647).
Return Type: Number
NumberMin
Enumeration, returns the minimum number.
NumberMin
Returns a minimum value (-2147483648).
Return Type: Number
PercentageChange
Calculates the percentage between input1 and input2 or the percentage change between the values of input1.
PercentageChange(input1, [ input2 ])
Returns the percentage between input1 and input2. When for example input1 is 5 and input2 is 6, 20 is returned.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | - |
input2 | NumberOrTable | False | - |
PI
Enumeration, returns the number of PI.
PI
Returns PI (3.14159265359).
Return Type: Number
Pow
Calculates a specified number/table raised to the specified power number/table.
Pow(input1, input2)
Returns a specified number/table raised to the specified power number/table.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | True | Input, Number |
Random
Creates a random number.
Random([ min ], [ max ])
Returns a random number.
Return Type: Number
Parameter Name | Parameter Type | Required | Suggested |
min | Number | False | Input, Number |
max | Number | False | Input, Number |
ReplaceAbove
Replaces any value above a specific value with another value.
ReplaceAbove(input, threshold, newValue)
Returns the input with replaced values.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
threshold | Number | True | - |
newValue | Number | True | - |
ReplaceBelow
Replaces any value below a specific value with another value.
ReplaceBelow(input, threshold, newValue)
Returns the input with replaced values.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
threshold | Number | True | - |
newValue | Number | True | - |
Round
Rounds a value (or values if table) to the nearest integer or to the specified number of fractional digits.
Round(input, digits)
Returns the rounded number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
digits | Number | True | Input, Number |
Satoshi
Enumeration, returns 1 Satoshi (=Epsilon).
Satoshi
Returns 1 Satoshi (=Epsilon).
Return Type: Number
Sd
Calculates the Standard Deviation from the data series.
Sd(input)
Returns the Standard Deviation.
Return Type: Number
Parameter Name | Parameter Type | Required | Suggested |
input | ListNumbers | True | NewArray, ClosePrices |
Sign
Calculates an integer that indicates the sign of a number.
Sign(input)
Returns an integer that indicates the sign of a number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Sin
Calculates the sine of the specified angle.
Sin(input)
Returns the sine of the specified angle.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Sinh
Calculates the hyperbolic sine of the specified angle.
Sinh(input)
Returns the hyperbolic sine of the specified angle.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Sqrt
Calculates the square root of a specified number.
Sqrt(input)
Returns the square root of a specified number.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Sub
Subtracts numbers/tables and returns the result number/table.
Sub(input1, input2)
Calculates the subtracted numbers/tables.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | True | Input, Number |
SubPerc
Subtracts a percentage to the value.
SubPerc(value, percentage)
Returns the value with the subtracted percentage.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
value | NumberOrTable | True | - |
percentage | Number | True | Input, Number, SessionGet |
SubPercentage
Subtracts a percentage to the value.
SubPercentage(value, percentage)
Returns the value with the subtracted percentage.
Return Type: ListNumbers
Parameter Name | Parameter Type | Required | Suggested |
value | NumberOrTable | True | - |
percentage | Number | True | Input, Number, SessionGet |
Sum
Adds numbers/tables and returns the result number/table.
Sum(input1, [ input2 ])
Returns the total sum of a single value is provide, adds the 2 values if there are 2 provided.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input1 | NumberOrTable | True | Input, Number |
input2 | NumberOrTable | False | Input, Number |
Tan
Calculates the tangent of the specified angle.
Tan(input)
Returns the tangent of the specified angle.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Tanh
Calculates the hyperbolic tangent of the specified angle.
Tanh(input)
Returns the hyperbolic tangent of the specified angle.
Return Type: NumberOrTable
Parameter Name | Parameter Type | Required | Suggested |
input | NumberOrTable | True | - |
Last updated