Errors

Diagnostic codes

A problem a script stops with, or is warned about, carries a stable code. The engine defines 273 of them.

  • The message can be reworded. The code keeps its meaning and is never reused.
  • 235 are errors and 38 are warnings.
  • A message or meaning that carries a figure or a name the checks of this site hold back is not shown here. The editor in the chart shows the whole message, with the line.
Diagnostic codes of the engine at engine production@9a82bf9
CodeKindMeaning
E-CHUNK-LATEERRORNot shown on this site.
E-CHUNK-SKEWERRORNot shown on this site.
E-COMPILE-REPEATERRORCalls of overloaded functions or shared method names nest so deep that compiling their arguments again for every version blows up.
E-DT-ZONEERRORA date-time without a time zone.
E-ENGINE-PART-UNAVAILABLEERRORA part of the engine could not be loaded or did not start: absent, unreadable, no manifest or loader registered, a file that imports a file the manifest does not list, it threw when it started. The script was not run.
E-ENGINE-PART-VERSIONERRORNot shown on this site.
E-FMT-SPECERROR`text.fmt` (the text of an f-text piece) was given a format it does not know.
E-FUTURE-READERRORA strategy looks ahead (`future = true`) on a value that is not shifted: it would trade on prices the bar did not have. A script that makes alerts gets it too when the unshifted value reaches an alert (`alert()` / `alertcondition`, directly or as the condition they run under); a look-ahead that only draws is the warning `W-FUTURE-READ`.
E-IMPORT-COUNTERRORThe script imports too many libraries.
E-IMPORT-CYCLEERRORA library imports itself, directly or through other libraries.
E-IMPORT-DEPTHERRORLibraries import each other too many levels deep.
E-IMPORT-SIZEERRORThe libraries the script imports are too large together.
E-INPUT-RANGEERRORA value given for an input is above its `max`, below its `min`, not a number (or not a whole number for an `int`), or not one of its `options`: the script does not start, whoever the host is (`ScriptProgram.begin`); nothing is clamped. The message names the input and its value.
E-LIMIT-DEPTHERRORNot shown on this site.
E-LIMIT-DRAWERRORA drawing, polyline or point list is larger than the limit.
E-LIMIT-HISTORYERRORNot shown on this site.
E-LIMIT-HISTORY-STATICERRORNot shown on this site.
E-LIMIT-ITEMSERRORAn array, map or matrix is larger than the limit.
E-LIMIT-MEMORYERRORNot shown on this site.
E-LIMIT-OPSERRORThe budget of operations is spent.
E-LIMIT-REGEXERRORNot shown on this site.
E-LIMIT-TABLEERRORA table: its size, its cells, the live cells together, or a cell outside the table.
E-LIMIT-TEXTERRORA text is longer than the limit.
E-LIMIT-TIMEERRORNot shown on this site.
E-LOOP-STEPERRORThe step of a loop is zero or `na`.
E-MODULE-HASHERRORThe text of a module is not the one its hash was taken of.
E-MODULE-NOT-FOUNDERRORA module that a script imports, or a bundle holds, is not found.
E-ORDER-IDERRORAn order id differs from one already used only in case, spaces, `_` or `-`.
E-PERIOD-NAMEERRORNot shown on this site.
E-PERIOD-TFERROR`prior()` / `current()` of a period that is not longer than the chart's own bar (`prior(day)` on a daily or weekly chart).
E-QTY-NAERRORThe size of an order is `na`.
E-REGEX-FEATUREERRORA pattern of `text.match` uses what the matcher does not read: a back-reference, look-ahead or look-behind, a named group, `\p{..}`, `\cX`.
E-REGEX-HOSTERROR`text.match` runs in a host that did not install the matcher (the page's engine and editor bundles only compile; the worker, the tester, the sandbox and the converter install it).
E-REQ-CHANGEDERRORThe symbol or the timeframe of a request is not the same on every bar of a run: made of a price, a bar number or a name a statement writes, at compile time, or a function's parameter whose value changed (the message names the bar).
E-REQ-LIMITERRORNot shown on this site.
E-REQ-UNDECLAREDERRORA request names a symbol written in the script that the `uses` line does not declare.
E-SANDBOX-BUSYERRORThe sandbox queue is full.
E-SANDBOX-CRASHERRORThe process that ran the script died.
E-SANDBOX-JOBERRORThe sandbox job failed.
E-SANDBOX-OOMERRORThe sandbox stopped the script: memory.
E-SANDBOX-TIMEOUTERRORThe sandbox stopped the script: wall-clock time.
E-SCRIPTERRORThe script itself failed inside the sandbox (its own code is in `scriptCode`).
E-SESSION-DUPERRORNot shown on this site.
E-SESSION-NAMEERRORA session name that is not declared above its use, or an empty one.
E-SESSION-TEXTERRORThe hours of a session (`HHMM-HHMM[,HHMM-HHMM…][:days]`) or a time of day (`HH:MM`) are not written in the form the chart reads, or are not written in the script.
E-SESSION-ZONEERRORA session or a clock time names a time zone the chart does not know (it used to be read as UTC).
E-STATE-SESSIONERROR`state session` without a name while the script declares more than one session.
E-TF-UNKNOWNERRORA text that names a timeframe is not one the chart knows: `data.series`, `data.intrabars`, `bar.time_in`, `bar.close_time_in`, `tf.changed` and `tf.to_seconds` read a text written in the script at compile time; `request.security` also reads the one it is given when it runs.
E-TS-ZONEERROR`clock.timestamp(text)` without a time zone.
E1001ERRORA text is not closed.
E1002ERRORA tab in indentation.
E1003ERRORA colour is not written #RRGGBB or #RRGGBBAA.
E1004ERRORAn unexpected character.
E1005ERRORA line is indented to a width that no block above uses.
E1006ERRORA bracket is not closed, or has no opening bracket.
E1007ERRORA number is not written correctly.
E1008ERRORAn unknown escape in a text.
E1009ERRORNot shown on this site.
E1010ERRORA { or } in an f-text is not closed or not doubled.
E1011ERRORA Persian or Arabic digit (quick fix: the ASCII digit).
E1012ERRORAn Arabic comma or semicolon (quick fix: the ASCII sign).
E1013ERRORA curly quote (quick fix: the ASCII quote).
E1014ERRORA look-alike sign such as a multiplication or minus sign (quick fix: the ASCII operator).
E1020ERRORNot a valid clock time.
E1021ERRORNot a valid date or time.
E1022ERRORNot a time zone the chart knows.
E1023ERRORNot shown on this site.
E1090ERRORThe source is too large.
E1091ERRORThe source has too many tokens.
E1092ERRORA line is too long.
E1093ERRORBrackets or indentation nested too deep.
E2001ERRORAn if used as a value has no else.
E2002ERRORSomething other than what the grammar expects here.
E2003ERRORA block is not indented under its first line.
E2004ERRORA block has no line.
E2005ERRORA statement does not end at the end of its line.
E2006ERRORA value was expected.
E2010ERRORA chained comparison.
E2011ERROR= where == was meant.
E2021ERRORAn unknown number format in an f-text.
E2030ERRORAn input has neither a type nor a literal default.
E2031ERRORAn option is repeated, or a positional value follows a named one.
E2032ERRORNot shown on this site.
E2041ERRORNot shown on this site.
E2050ERRORA match arm without =>.
E2051ERROR_ is not the last arm of a match, or is given twice.
E2052ERRORNot shown on this site.
E2070ERRORAn import without a version and an alias.
E2072ERRORAn input is written inside a block (an `if`, a loop, a function) instead of at the top level of the file or in a group.
E2073ERRORA group lists something other than inputs.
E2074ERRORA session declared inside a block, not at the top level of the file.
E2080ERRORThe file does not start with a header.
E2081ERRORThe header is written twice.
E2082ERRORA header option or a line of a block is given twice.
E2090ERRORAn expression nested too deep.
E2099ERRORToo many errors: the list stops.
E2100ERRORNot shown on this site.
E2102ERRORA block (`setup:`, `execution:`, `margin:`) is written twice.
E3101ERRORA name is declared twice in one function.
E3102ERRORA value is given to a name that is not declared.
E3103ERRORA value is given to a let, an input, a parameter or another name that cannot change.
E3104ERRORA function gives a value to a mut or state declared outside it.
E3110ERRORA type that an input cannot have.
E3120ERRORAn id is used twice.
E3121ERRORKey or was is not a text written in the script.
E3130ERRORAn option, argument or field that does not exist.
E3131ERRORA value that does not fit the option, or that must be written in the script.
E3132ERROR`future = true` in a strategy (it would trade on prices it could not have seen).
E3133ERRORA show_if or check that uses something other than inputs and constants (a let, a series, a function that keeps state, a list).
E3134ERRORA show_if that depends on itself through the inputs it names.
E3135ERRORA setting of a block (`setup:`, `execution:`, `margin:`) uses a series, a `let` or a call that keeps state: only inputs and constants of the chart are allowed.
E3136ERRORA block (`setup:`, `execution:`, `margin:`) in a file that is not a strategy, or inside another block.
E3140ERRORReturn outside a function.
E3141ERRORA function returns another number of values than its type says.
E3142ERRORBreak or continue outside a loop.
E3143ERRORA tuple of one length is given to another number of names.
E3144ERRORReturn, break or continue leaves a block that gives a value.
E3150ERRORNot shown on this site.
E3151ERRORA function is used before its definition.
E3160ERRORA call of a function the chart does not know.
E3161ERRORMore arguments than a function takes.
E3162ERRORA named argument the function does not have.
E3163ERRORFewer arguments than a built-in function needs.
E3164ERRORAn argument given twice.
E3170ERRORNot shown on this site.
E3171ERRORA name that is not declared.
E3172ERRORA name that a module does not export.
E3173ERROR`a[i]` on an array: it reads the history of the array, not its item.
E3180ERRORA strategy size or fee helper outside the strategy header.
E3190ERRORAn edition this build does not support.
E3200ERRORUses takes something other than texts written in the script.
E3201ERRORAn empty array whose element type is not known.
E3202ERRORAn array written out with too many items.
E3210ERRORA built-in function was called with fewer arguments than it needs.
E3211ERRORThe `once` value of `alert.send()` is not one the chart knows.
E3251ERRORA session that starts and ends at the same time of day.
E3260ERRORA session used as a value, not through one of its members (`.active .start .end .index .high .low`).
E3261ERROR`prior(…)` or `current(…)` used without a field (`prior(day).high`).
E3270ERRORA unit word (`ticks`, `ms`) outside a setting of `execution(…)` in the strategy header.
E3271ERRORNot shown on this site.
E3280ERROR`state session` without the name of the session while the script declares several.
E3281ERROR`state session` in a script that declares no session.
E3301ERROR`data.*` or a stateful call (`tech.*`, a function that keeps state) inside a loop.
E3302ERRORA call that keeps a state stands directly in an operand that runs only when it is needed: the right side of `and`, `or` or `??`, or an arm of `if … then … else`.
E3310ERRORA function calls itself, directly or through other functions (methods included); the message lists the cycle (`a -> b -> a`).
E3400ERRORA name you declared is also an option word of the slot it stands in, and has another type: your variable wins, the slot is a mismatch.
E3406ERRORAn option word of several sets (`top`, `left`, `none` ...) where nothing says which set: write the type, `let s: v_align = top`.
E3407ERRORA word the option slot does not have, with the nearest word and the list (`style = dashd`).
E4001ERRORAnother symbol has no data on this chart.
E5000ERRORThe engine refused a program the front end accepted (its own message).
E5001ERRORAn internal error of the front end or the formatter.
E5101ERRORA session must be declared at the top of the script (not inside if, for or a function).
E5102ERRORAlert.send(… = …) must be written in the script (a text or a number), not computed or read from an input.
E5103ERRORNot shown on this site.
E5104ERRORId must be a name written in the script, as a text: letters, digits and _, starting with a letter or _.
E5105ERRORWas must be a text written in the script: the earlier id, or several separated by spaces.
E5106ERRORWas: "…" is not a name.
E5107ERRORWas: "…" is the id itself.
E5108ERRORThe id "…" is already used by ….
E5109ERRORAn input's default value must be a constant.
E5110ERRORThe options of an input are a list in brackets: [a, b, c].
E5111ERROREvery option of an input must be a constant.
E5112ERROR…(…) must be called on the top level of the script (not inside if, for or a function).
E5113ERRORLevel(…) must be called on the top level of the script.
E5114ERRORLevel(…) needs a constant price (a number or an input).
E5115ERRORShade(…) must be called on the top level of the script.
E5116ERRORNot shown on this site.
E5117ERRORAlert.when(…) must be called on the top level of the script (not inside if, for or a function).
E5118ERRORAlert.when(…, on = …) must be the text "rises" or "level", written in the script.
E5119ERRORData.series needs an expression to read.
E5120ERROR"…" is already declared here; give it a new value with :=.
E5121ERRORA return is only valid inside a function.
E5122ERROR"…" is not declared; declare it with = first.
E5123ERROROnly a variable or a field can be given a new value.
E5124ERRORFunctions are defined at the top level of a script.
E5125ERRORParameter "…" is listed twice.
E5126ERRORThe library "…" is not in your scripts. Add it under My scripts (as a library) and try again.
E5127ERROR"…" is a function: call it with ( ).
E5128ERROR"…" is not declared.
E5129ERROR"…" is not a member of ….
E5130ERROR"…" is a function: call it with ( ).
E5131ERROR"…" is not a built-in variable this chart knows.
E5132ERROR… takes at most … argument….
E5133ERROR… has no argument "…".
E5134ERRORCreate a … with ….new(…).
E5135ERROR"…" is not a function this chart knows.
E5136ERRORThe library "…" has no function "…".
E5137ERROR"…" is not supported on this chart yet.
E5138ERROROnly names can be called.
E5139ERROR….copy takes the object to copy.
E5140ERROR"…" is not a method this chart knows.
E5141ERRORThis constant is built from other constants too many times over (each one is used twice or more by the next). Put a value in a variable once and use that.
E5142ERRORThis is a library: other scripts import it; it does not draw on its own.
E5601ERROR"…": the … is na.
E5602ERRORIndex … is out of bounds (array size is …).
E5603ERROR"…": the size cannot be negative (…).
E5604ERRORCannot call "array.pop" on an empty array.
E5605ERRORCannot call "array.shift" on an empty array.
E5606ERROR"array.slice": from (…) is after to (…).
E5607ERRORNot shown on this site.
E5608ERROR"map.set": the key is na (a map key must have a value).
E5609ERRORRow … is out of bounds (the matrix has … rows).
E5610ERRORColumn … is out of bounds (the matrix has … columns).
E5611ERROR… … is out of bounds (the matrix has … …).
E5612ERROR… … is out of bounds (the matrix has … …).
E5613ERROR"…": from_… (…) is after to_… (…).
E5614ERROR"…" needs a square matrix (this one is …x…).
E5615ERROR"matrix.new": the size cannot be negative (…x…).
E5616ERROR"…": the array has … elements but the matrix has … columns.
E5617ERROR"…": the array has … elements but the matrix has … rows.
E5618ERROR"…": the matrix has no rows.
E5619ERROR"…": the matrix has no columns.
E5620ERROR"…": a …x… matrix (… elements) cannot become …x….
E5621ERROR"…": the matrices have … and … columns.
E5622ERRORNot shown on this site.
E5623ERROR"…": the first matrix has … columns but the second has … rows.
E5624ERROR"…": the matrix has … columns but the array has … elements.
E5625ERROR"…": the power cannot be negative (…).
E5626ERRORA table needs a number of columns and rows.
E5627ERRORUnknown pivot point type "…" (Traditional, Fibonacci, Woodie, Classic, DM or Camarilla).
E5628ERRORTech.pivot_levels: "developing" cannot be true with the Woodie type.
E5629ERRORCannot set "…" of na.
E5630ERROR"…" cannot be set here.
E5631ERROR"…" is not a field of this value.
E5632ERRORCannot call "…" on na.
E5633ERRORA … has no method "…".
E5634ERRORThis script is an indicator: only a strategy (a strategy header at the top) places orders to test.
E5635ERRORCannot call "…" on na (the … was never created).
E5636ERROR"…" needs …, not a ….
E5637ERROR….
E5638ERRORThe script stopped (log.abort).
E5639ERRORThe script calls itself too deeply.
E5640ERROR….
E9001ERRORNot shown on this site.
E9002ERRORNot shown on this site.
W-ENGINE-ALERT-CUTWARNINGThe message of an alert is cut to … characters.
W-ENGINE-CONST-ARGWARNING… … must be a constant written in the script; it stays at its default value.
W-ENGINE-CURRENCY-RATEWARNINGNot shown on this site.
W-ENGINE-HISTORY-OPENWARNINGDynamic lookback has no declared upper bound; execution is limited to … bars (an offset nothing in the script bounds: an input without a `max`, a parameter).
W-ENGINE-HTF-NOT-LOADEDWARNINGThe … bars are not available yet; data.series reads na.
W-ENGINE-HTF-RESAMPLEDWARNINGThe … bars are built from the chart's own bars (the market server sent none): they reach only as far back as the chart does.
W-ENGINE-INDICATOR-TIMEFRAMEWARNINGIndicator(timeframe=…) is not supported yet: the script runs on the chart's timeframe.
W-ENGINE-LIBRARY-CHANGEDWARNINGThe library "…" changed since this script was last saved (… -> …); the script may behave differently.
W-ENGINE-LIST-INPUTWARNINGThe list of the input "…" cannot be read as a list: it is empty here.
W-ENGINE-LOG-DROPPEDWARNING… log lines were dropped: a bar keeps … lines and a run ….
W-ENGINE-LOWER-TFWARNINGData.series of a lower timeframe reads the chart's own bars here.
W-ENGINE-LOWER-TF-FORMWARNINGData.intrabars reads the chart's own bar here (lower timeframes are not loaded).
W-ENGINE-OTHER-SYMBOLWARNINGData.series can only read this chart's symbol here; another symbol reads na.
W-ENGINE-RANDOM-SEEDWARNINGMath.random draws from the run seed … (script = its identity: the host's id, else the title of the header): the same identity, inputs, explicit seed and dataset id give the same numbers on every machine, whatever the text of the script is.
W-ENGINE-REQUEST-NAWARNING… is not available on this chart; it reads na.
W-ENGINE-SOURCE-DEFAULTWARNINGNot shown on this site.
W-ENGINE-STRATEGY-NOT-SIMULATEDWARNINGStrategy orders are not simulated on the chart: open the Strategy tester to test it.
W-ENGINE-TEXT-CUTWARNINGA text of a label, box or table cell is cut to … characters.
W-ENGINE-TICKER-KINDWARNINGThe chart kind "…" is not applied here; data.series reads the ordinary candles.
W-ENGINE-VWAP-NO-VOLUMEWARNINGTech.vwap reads na: the bars of this chart have no volume.
W-ENGINE-ZONE-UNKNOWNWARNINGThe time zone "…" is not known; it is read as UTC.
W-FTEXT-PLACEHOLDERWARNINGAn alert placeholder written in an f-text.
W-FUTURE-READWARNINGA read of another timeframe asks for the future (`future = true`) on a value that is not shifted: a warning with the line and the fix; an info note when the check cannot follow the value.
W-ID-ANON-NONASCIIWARNINGA plot whose id comes from its position.
W-ID-COLLISIONWARNINGNot shown on this site.
W-ID-LOOKALIKEWARNINGA name uses an Arabic letter that looks like a Persian one.
W-INT-BOOLWARNINGA number used as a condition.
W-LIVE-READWARNINGA read that shows the forming bar of another timeframe (`live = true`).
W-MATCH-OPENWARNINGA match that does not cover every case.
W-METHOD-SHADOWS-BUILTINWARNINGA method of the script takes the place of a built-in one.
W-MUT-COUNTERWARNINGA mut counter that starts again every bar.
W-NA-COMPAREWARNINGA comparison with na, which is never true.
W-OBJECT-LIMITWARNINGDrawings, sloped fills or tables were dropped to keep the newest ones, or a drawing limit was cut to what the chart allows.
W-REPAINTWARNINGThe replay found a closed bar whose figures changed (error level) or a signal that came late (warning level).
W-SHADOW-BUILTINWARNINGA name hides a built-in name.
W-SHADOW-GLOBALWARNINGA name in a function hides one declared outside it.
W-UNMODELLEDWARNINGA setting the engine takes and does nothing with (the text says which and why).
W3302WARNINGA call that keeps a state stands in a block that may not run (an `if` or `else` block, a `match` arm, a `state` initializer, the lines after a conditional `return`, `break` or `continue`): legal, and its state moves only on the bars where the block runs.