Please Advice about Data reload each time with message uninit reason 1 ( cleanup..)

 

Dear Sirs,

I've begin an Ea, nearly close the end at this point, 4500 lines.

It is built with 6 includes which get variables, Globalvariable organization and Functions.

It is a MultiSymbol Ea .

It uses 4 indicators and 4 différents Heiken Ashi.

I download at the beginning then one time each minutes, some prices from the Heiken for each paire.

(close, op, hi,lo, body, feet, head, difference between close(1) close(2), open(0) op(1)... etc..)

All the info that candle price are able to give for 10 bar.

All that are stored in Array 4 Dim.

All run good unless I call 27 symbol, I have tested before with  less symbol ( 7, 12..).

At this point the Diaries EXPERT,  print each minutes ( at the moment where I refreshed all my datas Arrays this message :

:

"

 00:00:02 @Xoidi_StatVoHr GBPCAD.G,H1: loaded successfully

00:00:02 @Xoidi_StatVoHr GBPCAD.G,H1: initialized

00:00:02 @Xoidi_HkAmtf CADJPY.G,H4: deinitialized

00:00:02 @Xoidi_HkAmtf CADJPY.G,H4: uninit reason 1..."


The message uninit reason 1 meant  if I don't make mistake :

" possible CleanUp();  cleaning up and deallocation of all resources need to clean)".So, I think because there si to much Array open and that reload everthing.

I have a PC I7 3730 quadri with 16 gig ram and graphiq card autonome with 2 gig ram.

my questions :

-1) is it the reasons ?, what is the maximum arrays possible ?

-2)  how can I win memory place ? name of variable smaller,  no text after //,

- 3) is there a possibility to allocate more memory to MT4 ( like we can do with MAC ?)

- 4)can I divise my Ea in two or three parts and put them on différents Graph to be loaded ?

-5)  does it win memory avalaible for my Ea, if I open only one graph on the console ?

-6) or if I don't load any indicators ?

-7) or if I ask in option , graphique, maxi bar : 25.000 ?...


 

Hopping you'll be able to answer to my questions,

and great thanks for that,

 

Daniel

 
DanielTahiti: The message uninit reason 1 meant  if I don't make mistake :
Uninitialize reason codes - MQL4 Documentation

REASON_REMOVE1Expert removed from chart.
 
WHRoeder:
Uninitialize reason codes - MQL4 Documentation

REASON_REMOVE1Expert removed from chart.




Yes thanks,  I've seen that and with your answer I see that  "possible CleanUp();  // cleaning up and deallocation of all resources.", was in fact an example of the manual book.


So, I still don't know why the report give that each time data was loading by my EA. all is reloaded at this moment.

This run well when I select only 15 pairs by my EA. at 16, 17 and more, the phenomen restart.

MY Ea don't stop, but my EA can't déinit and reinit all indicator each time ,I think server don't agree ..

This is what I get normaly   : 

"

16:40:30 TDI RG CHFJPY.G,H1: loaded successfully

16:40:30 TDI RG CHFJPY.G,H1: initialized   "


this is what I get when it is not good  ( to be read down to up) :

16:40:30 HkAmtf GBPUSD.G,Daily: loaded successfully
16:40:30 HkAmtf GBPUSD.G,Daily: initialized
16:40:30 HkAmtf GBPUSD.G,Daily: 0
16:40:30 HkSyne GBPUSD.G,Daily: loaded successfully
16:40:30 HkSyne GBPUSD.G,Daily: initialized
16:40:30 HkAshi GBPNZD.G,Daily: loaded successfully
16:40:30 HkAshi GBPNZD.G,Daily: initialized
16:40:30 HkAmtf GBPNZD.G,Daily: loaded successfully
16:40:30 HkAmtf GBPNZD.G,Daily: initialized
16:40:30 HkAmtf GBPNZD.G,Daily: 0
16:40:30 HkSyne GBPNZD.G,Daily: loaded successfully
16:40:30 HkSyne GBPNZD.G,Daily: initialized
16:40:30 HkAshi NZDCAD.G,Daily: loaded successfully
16:40:30 HkAshi NZDCAD.G,Daily: initialized
16:40:30 HkAmtf NZDCAD.G,Daily: loaded successfully

16:40:30 HkAmtf NZDCAD.G,Daily: initialized

16:40:30 HkAmtf NZDCAD.G,Daily: 0


Normaly it load every 1 mn, but the result are not  : 0, when it is , it reinitialize the indicator..

So the Question is : why the EA get 0, intead of the price..


So for who can help,


Kinds regards  and Thank you in advance.