dojistarr:
Thank You, we'll check it asap
The following code creates 2 custom indicators using iCustom. Each call passes different parameters and yet the same handle is returned for both calls. Obviously I should have got 2 different handles.
The code prints the different parameter with the returned handle.
Is this an expected behaviour? How can I force MT to create two different indicators (with two different handle) for different parameters (that are supplied in this format)?
stringo:
Thank You, we'll check it asap
Thank You, we'll check it asap
Here is a more correct snippet
int OnStart() { string units, strUnit[2]; units = "aaa;bbb"; // this produces expected results // strUnit[0] = "aaa"; // strUnit[1] = "bbb"; // this doesn't strUnit[0] = StringSubstr(units, 0, 3); strUnit[1] = StringSubstr(units, 4, 6); string unit; int handle; for (int i=0; i<2; i++) { unit = strUnit[i]; handle = iCustom(NULL,0,"iTest",unit); Print(unit, ": ", handle); } return(0); }
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
The following code creates 2 custom indicators using iCustom. Each call passes different parameters and yet the same handle is returned for both calls. Obviously I should have got 2 different handles.
The code prints the different parameter with the returned handle.
Is this an expected behaviour? How can I force MT to create two different indicators (with two different handle) for different parameters (that are supplied in this format)?