使用指南

Object System
NetTradeX PC
NetTradeX Android
NetTradeX iOS
NetTradeX Mobile
NetTradeX Advisors
Object System

void System.Print(const string& in str)

Putting a message to the log.
Example:

System.Print("Current time is: "+System.Time);

string System.ErrorDescription(int code)

textual error description, a code value - numeric error code, received via the property LastError.

void SetTimer(int time)

sets an interval in milliseconds between calling the function Timer() *

System properties

  • datetime Time - current trading time
  • bool TradeSessionIsOpen - trading session opening flag
  • int LastError - error code of the last trading function, is reset after calling the next trading function
  • bool IsConnected - returns the status of connection between the terminal and a server
  • bool IsStopped - returns true if a script has received a command to terminate execution, the script has 3 more seconds for execution, otherwise it will be stopped by the terminal.
  • bool IsDLLAllowed - returns true if the user allowed using dll files, otherwise else is returned.

* The function Timer() is called automatically by the terminal each time milliseconds, specified by the method SetTimer().

int i=0;
int Initialize()
{
  System.SetTimer(100);
  return(0);
}
int Run()
{
  return(0);
}
int Timer()
{
    System.Print("i="+i);
    i++;
    return 0;
}