MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Update to MetaTrader 4 build 735 and Test the VPS for Free

Build 600 and EA problems

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
265
ernest02 2014.02.13 10:48
 

This Build 600 has brought so many problems. We should have a choice if we want to upgrade - not forced upon us. After struggling two days to overcome my problems with the e-mail function now i am experiencing problems with my EA's.

First I could not compile, save or even close the EA/MetaEditor when editing one of my EA's. Then when I eventually overcame that problem I now have to search my computer to find my compiled EA and when I copy this to my MT4/Experts folder I get only two tabs when I want to set my parameters, i.e. About and Common. NO inputs tab to set my parameters!! Can anybody help me and tell me how will I set these parameters on my EA's if there is no longer an Input tab?

MetaEditor:Templates as a Spot to Stand On
It may be news to many our readers that all preparations for writing an EA can be performed once and then used continuously.
avatar
265
ernest02 2014.02.13 12:04 #
 
I started paricipating in that thread because I was also experiencing e-mail sending problems. When I wanted to ask a specific question about my problems with EA's and the fact that there is no Input tab where i can change my parameters I decided to start this new topic. So if I did wrong I am saying sorry. Can you just help me with this problem of no Input tab PLEASE?
avatar
14160
RaptorUK 2014.02.13 12:14 #
 
ernest02:

I started paricipating in that thread because I was also experiencing e-mail sending problems. When I wanted to ask a specific question about my problems with EA's and the fact that there is no Input tab where i can change my parameters I decided to start this new topic. So if I did wrong I am saying sorry. Can you just help me with this problem of no Input tab PLEASE?
I can't reproduce this behaviour.

Try this see if it helps . . . find your EA in the MT4 Navigator window, right click the EA, then click Modify . . . this will open the EA into MetaEditor (assuming you have the .mq4 file in the MT4 folder structure) . . . once opened in MetaEditor click compile . . . now go back to MT4 and drop your EA on a chart again, see if you have the Inputs tab.

avatar
159
YALEWANG 2014.02.13 12:30 #
 

mQL.com should consult a lawyer before this upgrade,they have no any warnings to the user,and do not leave the right to user about if users willing to upgrade .

this upgrade almost ruined my account,and i believe not only me . the MQL company made large trouble .

avatar
265
ernest02 2014.02.13 12:39 #
 
RaptorUK:
I can't reproduce this behaviour.

Try this see if it helps . . . find your EA in the MT4 Navigator window, right click the EA, then click Modify . . . this will open the EA into MetaEditor (assuming you have the .mq4 file in the MT4 folder structure) . . . once opened in MetaEditor click compile . . . now go back to MT4 and drop your EA on a chart again, see if you have the Inputs tab.


Sorry! No change! The problem persists. I am attaching an image of what the EA form looks like. Notice there is no Inputs tab.
avatar
265
ernest02 2014.02.13 12:42 #
 
I found the problem! On compiling the EA the first time it deleted/left out all my variables. I have now re-added the variables and now it works. So many wasted hours!
avatar
265
ernest02 2014.02.13 12:53 #
 

You won't believe this! It has now kept the Input variables but DELETED all my code! I happened before with another EA and I thought I may have made a mistake.

This is scary!


avatar
14160
RaptorUK 2014.02.13 12:58 #
 
ernest02:

You won't believe this! It has now kept the Input variables but DELETED all my code! I happened before with another EA and I thought I may have made a mistake.

This is scary!

I find this hard to believe . . . sorry. Perhaps you are simply losing track of what folders you are working with . . . are you versioning all your changes and keeping backups of your previous versions ?

avatar
265
ernest02 2014.02.13 13:00 #
 

Also getting some strange errors like e.g. 'Trade' - undeclared identifier MorningSystemNew.mq4 146 9 where the variable is clearly declared as a "bool" in the code.

 if (CurrentHour >= HourOfDay && CurrentHour <= TradingHours)  bool Trade = true;
  
   else Trade = false;




avatar
14160
RaptorUK 2014.02.13 13:07 #
 
ernest02:

Also getting some strange errors like e.g. 'Trade' - undeclared identifier MorningSystemNew.mq4 146 9 where the variable is clearly declared as a "bool" in the code.

I always declare variables before I try and use them . . .

bool Trade;

if (CurrentHour >= HourOfDay && CurrentHour <= TradingHours)  Trade = true;
  
   else Trade = false;


I'm not sure it is valid any longer . . . or was before, to declare, or not declare, a variable as a result of a condition . . .

avatar
1405
GumRai 2014.02.13 13:33 #
 
ernest02:

Also getting some strange errors like e.g. 'Trade' - undeclared identifier MorningSystemNew.mq4 146 9 where the variable is clearly declared as a "bool" in the code.





The reference states that locally declared variables only apply in the block in which they are declared

Your code

 if (CurrentHour >= HourOfDay && CurrentHour <= TradingHours)  bool Trade = true;
  
   else Trade = false;

can be re-written as

 if (CurrentHour >= HourOfDay && CurrentHour <= TradingHours)
    {
     bool Trade = true;
    }
     else Trade = false;

So the block of code has a single line

 bool Trade = true;

The else is a different block of code and "Trade" has not been declared in this block!

It seems that we may have to stay on the safe side and declare all variables at the beginning of each function so that we don't have problems like this.

Apologies, Raptor has already stated much the same.

Back to topics list   | 1 2  

To add comments, please log in or register