Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

I've released a new version of MT4 Tracker...

Here's a link to the web site for MT4 Tracker: 
http://mt4tracker.com/mt4-tracker/

Here's a link to the documentation:
http://mt4tracker.com/documentation/mt4 … mentation/

I'm referring to the new version as a Beta release -- it is free to download and use. However, at the end of November 2017 the Beta program will end and the cost of the software will be $49 USD. For those who provided valuable feedback during the Beta release you can contact me via Private Message (PM) in the Forex Strategy Builder Forum and I will send a complimentary license key.

The link above uses a 'Buy Now' button.  When you press the 'Buy Now' button it will simply prompt for an email address.  A message will be sent to your email address that includes a download link plus a license key.

The Beta version has a few new features:
* Always Ignore Certain Magic Numbers
* Specify Custom Start / End Dates
* Analyze MT4 Strategy Tester Results Strategy-By-Strategy -- Requires Portfolio Maker (https://forexsb.com/forum/topic/7038/po … trategies/)

If you run into any problems please let me know by posting to this thread -- I will fix them right away.  Also, I do appreciate comments / feedback and will reward those with a complimentary license key when an official version is released at the end of this month.

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Hi sleytus,
I'm using the MT4 tracker a lot. I think it is really useful, not only for people using EA Studio, but for everyone trading several strategies in the same account. Thanks a lot for developing it... Hope this message will be of help.

When I use MT4 Tracker to prune one portfolio EA I've seen MT4 tracker comments out the stretegies we want out... But as it only comments the lines out and doesn't really remove the lines (the comments are in the file), when I import the pruned EA portfolio back in EA Studio Validator, the strategies I wanted out appear again in the Validator. This is a problem because it is difficult to see in EA Studio which strategies were the ones I wanted out. What I'm doing is removing (manually) the strategies that were commented out in the pruned Portfolio EA.
I think it would be a lot better if instead of just commenting out the strategies we want to prune, the tool simply removed them. If you want to mantain the comments just in case anyone is using them (), please, add a check (just like the remove not trading strategies) to remove the pruned strategies instead of commenting them out.

Another issue with portfolio trading is the trades that remain open when I'm pruning my portfolio EA. I've thought that it could be of help knowing which strategies have an open order inside MT4 Tracker. Maybe MT4 Tracker could just colour differently (for example in green) the strategies that still have an open order. I mean, as we have the MT4 report it may not be very difficult to find which strategies have an open trade inside this report (opened a trade that doesn't hace its close) and knowing this MT4 Tracker could just colour in a different color that strategy just to show those strategies still have open trades...

Hope these suggestions be of help
Best regards and thanks once more for your work on your very useful tools!

178

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

But as it only comments the lines out and doesn't really remove the lines (the comments are in the file), when I import the pruned EA portfolio back in EA Studio Validator, the strategies I wanted out appear again in the Validator.

It is true that the commented out strategies will appear at the input list of the Validator, but they will not be pushed to the Collection due to lack of profit.

The default Acceptance Criteria require minimum 10 deals and minimum 10$ of profit, so it is a guarantee that the non active or loosing strategies will not be accepted.

179 (edited by rjectweb 2017-11-17 17:20:59)

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Popov wrote:

It is true that the commented out strategies will appear at the input list of the Validator, but they will not be pushed to the Collection due to lack of profit. The default Acceptance Criteria require minimum 10 deals and minimum 10$ of profit, so it is a guarantee that the non active or loosing strategies will not be accepted.

Hi Popov, thanks a lot for commenting.

Well, what you say is true, but we must take into account that trades in MT4 (for whatever reasons) are not always exactly the same as the backtest in EA Studio and validation. In my experience, if I don't manually remove the commented lines in the Portffolio EA I end up having some of the strategies I wanted to remove.

In the end, once I have chosen / decided to remove some strategies from the Portfolio EA (and it may be for other reasons different from profit trades), once I have chosen to remove some strategies I think it would be better if they were removed. Having them commented out is not useful for me. When they are commented they may appear again, and that is why I think it would be better if they were removed instead of commented out (just remove the comment lines).

Furthermore, following this logic "if they were not profitable in the last trades they won't appear in the validation tool", we wouldn't need the MT4 tracker. Using Validation could be enough. However, I'm finding MT4 tracker very useful because it uses my MT4 report (real trades under real trading conditions) as input and pruning strategies based on that report is very convenient at least for me...

Thanks a lot again Popov for developing such great tools for us.
Warmest regards from Spain
RJ

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

EA identification numbers....

I would like to add a couple more digits to the numbers........... will that upset MT4 Tracker  or Profile Builder...?

Is there a limit?

Thanks

daveM

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

rejectweb wrote:

I think it would be a lot better if instead of just commenting out the strategies we want to prune, the tool simply removed them. If you want to mantain the comments just in case anyone is using them (), please, add a check (just like the remove not trading strategies) to remove the pruned strategies instead of commenting them out.

Excellent idea -- I will include a CheckBox in the next update (probably in a couple of weeks).  The default behavior will continue to use comments because I worry more about losing all records of a particular strategy.  If that strategy is removed by MT4 Tracker then it is gone for good.  And what if you later change your mind and want it back?  Good luck trying to find it in a collection -- if you even saved the collection.


rejectweb wrote:

Another issue with portfolio trading is the trades that remain open when I'm pruning my portfolio EA.

So -- this is a tough one.  The Account History *.html does keep track of "Open Trades" so, in theory, those magic numbers with open orders could be colored in green.  One problem, though, is the "Open Trades" information is only accurate at the moment the file is created.  If you use MT4 Tracker at some later time then that "Open Trades" information is stale and you'll still need to use the 'Trade' tab to check for open orders.  I'll have to think about this some more.  I'm not sure there is a good solution.  In my own experience I will either (a) take a deep breath and manually close the open trades (at a loss), or (b) remove the EA and let the open orders continue to run until they either hit a SL (or, if I'm lucky, a TP).

In Portfolio Maker I was able to partially address the "Open Trades" issue by adding some additional protection to the portfolio EA whereby I prevent it from opening any new trades but still allow it to run.  It does this by checking the Margin or Floating P/L.  I can then create a new portfolio EA that excludes the poor-performing strategies.  They can both run at the same time -- the first one doesn't open a new trades, but can close open orders.   The second one runs normally.

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Blaiserboy wrote:

EA identification numbers....

Metatrader 4 supports 32-bit magic numbers -- so, you should be able to use any value between 0 and 4,294,967,295 (if it uses unsigned-integers) or 2,147,483,647 (if it uses signed-integers).  I did a bit of Googling and couldn't find a definitive response -- so, to be on the safe side, I'd go with 2,147,483,647 as the maximum.

So, you can use up to 10 digits, but the left-most (highest-order) digit can only be '1' or '2'.

As long as you use valid magic numbers then this should not affect MT4 Tracker or Portfolio Maker.

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Hi Sleytus

Just wondering if it might be possible to superimpose multiple strategy's equity curves onto a date based graph - that way you can see if a selection of strategies are over-correlated.  It is important that the X axis is date rather than number of trades.  I realise that this might have to be a separate tab as a lot of the time it is more useful to see the x axis with trade numbers - although the benefit with date instead is you can see any stagnation on a strategy more clearly.

Also might it be possible to superimpose the pair's price chart onto the equity graph, again to see under what market conditions a particular strategy performs well and badly.

Thanks again for this useful piece of software; the new date filter and always exclude features are most welcome

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Hello trader1234,

These are very interesting suggestions -- let me think about them a bit.

Superimposing multiple strategy's equity curves onto a  date-based graph is do-able -- I like that idea.

I also like the idea of superimposing a price chart to see how a strategy traded during certain market conditions -- but that would be quite a project on its own, since now it has to deal with importing data files.  Or, maybe not -- again, let me think about it.

185

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Steve, I just uploaded a new version of EA Studio with a locally calculated Portfolio Expert.

I tried to make it easy for preventing separate strategies to open or close positions. Please see this post: https://forexsb.com/forum/post/47692/#p47692 

The new expert will replace the previous cloud calculated one. After a week of testing I'll make it a permanent EA Studio feature.

Trade Safe!

186 (edited by rjectweb 2017-11-24 17:53:38)

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Hi all,
just a couple of comments about EA Studio with Portfolio EA and MT4 tracker.

Thanks Steve for taking into account my suggestion about having the option to remove the pruned strategies instead of only commenting them. I have a couple of ideas I would like to share with you all.

- Maximum number of simultaneous trades. Having a variable (input) for that.
In one of my accounts I'm using a "EA Studio Portfolio EA" slightly modified to run only a maximum number of strategies/trades simultaneoulsy. The modification is quite simple as the EA Studio Portfolio code is quite clean. The idea is to have a variable to set the number of maximum trades that can be open at the same time. Having this helps me limit my exposure to the market and it also helps me to reduce the number of strategies to 1 or 0 when I want to remove this Portfolio EA from a chart. The portfolio EA has 100 strategies and they are ordered by its SQN ratio or Profit to DD ratio, but the EA can only have 5 (variable) trades open simultaneously. Once the maximum number of trades are open, the EA can not open more trades, but at the same time, the ones that are open are still being managed by the EA. If I want to remove the EA, I simply modify the variable to 0, and once the last trade is closed I can remove the EA from the chart. This modification can be easily made inside MT4 Tracker or can be done in EA Studio.

- Expiration date: if we can set a date after that no more trades can be opened (the opened trades will still be managed by the EA) it will be a lot easier to replace a Portfolio EA with a new (pruned) portfolio EA. The idea is being able to build Portfolio EAs that will open trades only for some time (a week / two weeks / a month). After that date, no more new trades are allowed. After the expiration date the Portfolio EA will continue managing the opened trades until they all are closed, but not opening more trades. That will help us to remove/replace the Portfolio EAs a lot more easily: simply using a new chart for a new pruned EA and letting the old one close all its trades and being safe because the old one isn't going to open new trades. Removing the old EA once it has closed all its trades.

- Saving/Recording statistics (profit factor, MaxDD, etc) as comments in the EA, so they could be used (read) by MT4 Tracker or even EA Studio later. I mean, once we have built and tested a strategy in EA Studio we get some statistics that tell us how good the strategy is (SQN, profit factor, MaxDD, Ahsrpe ratio, etc.). If we could save those numbers as comments in the EA Studio Strategy we could simply read them later in the MT4 Tracker or in EA Studio later. This way we could have a better idea about how the strategy is working in a real account. For example, if we got a strategy with profit factor 90%, we should expect to win most of the trades. If once I have 20 trades (for example) our strategy is having only 50% of good trades this strategy should be removed from our portfolio. This is a very basic example. The overall idea is storing the statistics as comments inside the generated EA and being able to use them later. This should be done inside EA Studio and there should be a way to put it inside a Portfolio EA. It is likely not easy to do that, but I think if it were possible I think it could be of help...

Hope this helps
(Apologize for my writing but I don't have much time now. I could try to elaborate a bit more if needed)

Best regards,
RJ

187 (edited by rjectweb 2017-11-25 13:27:21)

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Just a post to show how easy it is to set a maximun number of simultaneous open trades in a Portolio EA:

static input double Entry_Amount      = 0.01; // Entry lots
static input int    Base_Magic_Number = 100;  // Base Magic Number

ADD >>> static input int    MaxTrades = 10;

-------------------------------------

void ManagePosition(Signal *signal,Position *position)
  {
   if(position.posType==OP_FLAT && signal.Scope==ORDER_SCOPE_ENTRY)
     {
      if(signal.Direction==ORDER_DIRECTION_BUY ||
         signal.Direction==ORDER_DIRECTION_SELL)
ADD>>>         if (getOpenOrders()<MaxTrades) {
                          OpenPosition(signal);
ADD>>>         } 
     }
   else if(position.posType!=OP_FLAT && signal.Scope==ORDER_SCOPE_EXIT)
     {
      if((position.posType==OP_BUY && signal.Direction==ORDER_DIRECTION_SELL) ||
         (position.posType==OP_SELL && signal.Direction==ORDER_DIRECTION_BUY))
         ClosePosition(position);
     }
  }

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

rjectweb wrote:

...Maximum number of simultaneous trades. Having a variable (input) for that...

Not sure if you are suggesting this as a new feature for MT4 Tracker, EA Studio or manually modifying the code.  This is a nice idea -- and the Portfolio Maker tool does implement similar protection, though it instead uses 'Free Margin' or 'Floating P/L' to throttle a portfolio's ability to open new trades.  MT4 Tracker does modify an EA Studio-generated portfolio EA -- but for the purposes of pruning poor-performers.  For a feature like this that requires modifying the trading logic, I'd prefer to leave that up to Popov whether or not to add this to the *.mq4 code that EA Studio generates.


rejectweb wrote:

...if we can set a date after that no more trades can be opened...

If the goal is to allow a portfolio EA to gracefully die so it can be replaced, then using protections offered by 'MaxTrades', or 'Free Margin', or 'Floating P/L' can achieve the same thing.


rejectweb wrote:

...Saving/Recording statistics (profit factor, MaxDD, etc) as comments in the EA...

Great idea.  When strategies perform poorly in a live account I find myself having to reload them back into FSB-Pro (or EA Studio) in an effort to try to understand where I went wrong.  So, it would be really helpful to have the original stats somehow embedded in the strategy.  However, I see a problem.  The stats are not an inherent property of a strategy -- they are totally dependent on the data set used to train a strategy.  So, not only would you need to embed the stats, but also include some indication of the data set used to train the strategy to get those particular statistics.  Do you know what I mean?

Instead, I use the "poor man's" method.  I know in advance that all my strategies have some minimum SQN, WinRatio, Sharpe ratio -- whatever.  They had to have good stats in order to make it into my portfolio in the first place.  If a strategy performs poorly in my live account I really don't need to refer back to the original stats -- I mean, I already know what the answer is going to be.  What I will always find is the strategy had great stats when it was originally generated / trained / backtested -- and now it trades like crap.  I believe this is just the nature of the beast -- a certain percentage of my strategies will have great stats but perform poorly.  And my interest now is to find ways to live with this reality, yet still be successful by better managing my strategies.

Related to this, though -- I am adding a feature to Portfolio Maker whereby a strategy will automatically be disabled if its WinRatio drops below some threshold that you set as an input value (e.g. 0.70).  In this way, poor-performers get shutdown immediately or over-time.  I will probably compute the WinRatio over the most recent 10 or 20 trades -- that way, even if a long-running strategy begins to turn bad this protection will detect it and prevent any further new trades.

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Hey Steve

I got the new version of Tracker and it is asking for a key which I have not received.

Should I wait for that or......?

Thanks

daveM

oops, I rtegistered properly and all is good..... haha  my bad.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

https://s2.postimg.org/a2co1we79/correlation-charts-1212x1572.png

Thanks to a suggestion made by trader1234, I've added a new feature to MT4 Tracker -- "Correlations". The “correlation” chart displays overlaid Balance (blue) and Price (black) charts. In addition, markers can be added to show the trades for one or more strategies. In this way we can (a) determine whether there is any correlation between strategies in terms of their trading patterns, and (b) better see how our strategies and portfolio perform during different market conditions — e.g. trending up, trending down, ranging, etc.

Here is a link to additional documentation:
http://mt4tracker.com/documentation/correlations

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Nice work, big thanks for it smile

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

As promised about a month ago, "official" release versions of MT4 Tracker and Portfolio Maker are now available.  Here are links to the web site where you can find more information:

http://mt4tracker.com/mt4-tracker/
http://mt4tracker.com/portfolio-maker/

http://mt4tracker.com/documentation/mt4tracker-documentation/
http://mt4tracker.com/documentation/portfolio-maker-documentation/

With the "official" release the beta versions will no longer work.  If you find the software of value, then they can be purchased for the modest cost of $49 USD each.  For those who provided valuable feedback, please check your PM (Private Messages).

Please post questions / comments about the software here in the forum where others can also comment and benefit.  If absolutely necessary, you can also send email to support@mt4tracker.com.

I've also started an FAQ page which may be of some help and which I intend to keep updating as I learn more.  Here is a link:
http://mt4tracker.com/faq/

Initially I began developing the applications for my own use, but then realized others might benefit.  And out of appreciation to Popov and the forum moderators, shared them for free.  But as time went on then a lot more work has gone into them to include a variety of different features.  So -- though they are no longer free, considering the time and expense many of us devote to forex, I figured that $49 USD was a small price to pay and it does partly reimburse me for the time I spend developing them.  Hope you understand...

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

This is a super pair of softwares, they allow us to do so much more.

The price is actually tiny compared to the value.

Thanks Steve

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Thank you Steve for all your hard work - I shall have a look at the new version of MT4 Tracker later today,

George

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

There's an updated version of MT4 Tracker available.  Here is the download link:
http://nutsaboutnets-downloads.s3.amazonaws.com/MT4Tracker_Setup.exe

Here is what is new:

1. Works with the latest format of EA Studio-generated portfolio EA.  That is, MT4 Tracker can prune (i.e. exclude) strategies from portfolio EAs created by the latest and greatest version of EA Studio.

2. MT4 Tracker inserts an OnDeinit() function that creates a log file of all transactions when the portfolio EA is tested in MT4's Strategy Tester.  This log file can be analyzed just as you would using MT4's Account History report. In this way you can prune the portfolio EA to remove potentially poor-performing strategies *before* adding your portfolio EA to an account.

3. Analyze most recent 'N' trades.  Whether you are monitoring an older strategy with many trades or a new strategy with few trades, it is often useful to analyze its most recent performance. For example, when deciding whether or not a strategy is ready to move from a demo to live account, Petko Aleksandrov from Forex Academy recommends the “10 trades / 100 pips” rule.  Alternatively, if a strategy has been trading for awhile and you want to view its most recent performance (in order to decide whether or not to exclude it from a portfolio EA), then it is desirable to view some statistics of its most recent trades. The “Recent Trades” feature allows you to view statistics for all your strategies over their last N trades — where you decide what N is.

4. Added R-Squared (linearity) statistic.

5. When MT4 Tracker generates a modified portfolio EA it adds some additional inputs that can be used as portfolio protection.  For example:
    Stop all trading
    Stop trading when FreeMargin drops below this value
    Stop trading when Margin exceeds this valueDefault is ‘99999’.
    Stop trading when floating loss drops below this value
    Minimum WinRatio (per strategy)
    Most Recent Number of trades
    Maximum Consecutive Losses (per strategy)

To be clear -- these protections prevent the opening of new positions, but still allow for open positions to be closed.

Here is a link to online documentation:
http://mt4tracker.com/documentation/mt4tracker-documentation/

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

There is showing PARSING ERROR-Invalid ComputedPL (computer PL not equal the close PL) when i upload the detail history report to MT4 Tracker?? What problem is that?
Please Help,Thx

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

tcheehang wrote:

There is showing PARSING ERROR-Invalid ComputedPL (computer PL not equal the close PL)

Could you please attach the Account History *.htm report and I can then take a closer look.

198

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

I have question on your workflow. Usually I ran one pair portfolio and MT4 tracker was great in dealing with it...now I have 12 pairs portfolio running in one account. When I get the report it gets data for all pairs and  MT4 tracker sees all of them...now if I prune strategies..it will make one BIG portfolio for all. What is the best way as at the end I need 12 portfolios not ONE as different pairs are involved.

Thanks

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Good question...   I think you should be able to do it.  I do it all the time -- though, perhaps differently than you.

So -- you would use the first tab ('Strategy Statistics') and do all your pruning.  Next, select the 'Excluded Strategies' tab.  On the left-hand side you'll see all the pruned strategies.

In the section 'Prune Strategies' you'll see a text box for entering a 'Base Magic Number' and also a text box for 'Input Portfolio Expert'.  This is how you control which strategies get pruned from which source code file.

MT4 does *not* create one BIG portfolio for all.  It only modifies the *.mq4 that you specify.  Furthermore, it uses 'Base Magic Number' to determine which strategies to prune from that source file.

Keep in mind that the strategies in an EA Studio-generated portfolio EA are numbered sequentially.  So, suppose the Base Magic number is 16222 and my list of strategies includes 15001023, 15001024, 16222013, 16222055, etc.  When I prune then the 14th and 56th strategy will be excluded from the input file that I specified.

NOTE: Indexing is "zero-based", that's why I said 14th and 56th instead of 13th and 55th.

Hope this helps...

200

Re: MT4 Tracker -- new tool for monitoring & pruning EA portfolio

Thanks