Codes

Moving Average Ex for MetaTrader 4

Moving average with some extra features

High, Low and Close of the previous day, week or month for MetaTrader 4

The indicator shows the High, Close and Low of the previous day, week or month with time shift

Forum

Bug: Base class disables type checking

This one caught me off guard when dealing with generic iterators, the minimum code to reproduce the bug: #property copyright "" #property link "" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 0 #property indicator_plots 0 class Base{}; class A

Bug: Returned function pointer can't be called

#property version "1.00" #property indicator_chart_window typedef void (*Callback)( int i); void PrintNumber( int i) { Print (i); } Callback getCallback() { return PrintNumber; } int OnInit () { getCallback()( 1 ); // Error '1' - some operator expected return INIT_SUCCEEDED ; } int

Bug: ChartWindowFind always returns 0

If called without any arguments, ChartWindowFind will always return 0 even if the indicator is dragged to a subwindow. I compiled the following code and dragged the indicator into the subwindow of the volume indicator : #property version "1.00" #property indicator_chart_window int OnInit () {

Bug: Const method + Copy constructor

This code reproduces the bug: class C { public : C () {} C (C const &) {} C foo() const { return C(); } }; int OnInit () { C c; return INIT_SUCCEEDED ; } There are 2 workarounds for this code, you either remove the const qualifier from the method foo or create a temporary

Return reference, throwing exceptions

Suggestion that would massively improve the MQL5 language. Return reference. Currently you can't return a reference, adding this feature would enable full support for overloading the operators, for example, the index operator[] which would allow us to use a class that simulates the C++'s Vector

Contribution: Drawing Rectangles on Charts

Hi everyone As we know there are some requests about drawing rectangles on charts or just to make our custom indicators more "beautiful". By this I have made a function that can be used to do this kind of thing. Just give me credits for it if you use it, that's all I ask. So you probably asking how

Contribution: drawing rectangles on charts

Hi everyone As we know there are some requests about drawing rectangles on charts or just to make our custom indicators more "beautiful". By this I have made a function that can be used to do this kind of thing. Just give me credits for it if you use it, that's all I ask. So you probably asking how

Zero Divide Error

Hi I'm making a signal table where i'm going to put signals of indicators I like, so today I made a function that returns a signal for the indicator StepMA Stoch, now the problem is that sometimes it gives an error Zero Divde and most wierd thing is that sometimes, not aways, when I remove the