MT4 erratic EA trade entry behaviour...

 

Hi there,


Can you help solve this oddity !

I could really do with experienced members feedback on this one.


For the past week (Until Sat 5th Sept):

I have selected known indicators

I have created trigger displays (Arrows) when the indicators behave in a certain way: line cross, zero cross over etc.

I have created EA's (7 no. in this test series), so when a trigger (arrow) is displayed, a trade is entered (Simple).

I visually check the EA on a chart to see that it works accordingly: Indicator behaviour > Trigger displayed (arrow) > EA enters the trade (Buy and sell check)

Once checked - I optimise the inputs to test a range(s) of data.

This has been working perfectly all last week, and produced a lot of data currently stored in Excel


On Sunday and today

I always rerun a sample of the my previous work - to visually check the EA as above.

To my dismay, only 1 of the previously working EA's now enters the trades when the trigger arrow is displayed.

The other 6 EA's, display the arrow (as triggered), but no trade is entered - which is odd as so much data gathered previously - last week.


Checks

I have checked and rechecked the indicator and the indicator trigger separately, coding, MT4 chart visual

I have checked, double and triple checked the MT4 coding, no compiler errors either.

I have not changed any EA coding or any MT4 settings for that matter.


I have contacted the Demo account Oanda - cant help!


So what am I missing here

Is this a case of not seeing an obvious MT4 setting?

Am I missing an MT4 anomaly? 


Yes, I use an EA Builder to produce the code

This makes it easier to manipulate generic inputs and indicator behaviour.

I am familiar with code, so i understand the basics, structure and format


Any sound experienced feedback would be so well received.


My sincere thanks

NT


Attached (1 of the 6)

Indicator coded to produce a trigger display (arrow)

The EA designed to enter a trade when the trigger arrow is displayed 

 
  1. No compiler errors is irrelevant. function(){} compiles just fine but doesn't do anything.

  2. Settings are irrelevant. Your code stopped running.

  3. Look in the Experts tab. You likely have a divide by zero or array exceed, which killed your EA.

  4. EA builder, EA Builder Pro, EATree, Etasoft forex generator, Forex Strategy Builder, FOREXEADVISOR STRATEGY BUILDER, FX EA Builder, fxDreema, FxPro, Molanis, Online Forex Expert Advisor Generator, Strategy Builder FX, Strategy Quant, Visual Trader Studio, MQL5 Wizard, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.

    1. Since you haven't learned MQL4/5, therefor there is no common language for us to communicate.
      If we tell you what you need, you can't code it.
      If we give you the code, you don't know how to integrate it into yours.
      We are willing to HELP you when you post your attempt (using SRC) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own.

    2. EA builder makes bad code counting up while closing multiple orders.
      EA builder makes bad code Bars is unreliable (Max bars in chart), volume is unreliable (miss ticks.) Always use time.
      EA builder makes bad code, not adjusting for 4/5 digit brokers, TP/SL and slippage.
      EA builder makes bad code, not adjusting for ECN brokers. pre-Build 500)
      EA builder makes bad code, not checking return codes.

    3. EATree uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.)

    4. FX EA Builder makes bad code, not checking return codes.
      FX EA Builder makes bad code, loosing open tickets on terminal restart. No recovery (crash/power failure.)
      FX EA Builder makes bad code, not adjusting stops for the spread.
      FX EA Builder makes bad code, using OrdersTotal directly.

    5. FOREXEADVISOR STRATEGY BUILDER makes bad code, non-updateing global variables.
      FOREXEADVISOR STRATEGY BUILDER makes bad code, compilation errors.
      FOREXEADVISOR STRATEGY BUILDER makes bad code, not checking return codes.

    Learn to code it, or pay someone (Freelance) someone to code it.
              Hiring to write script - General - MQL5 programming forum #1 2019.08.21


 
William Roeder:
  1. No compiler errors is irrelevant. function(){} compiles just fine but doesn't do anything.

  2. Settings are irrelevant. Your code stopped running.

  3. Look in the Experts tab. You likely have a divide by zero or array exceed, which killed your EA.

  4. EA builder, EA Builder Pro, EATree, Etasoft forex generator, Forex Strategy Builder, FOREXEADVISOR STRATEGY BUILDER, FX EA Builder, fxDreema, FxPro, Molanis, Online Forex Expert Advisor Generator, Strategy Builder FX, Strategy Quant, Visual Trader Studio, MQL5 Wizard, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.

    1. Since you haven't learned MQL4/5, therefor there is no common language for us to communicate.
      If we tell you what you need, you can't code it.
      If we give you the code, you don't know how to integrate it into yours.
      We are willing to HELP you when you post your attempt (using SRC) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own.

    2. EA builder makes bad code counting up while closing multiple orders.
      EA builder makes bad code Bars is unreliable (Max bars in chart), volume is unreliable (miss ticks.) Always use time.
      EA builder makes bad code, not adjusting for 4/5 digit brokers, TP/SL and slippage.
      EA builder makes bad code, not adjusting for ECN brokers. pre-Build 500)
      EA builder makes bad code, not checking return codes.

    3. EATree uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.)

    4. FX EA Builder makes bad code, not checking return codes.
      FX EA Builder makes bad code, loosing open tickets on terminal restart. No recovery (crash/power failure.)
      FX EA Builder makes bad code, not adjusting stops for the spread.
      FX EA Builder makes bad code, using OrdersTotal directly.

    5. FOREXEADVISOR STRATEGY BUILDER makes bad code, non-updateing global variables.
      FOREXEADVISOR STRATEGY BUILDER makes bad code, compilation errors.
      FOREXEADVISOR STRATEGY BUILDER makes bad code, not checking return codes.

    Learn to code it, or pay someone (Freelance) someone to code it.
              Hiring to write script - General - MQL5 programming forum #1 2019.08.21




Hi William.


Before I wrote this request, I did research possible answers on this platform and found your reply to others as the same, thanks for the de facto reply


SOLVED.

It is nota coding error, or anything to do with EA Builder - as you exclaim

I did check the expert and journal tabs - no errors.


I have designed and developed another EA today using the same indicator and it works perfectly, arrow displayed = trade entered.

Wait, this newly designed EA uses the same indicator that has stopped working... so now I am thinking differently!

I even checked the codes on a comparison site https://text-compare.com/ and the coding is identical 


PROOF

The same EA that worked last week, that entered trades and stopped working (After heavy duty backtesting), the file has been  renamed- yes it works perfectly again!!!

I have also installed another MT4 platform on my spare laptop - and last weeks EA that stopped working - is working perfectly also (Without a file name change).


ANSWERS

So clearly the MT4 platform has been caching and storing data - which considering the megabytes of data I have mined from the tests and placed in excel is normal.

The challenge is how to clear the cache or history records so further data can be mined from the EA, so I do not have to change the file name after a huge batch of backtesting


Your MT4 expertise is much appreciated in this matter


My regards

NT