MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released - page 12

Guo Wei Long
192
Guo Wei Long  

I think need a system variable to tell me: string is ANSI or UNICODE

so I can switch to do with the difference situation.

if( RunMode==UNICODE)

symbolParam = UNICODE2ANSI(Symbol());

else

symbolParam = Symbol();

Ex Ovo Omnia
2929
Ex Ovo Omnia  
Folex:

Sure,

I used the attached EA, just copied it 2 times and renamed in test2 and test3. Thus all are identical in their code, just the name differs.

MT4 Build 602 has been used.

test1 to be attached to EURUSD/GBPUSD/USDJPY/AUDUSD respectively the first four charts and in sequence.

test2 to be attached to GBPUSD which is chart number 5 in sequence.

test3 to be attached ti AUDUSD which is chart number 6 in sequence.

While attaching them to the charts, the results are correct as per below log:

15:15:56 Expert test1 EURUSD,H1: loaded successfully

15:15:58 test1 EURUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:15:58 test1 EURUSD,H1: initialized

15:16:01 Expert test1 GBPUSD,H1: loaded successfully

15:16:02 test1 GBPUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:02 test1 GBPUSD,H1: initialized

15:16:05 Expert test1 USDJPY,H1: loaded successfully

15:16:06 test1 USDJPY,H1: Initialization Values: Digits = 3 / LotStep = 0.01

15:16:06 test1 USDJPY,H1: initialized

15:16:09 Expert test1 AUDUSD,H1: loaded successfully

15:16:10 test1 AUDUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:10 test1 AUDUSD,H1: initialized

15:16:17 Expert test2 GBPUSD,H1: loaded successfully

15:16:19 test2 GBPUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:19 test2 GBPUSD,H1: initialized

15:16:21 Expert test3 AUDUSD,H1: loaded successfully

15:16:23 test3 AUDUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:23 test3 AUDUSD,H1: initialized

After a restart of MT4 the results of test2 and test3 are incorrect as per below log:

15:16:52 test2 GBPUSD,H1: Initialization Values: Digits = 4 / LotStep = 0

15:16:52 test2 GBPUSD,H1: initialized

15:16:52 Expert test3 AUDUSD,H1: loaded successfully

15:16:52 test3 AUDUSD,H1: Initialization Values: Digits = 4 / LotStep = 0

15:16:52 test3 AUDUSD,H1: initialized

15:16:56 test1 USDJPY,H1: Initialization Values: Digits = 3 / LotStep = 0.01

15:16:56 test1 USDJPY,H1: initialized

15:16:56 test1 AUDUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:56 test1 AUDUSD,H1: initialized

15:16:56 test1 EURUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:56 test1 EURUSD,H1: initialized

15:16:56 test1 GBPUSD,H1: Initialization Values: Digits = 5 / LotStep = 0.01

15:16:56 test1 GBPUSD,H1: initialized

This error does repeat each time MT4 is restarted.

If you move the GBPUSD chart with test2 attached to first in sequence of the charts... the error will jump to test1... and so on...


After restarting MT4 the initialization happens before the script gets the server connection. You should avoid everything that depends on server data.
Simon Gniadkowski
17241
Simon Gniadkowski  
handy148:

Raptor - here are the requested images:-

http://i62.tinypic.com/2dbqwb4.jpg

http://i61.tinypic.com/whdwy9.jpg


I said . . .

So you copied your Indicator .ex4 files to C:\Users\Forex\AppData\Roaming\MetaQuotes\Terminal\9ACB2E2CE0389240C909714389C79575\MQL4\Indicators\ and you restarted MT4, then when the Terminal started your Indicators were not in the Navigator under Custom Indicators ? can you confirm this please ?

. . and you replied yes . . .

Then I said . . .

RaptorUK:

OK, can you show screen shots of the following:

  • the contents of the C:\Users\Forex\AppData\Roaming\MetaQuotes\Terminal\9ACB2E2CE0389240C909714389C79575\MQL4\indicators\ folder
  • the Navigator with the Custom Indicators branch expanded
For example:

and

and you gave me a screen grab of: C:\Program Files (x86)\MetaTrader\Pepperstone\MQL4\Indicators\ . . . . why ?

Simon Gniadkowski
17241
Simon Gniadkowski  
claud:

After the MT4 upgrade, recompiled the indicator source file, the DRAW_HISTOGRAM don't show again. Why? and how to fix? Thanks a lot.

Why did you recompile ? did you need to ? why not simply use the build 509 .ex4 ?
Simon Gniadkowski
17241
Simon Gniadkowski  
apes001:

Hi:

I'm trying to find a way to handle the warning I'm getting for the piece of code provided. This "Lookup Filter" (found it here on this forum and it worked without any problems in the OLD builds), is being used numerous times (all over) in my EA. Are there any of you who may suggest some solution or a way to tackle this?

The warning I'm getting is: "Check operator precedence for possible error; use parentheses to clarify precedence"

I thank you very much


The precedence of && and || has changed in this new version of mql4 . . . so your code no longer does what you think it is doing. To be clear add ( ) braces.
claud
14
claud  
RaptorUK:
Why did you recompile ? did you need to ? why not simply use the build 509 .ex4 ?


The terminal is auto-upgraded. I was in new system development. need recompile frequently now. I just find it's bug in new build 600 version when draw DRAW_HISTOGRAM in chart window. But it's ok in separate window.
Alexey Da
6500
Alexey Da  
littlemax:

One click trading doesn't appear to be working on build 602 - process stalls & the x button disappears from the open trade line.

Could you provide any screenshot, log records etc.
Folex
14
Folex  
Ovo:

After restarting MT4 the initialization happens before the script gets the server connection. You should avoid everything that depends on server data.


Never was an issue with build up to 509.

It is as well no issue if you run just one EA over one or several charts.

Thus I am not buying the server connection statement.

gchrmt4
276
gchrmt4  
Folex:

Thus I am not buying the server connection statement.

Have you tried v602?

I've seen all sorts of strange things with old EAs in v600, related to the fact that init() can get called more than once - and, apparently, re-entrantly - particularly when starting up the platform with EAs already present on charts. v602 seems to fix this, and init() only gets called once.

Folex
14
Folex  
gchrmt4:

Have you tried v602?

I've seen all sorts of strange things with old EAs in v600, related to the fact that init() can get called more than once - and, apparently, re-entrantly - particularly when starting up the platform with EAs already present on charts. v602 seems to fix this, and init() only gets called once.


Yes, the posted test was run on build 602