RoboForex – Professional services on Forex market

What is MagicNumber?


Recommended
VPS-servers
More →
How to get a license

for free!

More →
Crypto exchange
Crypto Wallets
More →

VR Stealth Pro - an adviser invisible to the broker
VR Stealth Pro - an adviser invisible to the broker

Icon of the program version Version: 16.120

Icon program update date Updated: 13.12.2016

Icon date the program was added Added: 10.09.2014

License: Free

One-time purchase: 0$

Rent: from 0$

The expert Advisor's interface is intuitive and easy. The EA hides the take Profit, Stop Loss, Breakeven, and Trailing Stop trading levels.

VR Trade Panel - online trading? Easy!
VR Trade Panel - online trading? Easy!

Icon of the program version Version: 16.120

Icon program update date Updated: 22.12.2016

Icon date the program was added Added: 17.11.2014

License: Shareware

One-time purchase: 0$

Rent: from 0$

Multi-functional trading panel with the ability to work in two modes, virtual and real. Easy and reliable order management directly on the chart! Instant closing of all orders or just a flip

Forex – Crypto Advisor VR Black Box
Forex – Crypto Advisor VR Black Box

Icon of the program version Version: 24.120

Icon program update date Updated: 04.12.2024

Icon date the program was added Added: 22.08.2017

License: Paid-Free

One-time purchase: 122$

Rent: from 30$

The trading strategy is similar to the swing strategy, if we made a wrong purchase, then we make a sale. Algorithms for protection against high-risk situations is an interesting feature of this program. VR Black Box uses real Stop Loss and Take Profit levels, and can also use virtual levels, while using real levels, the expert adviser hides virtual levels. I started developing this trading strategy in 2009. A large number of improvements and modifications have been implemented in the VR Black Box expert adviser over this more than ten-year period.

MagicNumber

What is MagicNumber in a trading robot?

MagicNumber is the same as Magic or Magic number - this is a unique number written by the trader in the settings of the trading robot. The number can be either negative or positive. In most cases, MagicNumber is already specified by the programmer in the default settings. You can view the work of the trading robot with MagicNumber using link.

Russian video description "What is MagicNumber?"

What is MagicNumber used for?

MagicNumber is used to recognize orders, transactions, positions on the principle of "yours - someone else". Each trading robot marks its transactions, positions, orders with one unique number - MagicNumber. Further, in the process of work, in order for the trading robot to find its trading orders, transactions, positions, it is enough to search by the MagicNumber value. This is how each trading robot works only with its own trading orders and excludes from its attention the trading orders of another trading robot.

When should you change MagicNumber?

MagicNumber should be changed in the settings of the trading robot if a trading robot with exactly the same MagicNumber has previously or is currently working on the trading account. Regardless of the financial instrument on which trading applications are located, the best and most reliable solution will be a unique MagicNumber for each trading application.
Most trading applications calculate the trader’s trading statistics and trading results by selecting orders, transactions, positions according to the number specified in the settings MagicNumber. To start keeping statistics from the very beginning, you can change the MagicNumber to another unique number.

MagicNumber

Which MagicNumber should I set?

The best solution to bet MagicNumber will be your favorite numbers that you will never forget. The number can be anything, the main thing is that it is greater than 0.

What types of MagicNumber are there?

  • 0 - this number marks all orders, transactions and positions opened and created manually by the trader through the standard tools of the MetaTrader terminal. It is important to emphasize that only orders, transactions, and positions created by the standard tools of the MetaTrader terminal are marked with zero. When using trading robots, trading panels, and other trading applications, the creation of a trading order with MagicNumber equal to 0 is not guaranteed.
  • -1 - this number is used in trading robots and trading panels for the MetaTrader terminal in cases where you need to gain access and control to absolutely all orders, transactions, positions, regardless of the method or trading application they were created. It should be noted that not all trading robots and trading panels are able to take into account the MagicNumber value equal to -1. The best solution would be to clarify this information with the developer of the trading robot or trading panel.
  • More than 0 - numbers such as 1, 23, 56, etc. mark all orders, transactions, positions in the normal standard mode of operation of a trading robot or trading panel.

Are there applications without MagicNumber?

In some trading applications or trading robots, the logic and operation of the trading strategy is structured in such a way that it requires the use of several MagicNumbers. Typically, programmers in such cases hide the MagicNumber setting from the settings window of a trading robot or application.

Errors when working with MagicNumber

The most common and common mistake made by traders is changing the MagicNumber during the operation of a trading robot or trading panel. It turns out that when the MagicNumber is changed, the trading application “forgets” and excludes from its control transactions, orders, positions previously opened with a different MagicNumber.
The next mistake is setting up trading applications with the same MagicNumber, as a result of which several trading robots and trading panels take control and control not only of their own trading orders, but also of the trading orders of other trading applications. As a result, a conflict of trading applications occurs on the trading account, which can manifest itself in different ways:
- Frequent opening and closing of positions;
- Frequent changes in StopLoss and TakeProfit;
- Frequent deletions of trading levels;
/> - Removing or moving graphic elements of the interface of trading applications;

Do I need to include the MagicNumber setting in the optimization of a trading robot?

There is no need to include the MagicNumber setting in optimization. This setting does not affect the trading results of the trading robot in any way. The MagicNumber setting is not involved in any way in the operating logic of an automatic trading strategy or trading robot and has no impact on the final result of the trading application. This is why competent programmers in most cases prohibit optimizing MagicNumber.

Code and filter for MagicNumber in the trading application code

In most cases, MagicNumber is used only as a filter when selecting trading orders, deals and positions for further work with them.
Code example:
if(pos.Magic() == MagicNumber || MagicNumber = = -1) // If the position is opened by this robot or the trader has set up work with absolutely all positions.

MagicNumber what's the result?

MagicNumber is an important setting for a trading application that helps trading robots and applications determine what or who created trading orders on the trader’s account.

Comments

To write a comment, log in Enter
Registration

Login

Password recovery Registration
Login

Password recovery Registration
Password request

If you forgot your password, enter your e-mail. The control line for changing the password will be sent to you by e-mail.

A link has been sent to your email address to confirm the E-mail address. To complete the registration, follow this link.

If you have not received an email to your email, check the Spam folder. If there is no letter there either, then contact us.

Registration completed successfully!

You have successfully logged in to the site!

We use both our own cookies and third-party cookies for the purpose of analysis, as well as to display ads based on your preferences, in accordance with your browsing habits and your profile. For more information, please see our Privacy Policy.
Even more in the Telegram community Send us a message