First, how can I submit a very simple example of how to use a DLL in MT4? The example is written in assembly and displays the T3 moving average using a simple moving average filter.
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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); } //+------------------------------------------------------------------+