no, you can do this, for instance.
#define ERROR -1 int init() { //---- int w_handle = WindowHandle(Symbol(),0); if(w_handle <= 0) return(ERROR); return(w_handle); //---- } int start() { //---- if(init() == ERROR) return(0); else { // ...do something.. Comment(init()); } //---- return(0); }
stewart:
One area that is not clear in the book or documentation is what the return codes should be from init(), deinit() and start() under the condition of success and failure?
The value returned is not used by the terminal, so EVERY example in the book used return(0);
One area that is not clear in the book or documentation is what the return codes should be from init(), deinit() and start() under the condition of success and failure?
Many thanks all. I will continue to use return(0) for init(), start(0) and deinit().
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
One area that is not clear in the book or documentation is what the return codes should be from init(), deinit() and start() under the condition of success and failure?
Should we always return 0 from these?