thanx. this bug is found and will be fixed in the next build.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I believe another individual stated having the same problem, but I would like to make sure the issue is addressed in the next release of MT4 (165). The MQ4 code below loads properly initially, but changing the time frame causes a critical error rapidly closing the critical error window and the MT4 Client. The example below is using a DLL; however, this DLL worked fine in MT4 163 and started the aberrant behavior after allowing the update to 164.
#property copyright "" #property link "" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Yellow #include <UniTest.mqh> extern int T3Period = 5; extern double T3Ring = 0.25; //---- indicator buffers double aLine[]; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(1); IndicatorDigits( MarketInfo( Symbol(), MODE_DIGITS )); SetIndexStyle(0, DRAW_LINE); //---- indicator buffers mapping if( !SetIndexBuffer( 0, aLine )) Print( "cannot set indicator buffers!" ); //---- SetIndexDrawBegin( 0, 12 ); //---- IndicatorShortName( "UniTest" ); //---- return(0); } //+------------------------------------------------------------------+ //| array functions call | //+------------------------------------------------------------------+ int start() { int limit, i, j; int cntBars = IndicatorCounted(); double lvl00, nArray00[50]; limit = Bars - cntBars; for( i = 0; i < limit; i++ ) { for(j = 0; j < 50; j++) { nArray00[j] = Close[i + j]; } lvl00 = T3(T3Period, T3Ring, nArray00); aLine[i] = lvl00; } return(0); } //+------------------------------------------------------------------+