- So, How can I get [ indicator_date, indicator_value] pairs?
This is not how CopyBuffer works. You have to use bar indices and number of indicator values you need. Dates are not allowed.
CopyBuffer(Handle_ZigZag, IndexZigZag, start_index, count, BufferZigZag);
This is not how CopyBuffer works. You have to use bar indices and number of indicator values you need. Dates are not allowed.
I Appreciate You, My friend.
I think this is the best solution for me. But CopyBuffer() should work with start- end date according to: https://www.mql5.com/en/docs/series/copybuffer
- www.mql5.com
I Appreciate You, My friend.
I think this is the best solution for me. But CopyBuffer() should work with start- end date according to: https://www.mql5.com/en/docs/series/copybuffer
Handle_ZigZag = iCustom(S,TimeFrame,Indicator_1_Name, Depth, Deviation, BackSteps) ; int count_of_indVal = CopyBuffer(Handle_ZigZag, IndexZigZag, StartDate, StopDate, BufferZigZag); int count_of_indDats = CopyTime(_Symbol, TimeFrame, StartDate, StopDate, time) ;
-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Your posted code is without context. Are those lines together, or is the iMA/iCustom call in OnInit? Always post all relevant code (using Code button) or attach the source file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Every One
Simply Speaking, I need to get Indicator value and it's corresponding dates, I do this by the following lines of codes:
Handle_ZigZag = iCustom(S,TimeFrame,Indicator_1_Name, Depth, Deviation, BackSteps) ;
int count_of_indVal = CopyBuffer(Handle_ZigZag, IndexZigZag, StartDate, StopDate, BufferZigZag);
int count_of_indDats = CopyTime(_Symbol, TimeFrame, StartDate, StopDate, time) ;
i.e I get indicator values by CopyBuffer(), and get it's corresponding dates by CopyTime() function. according to the MQL5 references, the output of this two functions should be the number of data. So, I expected
these two be the same, i.e have the equal value (or: count_of_indVal == count_of_indDats ). But this is not the case!! , I mean the amount of count_of_indVal variable aren't equal to count_of_indDats variable!!
- Why Is this So ???
- So, How can I get [ indicator_date, indicator_value] pairs?