Here, you need these ; ; ;
To be precise . . . .
if (...certain parameters are met...) // Buy criteria { bool Open_Long=true ; <-------- // Then open a long position } if (...certain parameters are met...) // Sell criteria { bool Open_Short=true ; <-------- // Then open a short position } // Error with order execution? Open_Long=false ; <--------
...duh.
Thanks, I figured it was something obvious I was overlooking!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
This happens to me occasionally and I can't figure out why. I've searched throughout the forum and tried numerous changes for the last hour and can't figure it out:
I keep getting a "Open_Short - variable not defined" error...whereas my Open_Long variable works perfectly. Obviously they're both supposed to be booleans, but MT4 is not recognizing Open_Short as a variable.
Please help!