Sorry should look like this
int a; if(Open[1]>Close[1]) a=1; if(Open[1]<Close[1]) a=0 return(a);
iCustom gets the value of a buffer
Your indicator does not have any buffers, so iCustom cannot retrieve a value
If you open a new indicator in the metaeditor, the wizard allows you to set up the buffers as you require them.
There are lots of examples in the code base that you can look at to find out how to store a value in a buffer

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
Hi guys,
I´ve programmed a very simple indicator. It should return the value a, which is previously defined. Here it is:
So if i want to get the value of a with the iCustom() function, which is here
it always returns the value 0 even if Open[1]<Close[1]. Maybe you know how to solve my problem.
Thanks for your help