Forum

passing array of doubles to DLL ?

I read the article "How to Exhange Data: A DLL for MQL% in 10 Minutes." I followed the instructions, and now have a working DLL with all the sample functions of the article. I need to add a new function similar to this one (from the article): The C++ code: _DLLAPI void __stdcall fnFillArray( int

MT5 PROBLEM / BUG. Report to service desk?

My custom indicator works as desired sometimes, but other times it doesn't work at all. When it fails, it is because the CopyBuffer() function fails to access requested rates. (See below). I've looked through the docs, and I don't think there is any coding I can do to make the indicator work

Making a faster correlation indicator, using ALGLIB

Hello all. I am trying to make an indicator that shows the Pearson product moment correlation between 2 currency pairs, using the ALGLIB library. There is already a correlation indicator in the codebase, but it is very slow. This is what I have so far

using demo libraries from the Market

Hello, I am trying to download the demo version of libraries from the Market and test them in the strategy tester. I hae read this: https://www.mql5.com/en/articles/586 but it dod not help in my case. I am aware you can download libraries in the market directly in the mt5 terminal or from the

OnInit() and forward testing

When optimizing the input parameters of an expert advisor and using the forward testing option, is the OnInit() function called again when forward testing begins? (ie. when the best 25% of runs have been found and these are to be tested again on the forward testing period)

very slow optimization after 4 or 5 passes

Hello all. I'm currently optimizing my EA. After 5 passes, I have 5 optimization results. However, the next passes are running extremely slow. I have tried restarting it multiple times, but I can't move forward with optimization. If it is because of my code, then I don't know why the first few

Creating object with "new" operator as a global variable, a good idea or bad idea?

Quick question. I am trying to write an EA that will record datetime and bid price data at each tick tick, and store this data only for the most recent x number of seconds. (IE the ea uses the tick data from the previous 20 seconds to make decisions on trading.) Since I do not know how many ticks

including .dll file in MQL5\ Libraries folder

Hello, I have a Dynamic Link library project in code blocks. I want my EA to import functions from the codeblocks DLL project. I was reading the documentation on Importing Function (#import), and tried to follow it closely. It says that " MQL5 libraries are loaded from the

mql5 expert advisor calling a C++ application

I want an expert advisor to say "hey computer, run your C++ application 'Process_Inputs' saved on the desktop." (could be a console application or a WIN 32 application, saved as an executable if need be). Is this possible? If so, how do you do this

C++ calling a mql5 script

Hello, all. Is it possible to have a few lines of code in C++ that say "Hey metatrader, attach your script 'script_name.mqh' to the chart"