millionchart
فارسی

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#

WhatWhat happensWhat to do instead
Alerts on your own scriptsCreating one is refused: "Alerts on your own scripts are not available." The script itself compiles and runsWatch the chart, or set a price alert on a level
Sharing a script with another memberThere is no way to share; every script is private to your accountCopy the text yourself if you want to keep it elsewhere
Libraries supplied by the platformOnly modules you saved yourself can be importedWrite the module yourself (Lesson 12)
Data of another symbolRefused: E-REQ-UNDECLARED without a uses line, E4001 with oneRead your chart's own symbol (symbol = symbol.id)
A panel or a scan of several symbolsNot availableOne symbol per chart; use the chart grid to watch several
Showing the log in the editorlog.info, log.warning and log.error are accepted and kept by the engine, but no panel lists themDraw 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, bind and secret;
  • the blocks on close and on tick;
  • the report statement and the bracket order statement.
Cuprel · error E9002
indicator "A reserved input"
    edition = 1

preset p
plot(close)

The names account.* and contract.* are reserved in the same way (E9001):

Cuprel · error 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 knownCodeWrite instead
An item of a list as items[i]E3173items.at(i) (items[1] reads the list as it was one bar back)
Selectors on lists such as .where(...) and .count(...)E5140a for loop over the items
pips(x), to_ticks(d)E3160multiply by symbol.pip, divide by symbol.tick
A cooldown or an expiry written 3 barsE2002the number: cooldown = 3
json(...) to build an alert messageE3160build the text yourself with f"..."
A function without a name (fn(x) => ... as a value)E2006declare a named function with fn
nz(x)E3160x ?? 0
Cuprel · error E3160
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.