Error Messages

When you check your code for compliance with the syntax of the TeleTrader Language, the following error messages can be displayed:

Syntax error

You did not use the correct syntax of the TeleTrader Language. This message is often followed by additional explanatory text.

Array index error

You are trying to access the history of a parameter or variable, but you are not using a numeric value inside the square brackets to do this.

Conditional expression not Boolean

A command statement you are using needs a Boolean expression (for example If statements, While and Repeat loops), but the expression that you provide is not Boolean (a Boolean expression should have the logical value True or False as a result).

Function has no execution block

You have created a function without an execution block (BeginEnd.). Your function will do nothing.

Function has no return value and no output. Function does nothing

You have created a function that does neither return a value nor draw something on the screen.

Function redefinition

You are trying to use a function name that already exists. Change the name of your function.

Function which has no source parameter which provides time line cannot have Draw functions

You are using a drawing function inside your program. However, you have not defined a parameter of the type Numeric Field or Security that lets you apply your program to a security. In that case, you can only perform mathematical operations with your program. If you want to draw on the screen, declare a Source parameter for your security.

Identifier cannot be used as function

You are using a variable or parameter like a function call (for example Source(shift) or dev(period, deviation) – this is not possible.

Identifier is not L-value

You are using a parameter, constant or function call on the left side of an equation sign that is not allowed to be used there.

Loop end value is not numeric

You are using a non-numeric stop value in a For loop.

Loop end value is unreachable

You are using a stop value that is less than the start value in a For loop, and thus the end of the loop cannot be reached. (When the For loop is counting down using Downto: You are using a stop value that is greater than the start value.)

Loop start value is not numeric

You are using a non-numeric start value in a For loop.

Loop variable is not numeric

You are using a variable inside a loop that is supposed to be numeric, but has not been declared as such. For example, the counter variable of a For loop needs to be a numeric value.

NoDraw (or #) can only be placed in front of functions

You are using # in front of a variable or parameter. This feature can only be used for functions, where it will suppress the drawing of any elements and only return the calculated results of a function.

Record field error

You are trying to access an element of a security (for example its Close or Open value) that does not exist. Check for typos, or check if the parameter or variable you are using is correctly declared as Security.

This function cannot be array type

Some functions like CurrentBar cannot be used on past or future bars; using them in the form of CurrentBar[1] or similar will produce this error. You can use the expression CurrentBar1 instead.

Type mismatch

You are using a variable or parameter of the wrong type in your program. Check if you are for example trying to assign a text value to a variable that has been declared as numeric, or trying to pass a numeric value to a function that expects a Boolean parameter, etc.

Unknown identifier

You are using a variable or parameter that the computer does not know. Look for a typo or check if you have correctly declared all variables and parameters that you are using.

Value is not array type

You are trying to access the history of a value that has no history. For example, if you define a numeric parameter period that has been assigned a simple numeric value like 21, you cannot access its past value with period[1] because it has no history.

Value is not basic type

You are trying to use a basic value that has not been declared correctly.

Value is not record type

You are trying to access an element of a security (for example its Close or Open value), but the parameter or variable you are using is not of the type Security. Check if you have for example declared your parameter Source as Numeric Field instead of as Security.

Wrong number of parameters

You are making a function call, but using the wrong number of parameters in the function call (inside the round brackets): Check the Function Reference for the correct number of parameters.