MetaTrader 4 Build 574 with Updated MQL4 Language and Market of Applications Released - page 20

gchrmt4
276
gchrmt4  
Ovo:


Well, though hypothesis, I appreciate you found time to create it :)

...The better the protection, the more support queries. For example:

* If the protection is tied to a mql5.com account, what happens about multiple people sharing the same mql5.com account? If there is a concurrency check, what happens if I want to use the same mql5.com account on my VPS, for live trading, and also on my local computer, e.g. for testing new signal providers?

* If the protection is tied to hardware, what happens if I test an EA on my local computer and then want to use it on a VPS? What happens if my hardware changes? If there is some sort of registration and de-registration of hardware devices, what happens if I de-register a machine on which an EA is currently running?

[Deleted]  

account mismatch error

build 577:

when I change account from MQ test server to another broker's account, variables Bid/Ask or function SymbolInfoTick() still prints quotes from MQ test server and not what is on chart..

where do they get these quotes from if the terminal is not logged into the test server? And where are the right quotes?


Also, while there is a possibility to add servers in the "open account" dialog, there is no possibility to delete servers from that list; how do I unclog the server names list?

Simon Gniadkowski
17411
2cent:


account mismatch error

build 577:

when I change account from MQ test server to another broker's account, variables Bid/Ask or function SymbolInfoTick() still prints quotes from MQ test server and not what is on chart..

where do they get these quotes from if the terminal is not logged into the test server? And where are the right quotes?

577 is not yet released . . . so your Broker does not support it, if you have 577 now you should consider it to be beta. If you want to use it to trade wait until your Broker pushes the update to your Terminal.
[Deleted]  
RaptorUK:
577 is not yet released . . . so your Broker does not support it, if you have 577 now you should consider it to be beta. If you want to use it to trade wait until your Broker pushes the update to your Terminal.


Well, the point is this: Bid/Ask or SymbolInfoTick() does not return what is printed on the chart.. So the quotes must be present, however, they are not available to the EA!? Technically the quotes printed by the expert do not exist.

VabRus
101
VabRus  

I can't compile this code in BUILD 777

In build 509 without problems.

66      if (MyOrdersTotal() == 0 && (Hour()>=StartHour && Hour()<EndHour && StartHour<EndHour) || 
67          (Hour()>=StartHour || Hour()<EndHour && StartHour>EndHour))

check operator precedence for possible error; use parentheses to clarify precedence myEA.mq4 66 32

check operator precedence for possible error; use parentheses to clarify precedence myEA.mq4 67 30

And other thing, it isn't very important.

The icon of files *.mq4 is like mql5.


Alain Verleyen
42593
VabRus:

I can't compile this code in BUILD 777

In build 509 without problems.

check operator precedence for possible error; use parentheses to clarify precedence myEA.mq4 66 32

check operator precedence for possible error; use parentheses to clarify precedence myEA.mq4 67 30

And other thing, it isn't very important.

The icon of files *.mq4 is like mql5.


It compiles but you get warnings because the precedence of && and || are changing, so this warning advice you to check your code and eventually add parenthesis to be sure you get the desired result.
VabRus
101
VabRus  
angevoyageur:
It compiles but you get warnings because the precedence of && and || are changing, so this warning advice you to check your code and eventually add parenthesis to be sure you get the desired result.


Yes, it compiles, but don't run like mq4.

Know you what is the equivalent to || and &&?

William Roeder
25856
William Roeder  
angevoyageur: It compiles but you get warnings because the precedence of && and || are changing, so this warning advice you to check your code and eventually add parenthesis to be sure you get the desired result.
  1. Exactly.
  2. Don't write unread­able, in­compre­hens­ible code like that.
    if (MyOrdersTotal() == 0 && (Hour()​>=​StartHour ​&& Hour()​<​EndHour && StartHour​<​EndHour) || (Hour()​>=​StartHour || Hour()​<​EndHour && StartHour​>​EndHour))
    Make readable and simplify and always paren­thes­ize when mixing ands/ors.
    bool    isHourOKnorm = StartHour < EndHour
                         && StartHour <= Hour() && Hour() < EndHour,
            isHourOKwrap = StartHour > EndHour
                         && (StartHour <= Hour() || Hour() < EndHour),
         isHourOK       = isHourOKnorm || isHourOKwrap;
    if(MyOrdersTotal() == 0 && isHourOK)
  3. What about the case where StartHour == EndHour (i.e. all 24?) See my code and avoid 24 hour wrap.
VabRus
101
VabRus  
Ok perfect, thanks, WHRoeder ;-)
VabRus
101
VabRus  
What about custom optimization?

I can compile the event OnTester(), I can select custom for optimization, but I don't know if this parameter is working I don't see it in Optimization Results.