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
Error loading file in Expert Advisor. Find 10 differences. The first code refers to the script, the second to the Expert Advisor, they are identical Ctrl-C Ctrl-V. The code works in the script, it does not work in the Expert Advisor.
To find 10 differences, you need to look at the code of file opening. (and add to this open code output of error code in case of failure)
Second, if you want to test EA with this file add line #property tester_file "KitMaRsi.csv" to EA code
Hello. In MQL4, when executing a program, the ERR_HISTORY_WILL_UPDATED(4066) error may occur, the code of which is returned by the GetLastError() function. Do you have a similar error in MQL5? I searched herehttps://www.mql5.com/ru/docs/constants/errorswarnings/errorcodes but did not find anything similar.
I will not say anything about the error. The terminal itself makes sure that the data are synchronised, you can synchronise (load) the data and check whether the history is synchronised or not.
The organization of data access is described here (there is an example of history loading script).
Functions that may be needed: SeriesInfoInteger and SymbolIsSynchronized
The switch with character variables doesn't seem to work...
Instead of:
'Type' - illegal switch expression type
'Buy' - constant expression is not integral
Use identifiers rather than text. Which would be simpler and more logical...
The switch with character variables doesn't seem to work...
Instead:
'type' - illegal switch expression type
'Buy' - constant expression is not integral
I have to draw it like this:
It's not so clear and it's crooked.
It works well in other languages.
Should I write it in another way?
I did this.
I will not say anything about the error. The terminal itself makes sure that the data are synchronised, you can synchronise (load) the data and check whether the history is synchronised or not.
Organization of access to data is described here (there is an example of history loading script).
Functions that may be needed: SeriesInfoInteger and SymbolIsSynchronized
Are there analogues of such libraries as stdlib.mqh, WinUser32.mqh, stderror.mqh in MQL5, in particular, I am interested in PostMessageA function?
When optimising with multiple agents, the results are displayed on the chart in the order they are processed, i.e. alternating. Is it possible to make the order in which the results are displayed according to the selection of parameters, as it was in MT4? I.e., the result that came later would be inserted in the proper order. I'm just saying that it's not convenient to follow trends and regularities during optimization and the results can be analyzed only after the calculations are done.
++: It's all about optimization with full brute force - it naturally doesn't make sense on genetics.
Description in the handbook
In fact
bool ObjectCreate(
long chart_id, // chart identifier
string name, // object name
ENUM_OBJECT type, // object type
intn win, // window index);
Let's run the iFractals example code from the help on M1, which uses the second - full - form of OnCalculate() function call. But before that inside this function let's correct
to
in order not to lose sight of a single line with the output (if we leave it as it is, visually 1 will always be visible, because other values are rare and immediately replaced by 1, so it seems that 1 is always displayed) After runtime we see that non-unit values occur every minute, i.e. on every new bar, which unequivocally indicates that the indicator is redrawn every minutefully despite the fact that the code useseconomical algorithm. The doubters can add several lines of code, drawing, say, vertical lines on each fractal and then remove them after the first drawing and wait for the full set of the same lines to appear after a minute with a new bar. Anything about finishing only last fractal or line is out of the question for some reason.
Yes, indeed, the indicator from the example at the iFractals() function refreshes its indicator buffers with values from the built-in indicator. The second condition in the line (highlighted in yellow) is "to blame" for this:
Explanation: on each tick these two values are compared and there is an assignment at the end of the function
//--- запомним количество значений в индикаторе Fractals bars_calculated=calculated;
And the difference between them can arise in spirit:
In this case the separation of the two events is not done, you've discovered that. I can't say yet if we're going to fix this example so that we don't have such questions.