Download MetaTrader 5
To add comments, please log in or register
No time to learn MQL5? Order your application from a developer!
Carl Schreiber
5962
Carl Schreiber 2014.03.25 11:12 

Hi,my EA stops after

2014.03.25 12:04:50.800 Access violation read to 0x0ABB5000 in 'C:\Users\cas\Documents\MT4\mt1\MQL4\Experts\myEA.ex4'

This EA is installed by a script 8 times. 7 time without any problem but the last crashes with the a.m. error (no line??)

It reads it parameters from an csv-file and is uses global variables and I placed my Print("ERROR in ",__LINE__); around all these calls but it happens after that??

Anybody with a hint what to do and when and why this happens?

Thanks Gooly

qjol
3243
qjol 2014.03.25 11:35  
the 7 times without any problem might be before B625 ?
Carl Schreiber
5962
Carl Schreiber 2014.03.25 17:00  

Now I have a hint what and where it happened, but I can't reproduce it.

The EA crashed at this line:

ChartSymbol(GlobalVariableGet( MyGlobVar ))

And the MyGlobVar has got a 4 - not an iD of a chart due to a change of my concept..

I played with various type casts and others but now I can't reproduce the error, I now only know where it has happened.

Gooly

qjol
3243
qjol 2014.03.25 19:19  

i don't understand how do you wanna play it ?

GlobalVariableGet is a double and ChartSymbol requires a long

Carl Schreiber
5962
Carl Schreiber 2014.03.25 21:22  

Well I need to communicate the ChartID between different Charts!

And Globalvariables are the easiest way and I have used that before 500 without any problem.

Finally I did not expect the ChartID to be close to the highest possible long-value (8 bytes) while we only can open not more than 100 (in words one hunderd) charts!

qjol
3243
qjol 2014.03.25 22:00  

i don't get it you said and i quote "I have used that before 500 without any problem"

really ?

have you used ChartID in B500 >

Alain Verleyen
Moderator
28666
Alain Verleyen 2014.03.25 22:02  
gooly:

Well I need to communicate the ChartID between different Charts!

And Globalvariables are the easiest way and I have used that before 500 without any problem.

Finally I did not expect the ChartID to be close to the highest possible long-value (8 bytes) while we only can open not more than 100 (in words one hunderd) charts!

Except there is no ChartID before build 500 (or 509).
Carl Schreiber
5962
Carl Schreiber 2014.03.25 22:08  
angevoyageur:
Except there is no ChartID before build 500 (or 509).

Yes, but GlobalVars!!

And datetime was not 8 byte long so they could be saved as double
Alain Verleyen
Moderator
28666
Alain Verleyen 2014.03.25 22:20  
gooly:

Yes, but GlobalVars!!

And datetime was not 8 byte long so they could be saved as double

You avoid the discussion, you were talking about ChartID.

No problem with datetime.

/
To add comments, please log in or register