The compiler rejected my script. Now what?

Read the message. It says what to change.

Every message names the problem, the line and the column, and says what to do. Many carry a one-click fix. Search this page for the code, such as AS0304, or browse Compiler Messages. The most common ones:

  • AS0201 a name the compiler does not know, usually a typo. It suggests the nearest name.
  • AS0302 a number with no unit where a distance is expected.
  • AS0303 and AS0304 an R target or a risk-based size with no stop to measure from.
  • AS0003 a tab used for indentation. Use spaces.
  • AS0401 something in the wrong kind of script, such as an order in an indicator.

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account