luccc:
Hi, I'm trying to create a function which returns the number of indicators in use at a given time. For now the code is showing no errors or warnings but the function always returns 0. Since both the final 2 parameters are set as true, the function should be returning 2. How can i resolve this issue?
I know i haven't provided code from the parameters (only because its so long) but i assure you they all work perfectly! Thanks!
Your code does not make much sense and needs to be simplified.
Is this perhaps what you are looking for?
int numberOfIndicators( bool pBuyingCandleStickFormationComplete, bool pSellingCandleStickFormationComplete, bool pRSIEntryRequirement, bool pBB2EntryRequirement ) { int Numberofindicators = 0; if( pBuyingCandleStickFormationComplete ) { if( pRSIEntryRequirement ) Numberofindicators++; if( pBB2EntryRequirement ) Numberofindicators++; }; return Numberofindicators; };
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'm trying to create a function which returns the number of indicators in use at a given time. For now the code is showing no errors or warnings but the function always returns 0. Since both the final 2 parameters are set as true, the function should be returning 2. How can i resolve this issue?
I know i haven't provided code from the parameters (only because its so long) but i assure you they all work perfectly! Thanks!