m.wijethunga:
Hi. I want to close only the current chart if the given condition is met in the indicator after sending an alert. So, I tried the following code. But it gives the error message " 'ChartClose' - function declarations are allowed on global, namespace or class scope only". Could someone please help me to correct this. Thank you.
bool check = ChartClose();
if(condition1==1) { Alert(text," - Condition1 OK"); ChartClose(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
Hi. I want to close only the current chart if the given condition is met in the indicator after sending an alert. So, I tried the following code. But it gives the error message " 'ChartClose' - function declarations are allowed on global, namespace or class scope only". Could someone please help me to correct this. Thank you.