FAQ | NetTradex Advisors | Expert Advisors | Program Trading | IFCM UAE
IFC Markets Online CFD Broker

Frequently Asked Questions

I'm going to set up NetTradeX Advisors on another computer, how can I export all my scripts*?

All NetTradeX Advisors scripts are stored in the Documents\NeTTradeX Advisors\scripts folder. After the installation of the terminal on another computer, you need to copy all the contents of this folder into the corresponding folder on the new computer and restart the terminal.

I have created an indicator but the line is interrupted. How can I have the indicator line displayed without gaps?

To output lines without gaps, use the SetIndexStyle function with the type parameter that has ltSection value.

I start an expert, but it stops in a few seconds; the Journal shows the "stopped by timeout" message. Why does this happen?

Once a tick comes, the expert should perform all the logic of the program within a limited time frame (60 seconds). When the limit is exceeded, the expert stops forcibly, and 3 additional seconds are given to the expert to complete the work. It is recommended to analyze the state of System.IsStopped flag for the expert to correctly complete its work. When the expert stops, the user recieves "stopped by timeout" message. In that case the program should be processed so that its execution takes less time.

I'm sending a request for opening a position by using the Deals.Open() function, but the position will not open. How can I understand why this is happening?

Having made sure that the Deals.Open() function returns zero, you need to access the System.LastError property and receive the error code. Description of error codes is provided in the user manual in the section "Basics" – "Error Codes". Please pay attention to the fact that the property System.LastError should be accessed immediately after a trading function call, otherwise the subsequent trading operation will change that property in accordance with the results of its work

I made a deal or placed an order and I am trying to receive its properties, but the resulting values are incorrect.

To access properties of a deal or an order, you should first call the Select() function and, having made sure that Select() has returned true value, refer to the deal or order properties.

How can I determine the type of a pending order (Buy stop or Buy limit)?

To determine the type of a placed order, you need to access its properties after calling the Select() function. There are two conditions that must be met for the Buy Stop order: Orders.Direction == opBuy and Orders.IsLimit == false, respectively, for the Buy Limit order – fulfillment of the following conditions is required Orders. Direction == opBuy and Orders.IsLimit == true.

What is the SubType property (order subtype)?

The Order subtype property is used for 'complex' orders and allows identifying which order is the main and which one is subordinate. For example, in case an activation order is present and it is triggered so that the two OCO orders are set, the activation order will be the main order (order level 1) and the OCO orders – subordinates (order level 2).

I need to open a position on a certain symbol. I opened the "Make deal" window, but it did not have the symbol that I needed.

The deal symbol list in the opening position dialog window contains the same symbols as the Market Watch window. Therefore, before sending a request for opening a position, make sure that you are subscribed to the necessary symbol in the Market Watch.

How can I have information about the profit of the positions I closed yesterday or a few days ago?

Information on closed positions is shown on the History tab in the NetTradeX Advisors terminal. These positions can be accessed by means of the History object. Information on closed positions is kept until the terminal is restarted.

I'm invoking the function Symbols.Distance() but I receive zero minimum order distance.

Before calling the Symbols.Distance() method, you must subscribe to the needed symbol in the Market Watch.

What system functions must be present in a script*? If I do not need to take any steps during initializing and deinitializing, can I remove the corresponding functions?

To run a script the Run () function is necessary. The functions Initialize () and DeInitialize () are optional and if no steps are required at initialization and deinitialization, they can be excluded from the program.
In some cases, such as creating files with descriptions of auxiliary user functions, there may also be no Run() function in the script. These files can be compiled, but not executed. Such scripts are used together with the #include > directive and are included in the code of the executable scripts.

Is there any log file that keeps information on the program work?

Yes, all information displayed on the Journal tab is also stored in the log file, which is located in the Documents\ NetTradeX Advisors\ bases\ account_type\ account_number\ logs. . There is a separate file with a log for each day. This file can be opened in a text editor.

Why do some global variables have the 'extern' modifier in front of them?

A global variable can be declared with the extern modifier and without it. If the extern modifier is present, after running the script, a window for changing such parameters will be opened. In addition, these parameters can be changed on the fly when an advisor or indicator is running.

What useful key combinations exist for working with the program?

Pressing the Ctrl+N key combination opens a list of symbols available for creating a quotation chart.
While working with charts, you can use the + and - keys on the numeric keypad to change the scale of the chart horizontally. The same operation can be performed when the cursor is on the time scale and the user holds the left mouse button and moves the mouse to the left or right. To change the vertical scale, move the cursor on the price scale, hold the left mouse button and move up or down.
To display the price chart for the most distant date, you can press the Home key, and to access the latest quotations – End key.
A double-click on an empty field of the Open Positions tab will open the deal window, and a double-click on an empty field of the order tab – the order setting window. The same operations can be performed by pressing F4 (making a deal) or F3 (setting an order).
It is convenient to change values of numeric fields in the making deals or setting orders dialog windows by turning the mouse wheel. For example, when setting prices for linked orders, the turn of the wheel by one step changes the price by one point.

I perform integer division System.Print("2/3="+2/3), the result is 2/3 = 0, why is this happening?

Since both operands are integers, the result of the division operation will be an integer, so you must convert one of the operands to the double type as follows: double(2)/3, the result will be 2/3 = 0.666667.

Where are stored global variables of the user terminal?

Global variables can be seen through "Global Variables" window, which can be called from the menu View – Global Variables. Note that each account has its own global variables.

How to determine the price of the last fractal?

When using the method of Indicators.Fractals, it is useless to try getting the value for the last bar, as they will be zero. Reliable values of fractals are generated, beginning from the fourth bar (the bar with index 3), since, in this case, two fully formed bars will be used per each side of the required bar.

How to compare double figures?

Figures in computer memory are saved in binary system of calculation. Because of that many figures, specified in decimal system, can be presented only as continued fraction. For example, a figure, given as 0.1, in fact, can be equal to 0.09999999. That is why using a double equality for comparing figures with floating point, is not correct. It is better to use Math.Abs(a - b) < delta mathematical method, where 'a' is the resulted value, 'b' - the value with which the comparison is performed and delta - an absolute error.

Ready to start trading?

Corporate clients, for you here
Individual
Latin letters only
Close support
Call to WhatsApp Call to telegram Call Back