Welcome Guest, you are in: Login
CTS Futures
Home
Pricing
Market Data
FAQ
Videos

T4 Desktop
User Guide
Scripting Guide
Release Notes

Mobile and Web
T4 Mobile for Android
T4 Mobile for iOS
T4 Mobile for Browser
T4 WebTrader

Admins
T4 Admin Guide
MiFID II/MiFIR

Developers
API 4.7 Guide
FIX API


Page History: Scripting Function Reference

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2011/07/21 00:04


Fields

Fields are values that can be referenced directly in a script. For example CLOSE (or C in shorthand) represents the closing price of the current bar of the calculation.

FieldDescription
OPEN, OOpening price
HIGH, HHigh price
LOW, LLow price
CLOSE, CClosing price
TYPICAL, Typical Field|TYP]Typical price (O + H +C) / 3
VOLUME, VVolume
TRADESNumber of trades that make up the current bar (Note: this is not always available yet.)
INDEXIndex of the current bar being computed. This runs from 0 to COUNT - 1.
COUNTNumber of bars on the chart.
BARPERCENTPercentage completion of the current bar. E.g. 15 minutes into a 1 hour bar would give 0.25
NUMERATORThe numerator of the market.
DENOMINATORThe denominator of the market.
TICKVALUEThe tick value of the market.
NILSpecial "non-value" field.
MARKETIDThe text market id.
MARKETDESCRIPTIONThe text description of the market.



Operators

Arithmetic Operators
OperatorDescription
+Add
-Subtract
/Divide
*Multiply
%Modulus
^Exponent

Relational Operators
OperatorDescription
=, !=Equals, not equals
<, <=Less than, less than equals
>, >=Greater than, greater than equals

Boolean Operators
OperatorDescription
AND, &&Logical AND
OR, ||Logical OR
XORExclusive OR



Functions

Mathematical Functions
FunctionDescription
ABS( <value> )Calculates the absolute value of a number.
SQRT( <value> )Calculates the square root of a number.
TAN( <value> )Calculates the tangent of the value.



Plotting, Summary and Configuration Functions

FunctionDescription
PLOT_LINE( <value>, <line thickness>, <line color> )Draws a line plot of the value.
PLOT_HISTOGRAM( <value>, <column width%>, <column color> )Draws a histogram (columnar) plot of the value.
SUMMARY( <formatting text>, [<value>, <value>, ...] )Displays a summary for the plot.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.