
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The function did not fail. It returned false. There is a diference and I even highlighted it in the quoted documentation.
As I already explained, the GetLastError is only for when the function itself fails, not the trade request verification, which is returned in the in the MqlTradeCheckResult object, not GetLastError.
Just look at the MQ example here: https://www.mql5.com/en/docs/trading/ordercheck
If OrderCheck fails or as you more precise say "returns false" GetLastError() ist logged "Print( .., GetLastError(), ... );" but it is not set. Sure it's bug - of course not a serious one.
Yes, and in that very example you seem to be ignoring the other output to the log, namely "check.retcode" ...
Yes, and in that very example you seem to be ignoring the other output to the log, namely "check.retcode" ...
But in the debugger _LastError - if it would be set correctly and if this variable would be available and recognised in the debugger - should show the error generally for everything that has happened, in the past it was that way! So you need(ed) only this, _LastError, instead of a lot of different fields of structures and classes which would flood the variable window of the debugger.
I noticed the OnChartEvent on Tester works for indicators now.
Unless it was always this way
I noticed the OnChartEvent on Tester works for indicators now.
Unless it was always this way
Hello Dear,
I would like to share the following image
Also, I attached the file.
Thanks!
Hello Metatrader tech team,
Im really really want you to enhance the settings for subcribing signals, that is allow to copy signals with fixed lot. PLEASE PLEASE.
as current settings, there are no where to set fixed lot.
Thanks much, please help me to do it soon. Regards.
Just found something related -
Forum on trading, automated trading systems and testing of trading strategies
New MetaTrader 5 platform version build 4755: general improvements
Renat Fatkhullin , 2025.03.01 12:43
We are changing the GUI and controls, including a dark theme.
This is the first beta for now.
Hello MQL5 Community,
I'm encountering a persistent and perplexing issue where ArraySetAsSeries() does not seem to correctly set the time series flag for dynamic arrays used as indicator buffers within the OnInit() function. This occurs even in a minimal, standalone test indicator.
Environment:
MetaTrader 5 Version: 5.00 build 4885 (64-bit)
Build Date: 28 Feb 2025
Problem Description:
When an indicator buffer is mapped using SetIndexBuffer() and then ArraySetAsSeries(buffer, true) is called immediately afterward within OnInit(), a subsequent check using ArrayIsSeries(buffer) in the same OnInit() scope (and later in OnCalculate()) consistently returns false.
This means that functions in OnCalculate() which expect these buffers to be time series (e.g., standard indicator calculation routines like ATR, RSI) then fail or produce incorrect results because they detect the buffer is not a series array.
Minimal Reproducible Test Case (TestSeriesIndicator.mq5):
Log Output from TestSeriesIndicator.mq5:
Troubleshooting Steps Taken:
Ensured ArraySetAsSeries() is called after SetIndexBuffer().
Performed clean recompiles (deleting .ex5 file) and restarted MetaTrader 5 multiple times.
Tested with a completely new, minimal indicator file (code above).
Confirmed that other standard indicators (like the included iVAR.mq5 if recompiled on this build) that use similar buffer initialization seem to work, making this specific failure puzzling.
The issue persists even after trying a "Data Folder Reset" (renaming the terminal instance folder to let MT5 create a fresh one, then creating and compiling the test indicator from scratch in the new environment).
Tried installing a fresh copy of MT5 from MetaQuotes official website, created the minimal test indicator from scratch, and the issue still occurs.
Expected Behavior:
The log line TestSeriesIndicator v2: AFTER ArraySetAsSeries for g_testBuffer (index 0). Is series? should show true. Consequently, ArrayIsSeries(g_testBuffer) in OnCalculate() should also be true.
Question:
Has anyone encountered a similar issue with ArraySetAsSeries() failing to set the series flag for indicator buffers in OnInit() on MT5 build 4885 or similar recent builds? Could this be a bug specific to this build or certain system configurations, or is there a subtle aspect of indicator buffer initialization I might be missing that's not apparent in standard examples or documentation?
Any insights or suggestions would be greatly appreciated.
Thank you.