Forum

Difference between OnDeinit() and deinit() ?

Hello all I am working on an EA and I noticed when I am using OnDeinit() in my EA , it causes the EA to shutdown by timeout upon manual removal of the EA from chart and sometimes it automatically restarts the Mt4 terminal whereas when I am using the deinit() function in the same EA everything works

unknown resource type compilation error when trying to import indicator as a resource ?

I am trying to import an indicator as a resource inside another indicator , But when I try and compile the code , it gives me the error: unknown resource type 'C:\Users\r2\AppData\Roaming\MetaQuotes\Terminal\97E7543905E3BBAA10BC45C3DA77753D\MQL4\Indicators\IKSH.ex4' When I call this indicator using

How to avoid array out of range ?

Hello Everyone How to deal with or handle/avoid the array out of range error here : for ( int i= 0 ; i<= ObjectsTotal ()- 1 ; i++) { string objName = ObjectName ( 0 ,i); if ( StringFind (objName, "Last#" )>= 0 ) { string tempval= objName;

Control panel for mt4 indicators?

Is there any library available for creating control panels in mql4

why is CryptDecode not Working ?

I am trying to decode an encrypted string (Encryption was done using php ) String was encrypted using AES-256-ECB with Padding mode as Zeros. and and if i encrypt the string in the mql4 using the same key , i get exact same encrypted string as the one i get from php. initially i was struggling to

Why is CryptEncode() in mql4 different from other languages?

I was trying to understand CryptEncode() in order to send and receive strings between mt4 indicator and php server. but When a string is encrypted on mql4 side its totally different then when its encrypted on the php side , same key and same encryption algorithm is used on both ends, but still the

why do ChartApplyTemplate only work on the second attempt?

I have an exe file that i created in python (Start.exe) which when executed manually generates two files "a data file" and "a template file". now i am trying to automate that process by executing "Start.exe" from the indicator and then Load the template that the "Start.exe" generated. But when I run

facing issue while trying to Plot Moving average and CCI inside one Custom indicator

Hi All. I am trying to display moving average and cci inside of one custom indicator. if you take a look at the attached screenshot you will see that the moving average looks like just a straight line , that is to be expected since moving average value is a lot less then the cci value. I tried