I usually solve the problems I encounter on my own, but this time I have run out of ideas.
I have another indicator where I do not encounter this problem. My indicator works as expected when inserted into a chart,
but when I try to access two buffers with iCustom, both buffers give me the value of the first one, whichever has the index 0.
Anybody has an idea what the cause could be ?
Maybe both buffers have the same value?
You are not providing enough information.
Where is your code?
What values are you expecting and why?
What values show in the data window?
I said the indicator works as expected when inserted into a chart.
Thanks for the quick reply, but can't you give me some valid ideas without seeing code ?
this is correct answer
I found the problem: PRICE_CLOSE in the parameters. For some reason I thought it was supposed to be there and I never questioned it
again. The other indicator I made has it.
I'm so happy it works now.
In future, please show the code that is giving you problems.
As soon as I was able to see your iCustom calls, your mistake was obvious.
If the code had been shown in your first post, you would have received the answer straightaway.
In addition, you posted in the general forum. Therefor we assume that you are talking MT5, and iCustom returns
a handle. Therefor your
Print statements are meaningless, they should print random integers.
Why did you post your MT4
question in the
Root / MT5 General section
instead of the
MQL4 section, (bottom of the Root page?)
rules and best pratices of the Forum. - General - MQL5 programming forum Next time post in the correct place. The
moderators will likely move this thread there soon.