Global functions
31 functions. Each has a page of its own.
| Function | Summary |
|---|---|
alert | Raises an alert from inside your own logic, with a message you build. |
alertcondition | Declares a condition the platform can offer to the reader. It raises nothing by itself. |
barcolor | Recolours the chart’s own price bars. It draws no value of its own. |
bgcolor | Shades the pane’s background. Like barcolor it adds no value to the chart. |
bool | A true-or-false value. The two constants true and false are the literals for it. |
color | A colour. You can write one directly as a hex literal — six digits for the colour, eight to carry alpha as well. |
dayofmonth | The day of the month of the bar being evaluated. |
dayofweek | The day of the week of the bar being evaluated. |
fill | Shades the band between two plots, or between two horizontal lines. It has two forms and no mixed one, so you cannot fill between a plot and a level, and like the other output calls it must sit at the top level. |
fixnan | Takes a series and hands back a series of the same type, with na values dealt with. |
float | A number with a fractional part, written 1.5. It has no fields. |
hline | The value hline gives back once it has drawn a horizontal level. |
hour | The hour of the bar being evaluated. |
indicator | Declares the script and names it. Put it first. |
input | Eleven functions, one per kind of setting the reader can change from the chart: bool, colour, float, int, price, session, source, string, text area, time and timeframe. |
int | A whole number. One of the five data types the grammar names directly. |
minute | The minute of the bar being evaluated. |
month | The month of the bar being evaluated. |
na | Tests whether a value is absent. It takes any type and gives back a bool. |
nz | Takes a value and an alternative of the same type, and stands in for the value where it is absent. |
plot | The value plot gives back once it has drawn a series. |
plotarrow | Draws an arrow on each bar, sized from a number you supply. |
plotbar | Draws bars from the same four required series that plotcandle takes. |
plotcandle | Draws candles from four series of your own rather than from the chart’s bars. |
plotchar | The same marker as plotshape, with one character in place of a shape from the fixed set. |
plotshape | Marks the bars on which a condition holds, using a shape from a fixed set. |
second | The second of the bar being evaluated. |
string | A piece of text, written between double quotes: "length". |
timestamp | Assembles a time from its parts - the other direction from the eight functions that take a time apart. |
weekofyear | The week of the year of a time you supply. |
year | The year of the bar being evaluated. |
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.