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
Which one?
tried it on a couple of indicators. both used to work fine, now not.
2) there are often problems when trying to test run with connection to cores (works with the nth run). see the picture.
A group of telepaths are already looking into your problem.
you don't need to be a telepath to understand that iCustom() does not work as it should.
to test it, you can run the code of the Expert Advisor:
double buffer[];
ResetLastError();
int MA_handle = iCustom(NULL, 0, "Examples\\Custom Moving Average", 21, 0, MODE_SMMA);
//int MA_handle = iMA(NULL, 0, 21, 0, MODE_SMMA, PRICE_MEDIAN);
Print("MA_handle = ", MA_handle, " error = ", GetLastError());
int copy = CopyBuffer(MA_handle, 0, 0, 5, buffer);
if (copy == -1) Print("Failed to get Custom Moving Average indicator");
else
for (int i = 0; i < 5; i++) Print("buffer[", i, "] = ", buffer[i];
and the message "Failed to get Custom Moving Average indicator values" will result.
i.e., CopyBuffer gives an error (returns -1) for the iCustom() indicator handle. if we take the standard iMA() indicator, the same code works!
Look at the indexing direction of the resulting array, maybe it needs to be expanded.
everything is fine with the indexing direction and in previous builds this also worked. in 448 and 450 it didn't work.
I have suggested many times that developers should test the main functionality of the terminal more thoroughly,
but from build to build they get different critical errors instead of critical ones.
I.e. one thing is fixed and another thing that normally worked breaks and there is no end in sight. I guess I will never see a stable version coming (((
The slip before copying data, it takes time to calculate the indicator, so even though the handle returns correctly, the data has not yet been calculated,
In general, it is recommended to call indicators in the inite, and request data already in OnTick() or other special functions.
again, you copy 5 data from zero bar, but in the copybuffer zero bar is somewhere around 1970 (depends on max bar settings), that's why I said look at the array indexing.
The slip before copying data, it takes time to calculate the indicator, so although the handle returns correctly, the data has not yet been calculated.
Sleep(1000); // 1 sec after calling iCustom() did help, BUT. should i pick up the delay time now ? how should i know how long the calculation process will take ?
it's wrong to give the correct indicator handle pointing to rubbish ! and it must have worked correctly before because there was no such problem.
in general, it's recommended to call indicators in the initis, and ask for data already in OnTick() or other special functions.
That's a good tip for me, thanks ) because if I had done it that way, I wouldn't have seen the problem...
Again you are copying 5 data from zero bar, but in copyBuffer zero bar is somewhere around 1970(depends on max bar settings), that's why I said look at the indexing of the array.
As far as I understand from help documentation, in CopyBuffer() zero bar is actually "present time", and already when copying, the array is expanded.
Sleep(1000); // 1 sec. after calling iCustom() did help, BUT... should i now pick up the delay time ? how am i supposed to know how long the calculation process will take ?
it's wrong to give the correct indicator handle indicating the rubbish ! and it must have worked correctly before, because there was no such a problem.
Can the following indicator options (circled in red) be set programmatically?
I have not found a way to do this.
I don't know if this is a bug, but I think there are errors in the code of the libraries for all types of muvings (SignalFrAMA, SignalAMA, SignalMA, SignalDEMA, SignalTEMA) for the master, seeCSignalTEMA::ShortCondition()
Also in the SignalMA library in
I don't know if this is a bug, but I think there are errors in the code of the libraries for all types of muvings (SignalFrAMA, SignalAMA, SignalMA, SignalDEMA, SignalTEMA) for the master, see CSignalTEMA::ShortCondition()
Also in the SignalMA library in
https://www.mql5.com/ru/forum/1111/page391#comment_67358
Give the full line of the call.
/i:<path to MQL5 folder>.
Give the complete call string.
Here are all the options tried:
After each attempt, a check was carried out to see if the file existed on the path
D:\Users\Дмитрий\AppData\Roaming\MetaQuotes\Terminal\44 D6FB562C883F0C70690F3306A3851D\MQL5\Scripts\sInstallerTestScript.ex5
The inluder on the path
D:\Users\Дмитрий\AppData\Roaming\MetaQuotes\Terminal\44 D6FB562C883F0C70690F3306A3851D\MQL5\Include\InstallerTestInclude\IncInstallerTest.mqh
exists.
The existence check was performed by the function: