forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Expert Advisor Studio → Identify Expert Advisor within a Portfolio of Expert Advisors

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 11

Topic: Identify Expert Advisor within a Portfolio of Expert Advisors

I have recently purchased the software license, thanks for the great development work.

I have a concern, when I use FXBLUE to track Expert Advisors separately I see their Magic Number, I can disable them from the code with the sequence //

But I don't know how to identify that expert advisor in the program: What is its ID? For example, if I have a bot with a magic number 100001, what is its ID, for example ID545.1

This is very important to create portfolios tested in demo in live market.

Could you help me?

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

The Magic Numbers of the experts or the individual strategies in a Portfolio Expert have no relation with the Id tags you see in EA Studio.

EA Studio does not use Magic Numbers.

> if I have a bot with a magic number 100001, what is its ID, for example ID545.1

Import the expert in EA Studio and it will receive an ID. It may be a completely new or an old one. EA Studio keeps a track of 10000 ID tags. They serve to identify your strategies in a collection within EA Studio.

>This is very important to create portfolios tested in demo in live market.

Import your portfolio in EA Studio, recalculate it and remove the strategies you do not want.

You may disable individual strategies from the portfolio by editing the Portfolio Expert code.

3 (edited by sleytus 2022-08-06 06:03:35)

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Popov wrote:

The Magic Numbers of the experts or the individual strategies in a Portfolio Expert have no relation with the Id tags you see in EA Studio.

EA Studio does not use Magic Numbers.

> if I have a bot with a magic number 100001, what is its ID, for example ID545.1

Import the expert in EA Studio and it will receive an ID. It may be a completely new or an old one. EA Studio keeps a track of 10000 ID tags. They serve to identify your strategies in a collection within EA Studio.

>This is very important to create portfolios tested in demo in live market.

Import your portfolio in EA Studio, recalculate it and remove the strategies you do not want.

You may disable individual strategies from the portfolio by editing the Portfolio Expert code.



I've encountered the same issue -- i.e. I wish to prune a portfolio EA based on a strategy's performance in a demo account.  A difficulty arises because demo accounts use MagicNumbers and EA Studio uses IDs.  How to reconcile the two?   Importing back into EA Studio doesn't solve the problem because I want to prune based on demo testing (and not on back-testing) and once imported back into EA Studio I lose track of which strategy I wanted to remove.

Here's one way to approach this...

1. Save the collection that was used to create a portfolio EA.
2. When trading, the portfolio EA uses MagicNumbers that are zero-based.  For example, MagicNumber 100001 is the 2nd strategy, MagicNumber 100011 is the 12th strategy, and so on...
3. There are two ways to prune -- for example, suppose you want to remove the 12th strategy:
    a. Reload the collection back into EA Studio and delete the 12th strategy.
                  or
    b. Edit the source code and delete or comment-out the 12th strategy and decrement the 'strategiesCount' global variable by 1.


Popov -- here's an idea, though I'm not sure whether it makes sense.  When a portfolio EA is created by EA Studio would it be possible to display both the ID and the MagicNumber for each strategy?  Under Portfolio / Content each individual strategy is displayed along with its ID.  Would it be possible to display the future MagicNumber along-side the ID?

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

> When a portfolio EA is created by EA Studio would it be possible to display both the ID and the MagicNumber for each strategy?

The ID numbers are meaningfull only for the current EA Studio session. They are completely dynamic. EA Studio calculates them every time a new strategy is generated or the application is restarted.

It is meaningless and even counterproductive to store them.


On the other hand, during the work on the new Generator ( https://forexsb.com/forum/topic/9057/im … generator/ ) I found a formula, which describes a strategy with a unique number.

Just now I realised it may be used for a Magic Number.

If I decide to use it, it will not be compatible with the current Portfolio Experts, which use a Base Number.

I may tray this idea later.

I'm going to upload new release of EA Studio this weekend. Stay tuned.

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Just spend 20 minutes to prototype such a feature.

Here is what it may look like:

https://image-holder.forexsb.com/store/eas-magic-number-sorting-idea-thumb.png

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Even the Generator calculates the Magic number gain smile))))

https://image-holder.forexsb.com/store/eas-magic-number-sorting-idea-generator-progress-thumb.png


To optimise the magic number? We can make a contest of the highest or smallest or a good looking Magic number smile

7 (edited by sleytus 2022-08-06 10:08:12)

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Popov wrote:

Even the Generator calculates the Magic number gain smile))))

https://image-holder.forexsb.com/store/eas-magic-number-sorting-idea-generator-progress-thumb.png

This is very interesting.  I don't know how many users are concerned with "pruning" a portfolio EA based on testing in demo account, but I would find this most helpful.  It would make it easier to use the results from demo testing and apply them to prune the collection in EA Studio.

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

We will probably need a new option for the Portfolio Expert: whether to use Base magic number (like now) or to use individual magic numbers from EA Studio.

The option may be in EA Studio or in the exported Portfolio Expert.

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Popov wrote:

We will probably need a new option for the Portfolio Expert: whether to use Base magic number (like now) or to use individual magic numbers from EA Studio.

The option may be in EA Studio or in the exported Portfolio Expert.

Yes -- either way works, though if I had a vote I would vote to make it an input option for the EA, with the default setting being to continue using the Base magic number.

This still would require you figure out a way to embed the unique MagicNumbers into the generated source code.

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Because the numbers are huge it will be very difficult to find the desired strategy even if they are sorted by Magic number.

Probably I have to sort the numbers alphabetically instead of numerically.

I'm not sure how useful this feature will be like that.

If we add search or a possibility to write a list of numbers to prune will be better.

An idea:

A possibility is to use the "Filter records" tool.
If we add a "Filter by magic number" field and we start writing down a number, the Collection to filter out the matching numbers dynamically.

11 (edited by sleytus 2022-08-06 15:07:00)

Re: Identify Expert Advisor within a Portfolio of Expert Advisors

Popov wrote:

Because the numbers are huge it will be very difficult to find the desired strategy even if they are sorted by Magic number.

Probably I have to sort the numbers alphabetically instead of numerically.

I'm not sure how useful this feature will be like that.

If we add search or a possibility to write a list of numbers to prune will be better.

An idea:

A possibility is to use the "Filter records" tool.
If we add a "Filter by magic number" field and we start writing down a number, the Collection to filter out the matching numbers dynamically.


Right -- I understand.  But at least the main problem would be solved -- i.e. how to "connect" a strategy that is traded by MT4/MT5 with the corresponding strategy in EA Studio.

Another possibility could be a 'Search MagicNumber' edit box -- i.e. enter a MagicNumber and EA Studio searches for the corresponding strategy in the collection.

Posts: 11

Pages 1

You must login or register to post a reply

Forex Software → Expert Advisor Studio → Identify Expert Advisor within a Portfolio of Expert Advisors

Similar topics in this forum