Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1180
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
Good afternoon!
Help me solve a simple problem.
Gap counter. I want to count gaps that are more than 10 points.
The variable "gap" resets to zero. I don't understand why. I've already tried everything. I've tried loops and static - it doesn't work. I suspect I wrote the loops incorrectly.
0 09:36:28.169 t EURUSD,H1: GAP!========: 1 , GAP EXPECTATION==: 182, gap time = 2020.06.15 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 2 , GAP VALUE==: 112, gap time = 2020.06.01 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 3 , GAP VALUE==: 134, gap time = 2020.05.11 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 4 , GAP VALUE==: 225, gap time = 2020.04.13 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 5 , GAP VALUE==: 192, gap time = 2020.03.30 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 6 , GAP VALUE==: 100, gap time = 2020.03.24 23:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 7 , GAP VALUE==: 926, gap time = 2020.03.16 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 8 , GAP VALUE==: 602, gap time = 2020.03.09 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 9 , GAP VALUE==: 136, gap time = 2020.03.02 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 10 , GAP VALUE==: 242, gap time = 2020.02.24 00:00:00
I can't figure out why i+1 starts the script in an infinite loop? Warning at the bottom - expression has no effect, but there is an effect)
I can't figure out why i+1 starts the script in an infinite loop? Warning at the bottom - expression has no effect, but there is an effect)
Because i+1 does not increase the value of i
It should be either i++ or i+=1
Hi all. How to calculate the indicator readings (dailymoving average) at last day's close ? Thanks
Calculate or receive ? MQL5 or 4 ?
Calculate or receive ? MQL5 or 4 ?
MQL4 get
MQL4 get
A simple moving average with period 14, shift 0, calculated using Close prices on the daily chart of the current symbol. Take the value of the first bar (zero is the current day):
A simple moving average with period 14, shift 0, calculated from Close prices on the daily chart of the current symbol. We take the value of the first bar (zero is the current day):
Thank you
0 09:36:28.169 t EURUSD,H1: GAP!========: 1 , GAP VALUE==: 182, gap time = 2020.06.15 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 2 , GAP VALUE==: 112, gap time = 2020.06.01 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 3 , GAP VALUE==: 134, gap time = 2020.05.11 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 4 , GAP VALUE==: 225, gap time = 2020.04.13 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 5 , GAP VALUE==: 192, gap time = 2020.03.30 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 6 , GAP VALUE==: 100, gap time = 2020.03.24 23:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 7 , GAP VALUE==: 926, gap time = 2020.03.16 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 8 , GAP VALUE==: 602, gap time = 2020.03.09 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 9 , GAP VALUE==: 136, gap time = 2020.03.02 00:00:00
0 09:36:28.169 t EURUSD,H1: GAP!========: 10 , GAP VALUE==: 242, GAP Time = 2020.02.24 00:00:00
Maybe it was a wrong variant? I copied it. Nothing, no results in the log.
maybe you sent the wrong version? I copied it. Nothing, no results in the log.
That's the one.
the only thing left to do is to find out in which magazine you are looking at the print results, see the experts tab