Hello
Im having a little trouble with the iCustom function, my code so far is as follows -
Can any one give any hints why it might not be accepting the string for the currency pair?
thanks
fatcheese,
I suppose your problem is in the following line:
open_pair=StringConcatenate("\"", pairs_names[0], pairs_names[1], "\"");
Try removing the quotes. Then the line will look like this:
open_pair=StringConcatenate(pairs_names[0], pairs_names[1]);
Good luck!
fatcheese,
I suppose your problem is in the following line:
fatcheese,
I suppose your problem is in the following line:
I think its the fact iCustom wont accept a string for some reason,
those quotes are there as they are required for iCustom
Try the following code:
open_pair = pairs_names[0] + "/" + pairs_names[1]
FatCheese
I see no mention of "iCustom" in your supplied code.
iMA() is what your code shows.
A symbol string does not have double quotes. Double quotes are used to describe a series of characters as a string. They are not generally speaking as part of the string as your code does.
You have in fact assigned to open_pair a string "\"EURGBP\"" ie, "EURGBP" and the system expects to get EURGBP without the surrounding double quotes
Additionally, a symbol pair name string does not have "/" embedded in it.
"EURGBP" is correct string for any symbol pair reference on the ClientTerminal platform.
I have no knowledge of other formats required by other brokers, but assume is same.
ALL docs I have ever read use xxxyyy to identify symbol.
Also, if your code is only interested in the chart which it is attached to then use: Symbol() or NULL. You could even use "EURGBP" but why hard code stuff - makes code maintenance a nightmare!
Have you looked at the interface spec for iMA() ?
Have you read the THE BOOK ?
btw, I understand that maybe you want to print out or alert with the symbol name and you maybe want to show as EUR/GBP or "EURGBP", but that is not related to what you pass to iMA() or any function wanting symbol string.
HTH
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
Im having a little trouble with the iCustom function, my code so far is as follows -
Can any one give any hints why it might not be accepting the string for the currency pair?
thanks