desktop:desktop_chart_scripting_function_reference

This is an old revision of the document!


Function Reference

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.


Field Description
OPEN Opening price
HIGH High Price
LOW Low Price
CLOSE Closing price
TYPICAL, TYP Typical price (OPEN + HIGH + CLOSE) / 3
VOLUME Volume
VOLUMEATBID Volume that occurred at the bid price.
VOLUMEATEOFFER Volume that occurred at the offer price.
TRADES Number of trades that make up the current bar.
TRADESATBID Number of trades that occurred at the bidprice.
TRADESATOFFER Number of trades that occurred at the offer price.
INDEX Index of the current bar being computed. This runs from 0 to COUNT - 1.
COUNT Number of bars on the chart.
BARPERCENT Percentage completion of the current bar. E.g. 15 minutes into a 1 hour bar would give 0.25
NUMERATOR The numerator of the market.
DENOMINATOR The denominator of the market.
TICKVALUE The tick value of the market.
NIL Special “non-value” field.
MARKETID The text market id.
MARKETDESCRIPTION The text description of the market.

Operators


Arithmetic Operators
Operator Description
+ Add
- Subtract
/ Divide
* Multiply
% Modulus
Exponent

Relational Operators
Operator Description
=, != Equals, not equals
<, ⇐ Less than, less than equals
>, >= Greater than, greater than equals

Boolean Operators
Operator Description
AND, && Logical AND
OR, Logical OR
XOR Exclusive OR

Functions


Mathematical Functions
Field Description
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name
My Name
Your Name
My Name
Your Name
My Name
Your Name
Your Name
My Name
Your Name

Plotting, Summary and Configuration Functions


Field Description
PLOT_LINE(...) Draws a line plot of the value.
PLOT_BAND(...) Draws a line plot of the value with upper and lower bands and option shading between the bands.
PLOT_STEP(...) Draws a step plot of the value.
PLOT_POINTS(...) Draws a point plot of the value.
PLOT_RIBBON(...) Draws a ribbon plot of the value.
PLOT_WAVECREST(...) Draws a wavecrest plot of the value with upper and lower limit lines. Peaks and valleys extending beyond the limit line values are shaded to stand out.
PLOT_HISTOGRAM(...) Draws a histogram (columnar) plot of the value.
PLOT_LIMITLINE(...) Draws a histogram (columnar) plot of the value.
PLOT_CENTERLINE(...) Draws a histogram (columnar) plot of the value.
PLOT_RANGEMARKERS(...) Draws a histogram (columnar) plot of the value.
SUMMARY(...) Displays a summary for the plot.

  • desktop/desktop_chart_scripting_function_reference.1641908460.txt.gz
  • Last modified: 2023/09/21 19:55
  • (external edit)