now I have make an Indicator, besides the indicator line, also drawing another line -- x.
the code as below:
when I attached to the chart. the line x will not be drawn(Expert complain unknown window), but if I compile the code again, the line x will shown.
Then I want to know get some explanation about this, and know the exact executing order for codes.
Thanks.
Are you drawing lines using Indicator buffers or using Objects ? or are you drawing one line with a buffer and another with Objects ? the separate window probably doesn't exist when init() is called, move your Object code to start and check if the window exists.
yes, I drawing one line with a buffer and anther with Object. I know when I move the "Object " into start(), it works well.
but I want to know when the separate window exist ?
yes, I drawing one line with a buffer and anther with Object. I know when I move the "Object " into start(), it works well.
but I want to know when the separate window exist ?
I don't know for certain but probably when the Indicator buffer is first used and a value written to it, so the first tick that calls start() . . . . I think.
Ok, Thanks
I guest the executing order for the codes in Indicator is as below:
int init() function run at the first of all the codes, then the start() function and #property, and then int deinit().
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
now I have make an Indicator, besides the indicator line, also drawing another line -- x.
the code as below:
when I attached to the chart. the line x will not be drawn(Expert complain unknown window), but if I compile the code again, the line x will shown.
Then I want to know get some explanation about this, and know the exact executing order for codes.
Thanks.