@Thank-god Avwerosuoghene Odukudu
yes it is working now. What is silly mistake I made :)
Thanks a lot man.
I have the same problem.
would you please to explain more?
I can't understand this: " Check your "indicator buffer" is set to 2 or greater".
this is the code:
*** Attention: I just try to sketched Tenkansen (H1)
-
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 #25 (2019)
Messages Editor
Forum rules and recommendations - General - MQL5 programming forum (2023) -
double TenkanBuffer_HTF_Temp[]; double KijunBuffer_HTF_Temp[]; double SpanABuffer_HTF_Temp[]; double SpanBBuffer_HTF_Temp[]; double TenkanBuffer_HTF[]; double KijunBuffer_HTF[]; double SpanABuffer_HTF[]; double SpanBBuffer_HTF[];
These are not buffers. They are plain arrays.
-
handle_Ichi_HTF_1 = iIchimoku(_Symbol, Period_HTF_1, InpTenkan, InpKijun, InpSenkouB); if(CopyBuffer(handle_Ichi_HTF_1, 0, 0, 2, TenkanBuffer_HTF_Temp)<0)
Perhaps you should read the manual, especially the examples.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.They all (including iCustom) return a handle (an int). You get that in OnInit. In OnTick/OnCalculate (after the indicator has updated its buffers), you use the handle, shift and count to get the data.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 (2020)
How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 (2020)
MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors - MQL5 Articles (2010)
How to call indicators in MQL5 - MQL5 Articles (2010)
-
Now you have changed your original post, resulting in the above reply meaningless.
-
Always post all relevant code (using Code button) or attach the source file.
How many buffers did you declare you have. You have not posted all relevant code. You were previously asked in #1 and failed to answer.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear Members
I have failed to identify the cause 'array out of range' error in my custom indicator code as below:
I understand that custom indicators handle the array sizing on it own, and hence did not attempted to set the size.