Boolean Error
-
bool CalculateUpperWick()CalculateUpperWick returns a bool. Since UpperWick is (almost) never zero, it returns true, which is up cast to a double and stored.
Your code if(iOpen("EURUSD", PERIOD_H1, 1) < iClose("EURUSD", PERIOD_H1, 1)) { return true; } else { return false; }
Simplified return iOpen("EURUSD", PERIOD_H1, 1) < iClose("EURUSD", PERIOD_H1, 1);
Increase Order after stoploss - MQL4 programming forum #1.3 (2017)
I've looked at it for a while but I don't quite understand what you mean. Can you please show me how to create CalculateUpperWick() . Much appreciate the help :)
DECOPMILATION FORBIDDEN!
The code compiles correctly yet a warning occurs which says "expression not boolean". In my script, if I were to Alert(UpperWick), the answer is always 1.0 rather than it calculating the upper wick in function of whether the candlestick is bullish or bearish. Much appreciate your help!