Forum

Bug in reason codes for OnDeinit() function

Can anyone explain why the unin reason code is '1' when the external input paramaters are changed in an MQL5 indicator . The mql5 reference says when a user changes an external input the system should return '5' as the reason code. Whenever I change my external input parms I get a '1' for the

Lifetime of Global Variables???

Hi, I cannot understand what's going on in MQL5 with regard to global variable values. According to the MQL5 blurb......... A variable declared outside all functions is located into the global scope. Access to such variables can be done from anywhere in the program.These variables are located in the

Irregular function calling

Have any of you guys noticed any irregular function calling in MT5? I have a simple pivots indicator which I've ported accross and I have a function which clears the pivot levels which are essentially trendline objects. The clear levels function is only called from OnDenit() and Oninit(). However

Period() /Timeframe Anomolies

I noticed the period() function returns illogical values. Eg. Print (Period()); returns the following for each chart period:- M1 = 1 M5=5 M15=15 M30=30 M60= 16385 M240= 16388 M1440= 16408 Errr..... where is the logic in this

Memory Leak with ObjectDelete

Hi folks, I'm getting a memory leak of 16 bytes every time my OnDenint() function calls an object removal function which contains ObjectDelete(0,Objectname). Is this a bug? Cheers Crispin