Questions from Beginners MQL5 MT5 MetaTrader 5 - page 115
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 indicator has different data in the data window. I attach the EA to the H1 chart and it copies the data from the M5 M15 and H1 timeframes.
Buffers (you have zeros) and arrays where you copy are all the same, you start with 1 element, copy 1 element, maybe the direction of the array also matters.
Well, yes, the first indicator buffer, on three different tamframes. And so far I'm using the same array for logging data.
I tried to set ArraySetAsSeries true and false. All the same, sometimes strange data like -4.53e-32 appear in the log.
Gentlemen, can you tell me how to implement this?
There is an array, a value is written to it, and if it contains a similar value, there is a bang.
You should try to search the array elements to see if they match the required value. If no match is found, write the value into the array.
And how to compare two indexes in one array?
Care to read the article carefully ? >> MQL5 programming basics - Arrays
It has all the details for all the cases that deal with arrays. It should definitely suffice for you. ))
Care to read the article carefully ? >> MQL5 programming basics - Arrays
It has all the details for all the cases that deal with arrays. It should definitely suffice for you. ))
Friendly, we should insert into the code the checks for success of creating handles and for success ofCopyBuffer() function . Otherwise we do not even know if this trash value is a result of successful execution ofCopyBuffer() function or the function did not work properly.
Checked. Handles are created normally, indexes are 10, 11, 12. But CopyBuffer function generates error ERR_INDICATOR_DATA_NOT_FOUND. Why can this error occur, the selected pairs are in the Market Watch window, charts of these currency pairs are open.
Moreover, I create a variable, which shows the result of CopyBuffer execution,
int aaa = CopyBuffer..., it shows value 1, as if one value was copied, as defined in the function.
When copying the MA buffer the same error is shown, but the value is written into the array correctly.
Please show us an example of correct buffer copying
Furthermore, I create a variable which shows the result of CopyBuffer execution,
int aaa = CopyBuffer..., it shows value 1, as if one value was copied, as defined in the function.
When copying the MA buffer, the same error is shown, but the value is written to the array correctly.
Please show me an example of how to copy buffer correctly
Yes, the example of buffer copying is right in the description of function CopyBuffer(). Please pay attention to lines