Codes

Extended Heikin Ashi Indicator for MetaTrader 5

Extended version of the original Heikin Ashi indicator

MQL Plus Enhanced Error Handler Support for MetaTrader 5

An (optional) include file to enhance error code handling experience

MQL Plus Enhanced Debugging Support for MetaTrader 5

An (optional) include file to enhance debugging experience

Forum

Obviously bug in indicators OnInit() return value effect

It seems return value of indicators is not being respected by terminal. It works for Experts, but not for indicators. Expert code: int OnInit () { printf (" OnInit () returning: INIT_FAILED : %i", INIT_FAILED ); return ( INIT_FAILED ); } Result in Terminal Journal: 2024.01.28 11:15:52.140

Looking for insight to AVX support by MQL5

Hello there, I've been experimenting with AVX (and its derivatives AVX2 + AVX512) support in MQL5. - Assuming, and to some extend verified, AVX is being utilized by the compiler, if enabled, we should be able to see significant speed increase on some types of operations. - Due to the lack of

Writing generic code in MQL for Objects [solved]

[Solution] Simple and direct answer: https://www.mql5.com/en/forum/449290/page6#comment_48694920 Full development file: https://www.mql5.com/en/forum/449290/page5#comment_47891500 A second approach to a solution: https://www.mql5.com/en/forum/452570 ____________ I have been working on unified

What data organization to use for finding...

Hello, In fact, I don't even know how to name this, so I'll try to provide a description of what I want to achieve. I have a chart on which I draw 10s of thounds of objects of different types, iE trendlines, rectangles, vertical and horizontal lines, triangles... All have coordinates of type price

How to Remove a service

I have tried to successfully remove a Service from the Terminal, but failed to do so. A Service can have (obviously) three states, "Running", "Stopped" and "Removed". Status "Stopped" is reached when the Handler-Function OnStart() returns from execution. Status "Running" is only valid while the

MetaEditor Shared Projects

I dont even want to start analyzing the issues with the built-in SVN-client in MetaEditor. Just a short explanation why I come to the conclusion, it is inherently broken. And I advise anyone, who would want to use it for shared colaboration on a project, to step back from using it. Here is what

MathMax/MathMin giving (maybe) wrong results.

While working on the project "Build an API-Tracer", which is finally done and published, I came across this "issue". Is this considered a bug? Or not. To my understanding it is a bug. Print ( FLT_MAX ); Print ( LONG_MAX ); Print ( MathMax ( FLT_MAX , LONG_MAX )); This code will give

Interesting finding in MQL4 (not for real use....)

Apparently MQL4 has these structures defined, which come from MQL5 and find their usage in MQL5. MqlParam mql_param; Print ( sizeof ( MqlParam )); // Structure is fully functional in MQL4 double d_val = mql_param.double_value; long l_val = mql_param.integer_value;

AlgLib contains ArrayReverse functions

I have noticed, AlgLib from standard library overwrites the original functions from MQL. Interestingly, it doesnt make any sense, because the included function is slower than the original MQL-Function. //+------------------------------------------------------------------+ //| Array reverse (uchar)

Question about casting and function signature of MathMin/MathMax

It is obvious, documentation has not all details in this case, I am trying to get behind whats actually coded here. I have written following test to find out... now I am maximal confused. float f_in = NULL ; ulong ul_in = NULL ; float out1 = MathMin (f_in, ul_in); // No error/warnint float out2