You need to create a code block for the "if" ...
void down_count() { for(int i=0; i < 50; i++) { double histo = iCustom(NULL, 0, "MACD True", 2, i); double val1 = iFractals(NULL, 0, MODE_UPPER, i); if(histo < 0 && val1 != 0) { double A = val1; Print(" A= ", A); } } }

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
I get undeclared indentifier for A when printing from void type.
Is this because the loop has ended or because I am not allowed to print from void type like this ?