Errors, bugs, questions - page 2898

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
Message to developers. Python script hangs when receiving data via copy_rates_from_pos under certain circumstances.
Let me explain the situation. The broker has about 4k instruments.
I do primary selection of the instruments by searching and filtering them according to certain rules.
On one of the instruments in the terminal there is no history (i.e., in the market watch and in the list of symbols, the instrument is present, but the data is empty).
When trying to execute the script: rates_d1 = mt5.copy_rates_from_pos(curSymbol.name, mt5.TIMEFRAME_D1, 1, analysis_days),
the script just hangs. It doesn't help to try or check for None as the error itself doesn't occur, everything hangs on this line.
If I try to execute: rates_d1 = mt5.copy_rates_from_pos(curSymbol.name, mt5.TIMEFRAME_D1, 0, analysis_days),
, i.e. specify the starting bar number from 0, it does not hang and returns an empty table.
Addendum. I also found a similar problem when I FIRST retrieve data via copy_rates_from_pos with the number of bars requested, more than there is in the history. Also the script hangs. There is no such error on second request. That's why it seems to be difficult to repeat the error (perhaps, only by deleting the entire history for the symbol).
I may be wrong or have missed something, but it seems to be a bug since the function should either return the data or make an error.
Dear developers, if I am mistaken or have not considered something, please correct me.
Do you want someone to take the time to write a source code based on your data and test it on different trade servers?
It is not going to happen. Respect other people's time: fully provide data to reproduce the problem - source, server, machine configuration and so on.
The source is concise and with comments, so that you don't waste time parsing what was written there. Tell what you wanted to get and what you got.
A password-protected ZIP archive.
Are locked archives supported in MQL?
Are locked archives supported in MQL?
I don't know.
Message to developers. Python script hangs when receiving data via copy_rates_from_pos under certain circumstances.
Let me explain the situation. The broker has about 4k instruments.
I do primary selection of the instruments by searching and filtering them according to certain rules.
On one of the instruments in the terminal there is no history (i.e., in the market watch and in the list of symbols, the instrument is present, but the data is empty).
When trying to execute the script: rates_d1 = mt5.copy_rates_from_pos(curSymbol.name, mt5.TIMEFRAME_D1, 1, analysis_days),
the script just hangs. It doesn't help to try or check for None as the error itself doesn't occur, everything hangs on this line.
If I try to execute: rates_d1 = mt5.copy_rates_from_pos(curSymbol.name, mt5.TIMEFRAME_D1, 0, analysis_days),
, i.e. specify the starting bar number from 0, it does not hang and returns an empty table.
Addendum. I also found a similar problem when I FIRST retrieve data via copy_rates_from_pos with the number of bars requested, more than there is in the history. Also the script hangs. There is no such error on second request. That's why it seems to be difficult to repeat the error (perhaps, only by deleting the entire history for the symbol).
Perhaps I was mistaken about something or missed something, but it seems to be a bug since the function must either return the data or make an error.
Reproduced, corrected.
Message to developers. Python script hangs when receiving data via copy_rates_from_pos under certain circumstances.
Let me explain the situation. The broker has about 4k instruments.
I do primary selection of the instruments by searching and filtering them according to certain rules.
On one of the instruments in the terminal there is no history (i.e., in the market watch and in the list of symbols, the instrument is present, but the data is empty).
When trying to execute the script: rates_d1 = mt5.copy_rates_from_pos(curSymbol.name, mt5.TIMEFRAME_D1, 1, analysis_days),
the script just hangs. It doesn't help to try or check for None as the error itself doesn't occur, everything hangs on this line.
If I try to execute: rates_d1 = mt5.copy_rates_from_pos(curSymbol.name, mt5.TIMEFRAME_D1, 0, analysis_days),
, i.e. specify the starting bar number from 0, it does not hang and returns an empty table.
Addendum. I also found a similar problem when I FIRST retrieve data via copy_rates_from_pos with the number of bars requested, more than there is in the history. Also the script hangs. There is no such error on second request. That's why it seems to be difficult to repeat the error (perhaps, only by deleting the entire history for the symbol).
I may be wrong or have missed something, but it seems to be a bug since the function should either return the data or make an error.
TesterHideIndicators(false) stopped working;
TesterHideIndicator sets the visibility flag for indicators that are created afterwards.
It does not change the visibility flag of previously created indicators.
You can check with the following expert
In the visualizer and in the chart opened after the simple test, MACD indicator is not visible, the Moving Average is visible
So, it works as intended
Compilation error. Any thoughts?
Use the dereference statement explicitly
A100:
Ошибка при компиляции:
Previously researched this question, this is what I found:
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
Sergey Dzyublik, 2020.04.04 21:46
Bug MT5(build 2375) compilation error when calling a function via its pointer, when an array of pointers to a function is used: