forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Expert Advisor Studio → All trades in MT4 close after 1 bar if using multiple exit indicators

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 10

1 (edited by geektrader 2021-03-09 08:13:15)

Topic: All trades in MT4 close after 1 bar if using multiple exit indicators

Hey,

I am wondering that no one has noticed this very serious bug in EA Studio´s exported MQ4 code. If a strategy uses more than 1 exit indicator, every(!) trade will close after just 1 bar in the MT4 backtest and hence in live trading with MT4 too. I´ve tried this on several pairs, several timeframes, it´s always the same: if using 1 exit indicator only, the backtests between EA Studio and MT4 match just perfectly, but if using more than 1 exit indicator, each trade in the MT4 backtest will close after just 1 bar, everytime. It´s also independent from the type of exit indicator. As long as it´s just 1, the backtests always match. The number of entry indicators is unaffected from this, I´ve tried up to 6 with no issues. This is exclusively related to the amount of exit indicators. I´ve attached a screenshot and a strategy where this happens to demonstrate the issue in the ZIP file. I hope this heavy bug can be fixed quickly.

Thank you.

Post's attachments

trades_close_after_1_bar_example.zip 1.05 mb, 3 downloads since 2021-03-09 

You don't have the permssions to download the attachments of this post.

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

Thank you for reporting this issue. It appears when we use more than 2 exit indicators.

We will upload a fix as soon as possible.

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

The bug is fixed.

We will upload a new version of EA Studio with the fix and with some new features tomorrow morning.

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

Superb, Mr. Popov! I also had it happening if using 2 exit indicators, not just 3, but I guess your fix will still fix it. I will check tomorrow morning. Also excited to hear that new features are coming. You´ve really made this an outstanding piece of software.

5 (edited by hannahis 2021-04-02 10:29:35)

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

Since when this problem arise? From the very beginning when EA Studio has more than 2 exit option or just recently due to the new update?

I want to verify when the issue arise so that I may know which old Portfolio Experts I need to check and have them fixed. 

How to fix those old Portfolio Experts that have these issues? Re-import them back?

Does it mean all my past exported Portfolio Experts needs to be re-imported back to correct the fix?

6 (edited by Roughey 2021-04-02 11:30:47)

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

can you send the code how to fix it or mark the changes in code

i have compare a portfolio from 2019 and from now.. there is no different in code also this require bars. so maybe thats not in the hole code maybe in the indicators code.

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

The fix is in the particular strategy from the portfolio, which has more than 2 indicators.

You can import and re-export your portfolio and run it with the same base magic number. If you do it on Saturday, it will be without side effects.

The bug originates from announcing the possibilities of more than 2 exit indicators. I have missed properly update the MQL for such cases (or missed uploading the update). I cannot believe it was not tested. It is also possible to have older MQL re-uploaded at a later stage.

8 (edited by hannahis 2021-04-02 13:16:58)

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

"The fix is in the particular strategy from the portfolio, which has more than 2 indicators.

You can import and re-export your portfolio and run it with the same base magic number. If you do it on Saturday, it will be without side effects.

The bug originates from announcing the possibilities of more than 2 exit indicators."


Q: if the bug started since the announcing the possibilities of more than 2 exit indicators, which is a couple of mths ago, how can it has no side effects, on those past few weeks/mths demo testing?

"It is also possible to have older MQL re-uploaded at a later stage."

What do you mean by older MQL re-uploaded? You are referring to re-upload the Portfolio Expert?

How to re-upload older Portfolio Experts other than using the Validator?

If I re-upload the collection and re-export it out, will that also fix the issue?

9 (edited by hannahis 2021-04-02 13:33:49)

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

Popov,

Can you recall when you announced the more than 2 exit indicator?  So that I have zoom in closer to those Portfolio Experts (PE) that were affected.  And re-import those PE after the date of announcement to get them fixed.  I'm surprise about this issue, I noticed I still have open positions after 1 bar (and I'm using 1min EA), that's odd not to noticed such bug if it really exist.

I don't seem to have such problem, strategies with more than 2 exit indicators didn't close after 1 bar (for my 1min ea).  So I'm not sure when this problem really started, ie. Portfolio Experts exported since when started to have such problem.  The PE I observed started testing since Dec till now and I didn't noticed the EA closing after 1min bar.

Can I assume that any Portfolio Expert export after 9 March has no issue and hence I only need to focus on those strategies generated from, date of announcement (when can  you recall?) till 8 Mar?

Re: All trades in MT4 close after 1 bar if using multiple exit indicators

The "more than 2 exit slots" feature was announced in July 2020. If you have used more than 2 exit indicators feature before   March 10th, the experts or portfolios may have the bug.

Fortunately, there is an easy way to check the already exported experts.

Open your Portfolio in the MetaTrader Editor or in any other text editor and search for the "true, true" text. If the text is not found, everything is fine.

https://image-holder.forexsb.com/store/metatrader-editor-search-true-true-not-found-thumb.png

If the text true, true is found in a 'GetExitSignal_0##' function and it contains indicators, you have to re-export your portfolio.

Here is an example. We see indicators, in the function, but it contains the "true, true" text.

https://image-holder.forexsb.com/store/portfolio-startegy-with-three-exit-indicators-bug-thumb.png

The correct function with three indicators must look like that:

https://image-holder.forexsb.com/store/portfolio-startegy-with-three-exit-indicators-thumb.png



The bug was reported on March 9th and fixed on March 10th. All portfolios and experts exported after that date should be correct.

Posts: 10

Pages 1

You must login or register to post a reply

Forex Forum → Expert Advisor Studio → All trades in MT4 close after 1 bar if using multiple exit indicators

Similar topics in this forum