You need to compile your code - you will immediately see the description of the error (the compiler will tell you the name of the error).
More: Please insert code correctly: when editing a post, click and paste your code in the popup window (the first time I edited your post and inserted the code correctly)
//+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- longprice is a global variable, these are the local variables double longpricecheck[]; int p=0; //--- populate longpricecheck array variable with current prices for the tick, and compare to longprice[p] array variable //--- then do an alert and set the longprice[p] to null once the alert has been made. for(p=ArraySize(symbolNames)-1; p>=0; p--) { if(longprice[p]>0) (longpricecheck[p]=SymbolInfoDouble(symbolNames[p],SYMBOL_ASK)); if(longprice[p]>longpricecheck[p]) Alert("Ask above the line"); //&& longprice[p] = NULL; } }

- www.mql5.com
Thank you for fixing my code block. It was my first time posting here. At least I got the braces fixed.
It gives me no error. I need to write code to load the longprice array, and then see what it does when compiled. I think the symbolNames[p] needs to be in quotes, but will figure it out.
Okay, in that case I won't show your error. If you can't figure it out, then I'll help you.
I figured it out. Thanks for your insight. I didn't need the bracket around the line under the first If statement. I just added an additional if statement instead of doing the && idea I commented off. I just set the variable to 0 instead of Null also.
I figured it out. Thanks for your insight. I didn't need the bracket around the line under the first If statement. I just added an additional if statement instead of doing the && idea I commented off. I just set the variable to 0 instead of Null also.
Yes, you got it right. Well done, you solved the problem yourself!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I am trying to figure this out and am a noob to this, but have done a little programming in my past in school projects.
I have an indicator in MT5/MQL5 I am attempting to write. I don't know how to do the concatenation after symbolinfodouble to get the name of the pair from the array symbolNames[p] into longpricecheck[p]
I am not sure how to structure the nested IF statements, and how to do multiple conditions with the &&
Also how to do the brackets.
Thanks in advance for any advice.
Here is the code: