I've been developing custom indicators on MT5 for roughly a month now and am realizing I may be doing something fundamentally incorrect.
I am 99.9% sure that the calculations I am making do not reference future data and they always appear perfectly in the main window.
However, when I try to view them being calculated through time in Strategy Tester, the indicators either do not update or make erratic calculations then flatten to 0.
Below is code from one of my indicators that resides in my OnCalculate() function - I am curious to see if anyone is able to pinpoint exactly what my mistake may be.
The MQL5 language provides processing of some predefined events. Functions for handling these events must be defined in a MQL5 program; function name, return type, composition of parameters (if there are any) and their types must strictly conform to the description of the event handler function. The event handler of the client terminal...
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've been developing custom indicators on MT5 for roughly a month now and am realizing I may be doing something fundamentally incorrect.
I am 99.9% sure that the calculations I am making do not reference future data and they always appear perfectly in the main window.
However, when I try to view them being calculated through time in Strategy Tester, the indicators either do not update or make erratic calculations then flatten to 0.
Below is code from one of my indicators that resides in my OnCalculate() function - I am curious to see if anyone is able to pinpoint exactly what my mistake may be.
Thank you in advance.