input int media1; input int media2; input int hora; bool st=false; string mns="-----", mss; void OnTick() { if(Hour()==hora) { st=true; mss="AUTORIZADO!"; } if(st==true) { if(iMA(NULL,0,media1,0,MODE_EMA,PRICE_CLOSE,0) < (iMA(NULL,0,media2,0,MODE_EMA,PRICE_CLOSE,0))) { mss="Waiting to buy!"; } else { mns="Waiting to sell!"; } } Comment("Message:",mss); }
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - You are missing semicolons at the end of your statements. @Pavel
Shutovskiy has corrected that.
Thank you very much!
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
}
Hello, this is my code and I don't know where is the problem with it. MQL4 shows me two problems unbalanced parentheses and unexpected end of program.