- Can someone please advise where I send a Request for Support to Metaquotes. - MQL4 forum
- Get in touch with developers using Service Desk! - MQL5 forum
- Report it to the service desk. 'MQL5.community - User Memo' - an article about the algorithmic/automated trading in MetaTrader
- Report it to the Service Desk, not us users.
This is a user's forum not Metaquotes.
- Can someone please advise where I send a Request for Support to Metaquotes. - MQL4 forum
- Get in touch with developers using Service Desk! - MQL5 forum
- Report it to the service desk. 'MQL5.community - User Memo' - an article about the algorithmic/automated trading in MetaTrader
- Report it to the Service Desk, not us users.
Your code looks finde to me and the bug you reported looks more like an address or pointer issue to me which may be caused by terminal.exe.
Even so, there is another thing you might like to test. The theory here is as follows: I believe that terminal.exe expects the input variables to show up somewhere at the beginning of your MQL4 file. Therefore you like to test this small modification and report back. Remove the yellow lines and put them at the beginning of your MQL4 file. Before the init OnInit(); function. Also make sure you remove all "unnecessary" white spaces in your declarations and variables. It might be that terminal.exe interprets the use of unncessary white spaces wrong. So please put the stuff in as I changed them. Also remove trailing white spaces behind the ";" symbol.
#property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 1 input int FastMAPeriod=12; input int SlowMAPeriod=26; input int SignalPeriod=9; input ENUM_APPLIED_PRICE AppliedPrice = PRICE_CLOSE; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping //--- return(INIT_SUCCEEDED); } input int FastMAPeriod =12; input int SlowMAPeriod =26; input int SignalPeriod =9; input ENUM_APPLIED_PRICE AppliedPrice = PRICE_CLOSE ; //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- double os1 = iOsMA(NULL, PERIOD_H4 ,FastMAPeriod ,SlowMAPeriod , SignalPeriod , AppliedPrice , 0); return(rates_total); }
Your code looks finde to me and the bug you reported looks more like an address or pointer issue to me which may be caused by terminal.exe.
Even so, there is another thing you might like to test. The theory here is as follows: I believe that terminal.exe expects the input variables to show up somewhere at the beginning of your MQL4 file. Therefore you like to test this small modification and report back. Remove the yellow lines and put them at the beginning of your MQL4 file. Before the init OnInit(); function. Also make sure you remove all "unnecessary" white spaces in your declarations and variables. It might be that terminal.exe interprets the use of unncessary white spaces wrong. So please put the stuff in as I changed them. Also remove trailing white spaces behind the ";" symbol.
thanks for your input ,
i modified code as suggested by you , but same result still i see the access violation error ,
Point to note is : if iOSMA is called with same timeframe as that of chart , it works okay but when other then default time frame , it through this error and terminal crashes.
if you don't mind , could you please run same file on your terminal and check if you facing same issue.
what i am going to do is instead of calling iOSMA , i will test with other standard indicator and report you back.
tested with iMA(NULL, PERIOD_M30 ,FastMAPeriod ,0 ,MODE_SMA , AppliedPrice , 0);
terminal is crashing again ,
does this mean we no longer able to run multi time frame indicators ?
Depends how many indicators and timeframes you have and how big is the history base!
Just try that: Start a new indicator again and again until your EA, indicator or script crashes.
At least met4 hasn't been able (yet?) to free memory of requested indicators only self defined arrays can be freed.
Depends how many indicators and timeframes you have and how big is the history base!
Just try that: Start a new indicator again and again until your EA, indicator or script crashes.
At least met4 hasn't been able (yet?) to free memory of requested indicators only self defined arrays can be freed.
4002 |
ERR_ARRAY_INDEX_OUT_OF_RANGE |
Array index is out of range |
Code can not cause an access violation; exceeding an array causes
4002 | ERR_ARRAY_INDEX_OUT_OF_RANGE | Array index is out of range |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
above code/indicator while loading crashes my terminal , saying not responding.
closely looking at expert tab it say access violation write to 0x769896FB in myindy.ex4
after many hit and trail i found iOsMA called with timeframe other than default period of chart , it causes error. i.e. if chart period is h1 and iOSMA called with PERIOD_H1 it works smooth .
mt4 version : 4.00 build 920
can anyone give me possible reason why this is happening and guide me.
thanks advanced