Guía de Usuario

Data Types
NetTradeX PC
NetTradeX Android
NetTradeX iOS
NetTradeX Mobile
NetTradeX Advisors
Data Types

The NetTradeX language has the following built-in data types:

Data type: Range: Description:
int8 от -128 до 127 Integer data types
int16 from -32768 to 32767
int from -2147483648 to 2147483647
int64 from -9223372036854775807 to 9223372036854775807
uint8 from 0 to 255 Unsigned integer data types
uint16 from 0 to 65535
uint from 0 to 4294967295
uint64 from 0 to 18446744073709551615
float from -3.402823466e+38 to 3.402823466e+38 Float data types
double from -1.7976931348623158e+308 to 1.7976931348623158e+308
bool true, false Logical data type
color from 0x000000 to 0xFFFFFF Color constant
string not applicable The sequence of characters enclosed in quotation marks
datetime from 0 to 2147483647 Data type for storing time/date

The name of each type is a keyword and cannot be used as an identifier.

When compiling scripts the conversion of the data from one type into another may be needed. To do this, use the following syntax: new_type_variable = new_type (variable_of_the_converted_type);
Example:

int Run()
{
	int8 a = 33;
	System.Print("a="+a); // Displayed a=!
	System.Print("a="+int(a)); // Displayed a=33
	return (0);
}	

The keyword extern is used for the declaration of global variables, extern should be placed before the type of a variable. Global variables are accessible from any part of a script.

Example of declaration of a global variable:

extern int openDeals = 0;