Usefulness (or not) of the magic number with MQL5. - page 2

 
at same time
 
angevoyageur:

I don't understand your argumentation. You said 'no way' and then 'the only way', this is a contradiction. In general MQL5 is more difficult to master, and a lot of thing can be done more easily with MT4. I don't think anyone would argue about that. Against that mql5 brings to us a lot of new possibilities. But your starting question was "how" and "why" using magic number with mql5.

Why : the answer is the same a mql4. To use more than 1 EA with the same instrument.

How : it's another matter. VOM is an example, it has some limitation but it works, not ?

I don't see (or understand) any solid argument to prove that "using magic in mql5 is a pure idiotism". If you are right, I would like to understand.

1) to use two or more EAs on same instrument, you have two solutions:
a) use VOM. I don't see any essential limitations in using VOM. VOM is in no way connected with MT5 magic numbers, it uses it's own magic numbers. The problem with VOM is that it needs additional effort and time to use, code is larger and thereby more susceptible to errors.
b) use different accounts, but than you need more resources (more money, more computational power)

2) magic within MT5 can be used only in exclusive way: if no position is opened, open my position/if my position is opened, control it.
This can't work because:  

If you have a system that is trying to control a non-stationary stochastic process, by introducing another system that tries to work simultaneously with yours, by excluding of each other, you are completely negating the systems itselfs, as you are changing the domain of input data and events of systems in use.
 
graziani:
If you have a system that is trying to control a non-stationary stochastic process, by introducing another system that tries to work simultaneously with yours, by excluding of each other, you are completely negating the systems itselfs, as you are changing the domain of input data and events of systems in use.
If someone understand this sentence, please explain it. Negating which system ? What is "domain of input data and events of system in use" ?
 
angevoyageur:
If someone understand this sentence, please explain it. Negating which system ? What is "domain of input data and events of system in use" ?

I think the idea is that a Strategy works by itself, if there is a second Strategy working it can affect the performance of the first.  I only see this being the case in terms of money management.

What is being forgotten is that not all EAs are Strategies in their own right,  some can be trade manager type EAs and there may be legitimate reasons to run more than one of these on the same symbol. 

I would rather have the possibility to use a Magic Number, even if I didn't foresee how I might need it,  than to not have the option . . .  

 
RaptorUK:

I think the idea is that a Strategy works by itself, if there is a second Strategy working it can affect the performance of the first.  I only see this being the case in terms of money management.

Ok, but then it's not specific to mql5, the same can be true for mql4 or others platforms.

What is being forgotten is that not all EAs are Strategies in their own right,  some can be trade manager type EAs and there may be legitimate reasons to run more than one of these on the same symbol. 

Exact, but is this related to the discussion about magic number ? May be or not, I don't know.

I would rather have the possibility to use a Magic Number, even if I didn't foresee how I might need it,  than to not have the option . . . 

Absolutely.

Anyway the article mentioned above is about running the same EA, on the same instrument, but with different timeframes. I am currently testing it to see if it works.

Fast Dive into MQL5
Fast Dive into MQL5
  • 2012.08.02
  • MetaQuotes Software Corp.
  • www.mql5.com
You have decided to study MQL5 trading strategies' programming language, but you know nothing about it? We have tried to examine MQL5 and MetaTrader 5 terminal from the newcomers' point of view and have written this short introductory article. In this article, you can find a brief idea of the possibilities of the language, as well as some tips on working with MetaEditor 5 and the terminal.
 
graziani:

...

2) magic within MT5 can be used only in exclusive way: if no position is opened, open my position/if my position is opened, control it.
This can't work because:  

Where does this conclusion ? Magic in mql5 doesn't only apply to position but also to orders and deals. So I don't see why you claim that it can only be used in exclusive way. Unfortunately I have not yet put it into practice and can't prove if it works or not. But theoretically I don't see why that could not be done (several trading EA on the same symbol). May be there is practical issue, we will see.

 
angevoyageur:
If someone understand this sentence, please explain it. Negating which system ? What is "domain of input data and events of system in use" ?

you have a system/algorithm/EA which has input  (it's mathematical domain) from price action feed (which needs to be treated as non-stationary stochastic process). So by modelling this system and describing it with parameters, you are hoping that the price action feed will be stationary process long enough for you to make profit out of it. 

But if you share this price action feed with another system, your input feed has changed. So the results you will be getting are different, and this system will not function as expected.

I hope it's clear now. At least more clear. 

Why Is MQL5 Market the Best Place for Selling Trading Strategies and Technical Indicators
Why Is MQL5 Market the Best Place for Selling Trading Strategies and Technical Indicators
  • 2012.07.09
  • MetaQuotes Software Corp.
  • www.mql5.com
MQL5.community Market provides Expert Advisors developers with the already formed market consisting of thousands of potential customers. This is the best place for selling trading robots and technical indicators!
 
graziani: Due to new position system in MT5 (compared to orders in MT4), do you see any usage for MAGIC number? How would you use it? 
  • What if I want to differentiate a Manual_Trades from the Expert_Trades?
  • I've been using this Account for Years with different Experts. I want to make a Report of the total_profit from Expert_A, how do I differentiate Expert_A trades vs Expert_B trades in history.
  • I want to trade two different Experts which only Buys_EurUsd. I want them to have different money_management how do I differentiate?

In the above examples, I believe magic numbers would be useful. I agree with graziani that the use of magic# with simultaneous experts is now limited. I agree with angevoyageur that the purpose of the magic# remains un_changed. I agree with RaptorUK that having the option with magic# is good.

 
RaptorUK:

I think the idea is that a Strategy works by itself, if there is a second Strategy working it can affect the performance of the first.  I only see this being the case in terms of money management.

What is being forgotten is that not all EAs are Strategies in their own right,  some can be trade manager type EAs and there may be legitimate reasons to run more than one of these on the same symbol. 

I would rather have the possibility to use a Magic Number, even if I didn't foresee how I might need it,  than to not have the option . . .  

you have the magic numbers, but you don't have the possibility to use them for applying two different algorithms on same instrument.
 
angevoyageur:

Where does this conclusion ? Magic in mql5 doesn't only apply to position but also to orders and deals. So I don't see why you claim that it can only be used in exclusive way. Unfortunately I have not yet put it into practice and can't prove if it works or not. But theoretically I don't see why that could not be done (several trading EA on the same symbol). May be there is practical issue, we will see.

you have a position. how can you share a position between two experts/algorithms?

you need to check the history of deals. are you aware how complicated is that?

are you aware that if a position is closed by tp/sl, that deal doesn't have a magic?

where do we go from here?

of course it is possible to do almost everything! but at what cost?

are you really interested in solving all this problems instead of opening of another account?