Miguel Vera: The debugger runs perfect. But script does'nt work on the chart.
The massage on expert log is quite weird, it doesnt say "initialized..."
-
When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your (original) post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless.
-
Why did you post your MT4 script question in the
Root /
MT5 Indicators section instead of the
MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. //chequear resto de velas hasta la vela 4 while (Vela_T>4)
You never change the variable, so it's likely an infinite loop. Go back to the debugger.
whroeder1:
-
When you post code please use the CODE button (Alt-S)!
(For large amounts of code, attach it.) Please edit your (original) post.
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless.
-
Why did you post your MT4 script question in the
Root /
MT5 Indicators section instead of the
MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - You never change the variable, so it's likely an infinite loop. Go back to the debugger.
i really appreciate your time helping on this. I am very sorry for posting whitout knowing the rules accurately.
If I find the way to move my post or edit it, I will.
In the other hand, the variable Vela_T is modified at the end of all instructions of the while loop.
I'll take your advice anyway, and will re-check those lines.
If you wish, you can run the code in your PC and see if you get the same results.
Thanks a lot!!!
solved.
thanks
How do you see what's going on with that indentation style?
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 am making a simple script, looking for pivots.
My code runs just just fine untill a loop shows up.
The aim of the code is create arrays with the pivots values.
The first and the second loops "for" runs with no problem (as is meant to be...)
But next loop make an erratic behavior.
The debugger runs perfect. But script does'nt work on the chart.
The massage on expert log is quite weird, it doesnt say "initialized..." (see images attached)
Tryng to fix it:
- I tried getlasterror every where in the code, Nothing. last error is always 0
- If I cut the code just before the while loop, no problem.
- I changed "while" for "for". Nothing. same error.
- If I leave only one instruction inside the loop, no problem
- if I leave more than two instruction inside the loop, puff, doesnt work
- I changed computers, script name, shorten variables names. Nothing seems to work
Thanks for your help