Forum on trading, automated trading systems and testing trading strategies
General rules and best practices of the Forum.
Alain Verleyen, 2018.08.03 23:01
When you post code please use the SRC button !
I did it myself but I am sure others will want to know so here it is:
int iIndicatorCount =0; int totalIndicators = ChartIndicatorsTotal(0,0); for(int i=0; i<totalIndicators; i++) { string indicatorName = ChartIndicatorName(0,0,i); if ((indicatorName == "My Funny Indicator") || (indicatorName == "His Funnier Indicator")) iIndicatorCount ++; } if (iIndicatorCount < 2) { Alert ("Two funny indicators are required"); return ERROR; }
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
What is the best way of checking if a required indicator is on the chart before proceeding?
I was looking along these lines but I am struggling to find a better function to do the job that ObjectsTotal() ?