Topic: Encoding Magic number

Hello Traders,

I'm trying to make the Portfolio feature in EA Studio better. In more details, I want to make a Portfolio Editor to be easier to edit, filter or merge portfolios.

Currently a Portfolio Expert works with a dynamic magic number. It is set at the portfolio expert start in the form of a Base magic number. It works well for now, however I want to make it possible to merge strategies from different portfolios with keeping the strategies magic numbers unchanged. This will work probably better, if EA Studio sets the magic number at the export of the expert.

My idea is to encode some meaning in the number. I checked the MQL docs and found out that the maximal magic number for MT4 is 2147483647 (10 digits).

Here is a possible magic number format:

sssp0cc0nn

where:
sss - the symbol
p - the period
cc - the collection number
nn - the strategy number.


I think that we can preset the most used symbols (customizable of course)

Symbols:

EURUSD 101
USDJPY 102
GBPUSD 103
GOLD     151
SILVER   152
BTCUSD 201
...

Periods:

M1  - 1
M5  - 2
M15 - 3
M30 - 4
H1  - 5
H4  - 6
D1  - 7
MN1 - 8

Example:

1014034056

101 - EURUSD
4 - M30
34 - a collection number 34
56 - strategy number 56 in the current collection.

...

The idea is that EA Studio generates and sets static magic number for each strategy. Later these strategies can be merged in one collection with their original magic numbers.

Please comment and give ideas.

Re: Encoding Magic number

Excellent idea to fix the magic number as that would make retrieving EA much easier.

I suggest the same method, a base prefix number user define, e.g. user can input whatever base or prefix number just like before and the generate will create the last 3 digits (001 to 100).  So if I put 123 as the prefix EAS will generate magic number 123001, 123002 until 123100, etc.

I prefer this old method as I can keep track of my own numbering system better.

Re: Encoding Magic number

So if I put 123 as the prefix EAS will generate magic number 123001, 123002 until 123100, etc.

We can make EA Studio keeping track and suggesting the base numbers automatically.

It can be set in the expert like that:

   // MAGIC NUMBER 123056
   // MARKET EURUSD 30 2018-11-03 10:30 
   // STRATEGY CODE {"properties":{"entryLots":0.1,"stopLoss":100,...
   signalList[i++] = GetExitSignal_123056();
   signalList[i++] = GetEntrySignal_123056();
   ...

The magic number, the market and the date will help later to show the trading performance on the new data.

4 (edited by ViniQ 2018-11-19 14:38:26)

Re: Encoding Magic number

Hello Popov & Community.

I have tough about it and my suggestion is I prefer a button that will rename all Magic Numbers in my collection starting with a base number.

Detailed Explanation
In Collecion > Strategies Card: Show magic numbers
In Collection > Action Buttons : Create a new button "Rename" that will call a modal with options.

How the rename magic expert would work?
It start on a number and goes sum +1 until the end of the colection.

Eg: The user clicks on "Rename All Magic Numbers", input the value "10300000";
All the strategies in the collection will be renamed to 10300000 until 10300099;

Why 10300000 ?
It's because I LIKE to use this encode "XYZZWWWW"
X= Symbol
Y= Type of strategies (0-long, 1-long trending, 2-long mean reversion, 3-short...)
Z= Time Frame
W= Number of the strategies

https://i.imgur.com/euwLQtf.png


Do you feel me? Give this power to the user.
If they can't think on a encode by itself use a default.

Vinicius Pereira, Portuguese Support. Olá se precisar de ajuda entre em contato segunda à sexta: 09:00-18:00; via direct MP, e-mail ou acesse (Pt) Grupo TelegramMQL5 Profile