What is not available yet
One list of what a script cannot do in this release, what the editor says when you try, and what to write instead. Checked against the engine.
This page collects in one place what members cannot do with scripts in this release. Where a script tries, the engine refuses it with an error, so a script never runs with a meaning it was not written for. Every item below was checked against the engine that runs on the chart.
Things the platform does not offer yet#
| What | What happens | What to do instead |
|---|---|---|
| Alerts on your own scripts | Creating one is refused: "Alerts on your own scripts are not available." The script itself compiles and runs | Watch the chart, or set a price alert on a level |
| Sharing a script with another member | There is no way to share; every script is private to your account | Copy the text yourself if you want to keep it elsewhere |
| Libraries supplied by the platform | Only modules you saved yourself can be imported | Write the module yourself (Lesson 12) |
| Data of another symbol | Refused: E-REQ-UNDECLARED without a uses line, E4001 with one | Read your chart's own symbol (symbol = symbol.id) |
| A panel or a scan of several symbols | Not available | One symbol per chart; use the chart grid to watch several |
| Showing the log in the editor | log.info, log.warning and log.error are accepted and kept by the engine, but no panel lists them | Draw the value: Lesson 13 |
Words of the language reserved for a later edition#
These are written into the language now and refused, so that a script written for them cannot run with the wrong meaning. The message says the word is reserved (E9002):
- the inputs
preset,bindandsecret; - the blocks
on closeandon tick; - the
reportstatement and thebracketorder statement.
indicator "A reserved input"
edition = 1
preset p
plot(close)The names account.* and contract.* are reserved in the same way (E9001):
indicator "Account values"
edition = 1
plot(account.equity)funding and hedge are not settings of a strategy's header; writing them is E3130.
Forms that are not part of the language#
These are simply not known. Write the form on the right:
| Not known | Code | Write instead |
|---|---|---|
An item of a list as items[i] | E3173 | items.at(i) (items[1] reads the list as it was one bar back) |
Selectors on lists such as .where(...) and .count(...) | E5140 | a for loop over the items |
pips(x), to_ticks(d) | E3160 | multiply by symbol.pip, divide by symbol.tick |
A cooldown or an expiry written 3 bars | E2002 | the number: cooldown = 3 |
json(...) to build an alert message | E3160 | build the text yourself with f"..." |
A function without a name (fn(x) => ... as a value) | E2006 | declare a named function with fn |
nz(x) | E3160 | x ?? 0 |
indicator "A helper that does not exist"
edition = 1
plot(pips(10))What works, with limits#
Some things are available but bounded; they are not missing:
- Your plan decides how many scripts you can keep: 2 on the free chart plan, up to 100 on MillionChart Pro.
- A script can read other timeframes of its own symbol, up to 20 of them (Lesson 10).
- The engine bounds work, history, memory and drawings (Lesson 17, Limits and budgets).
See also: Limits and budgets, Diagnostics.