See documentation for EMPTY_VALUE and check you indicator code when your condition is false.
![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
the code for an Indicator
the code for EA to call the Indicator by iCustom()
The result is
2013.12.02 14:31:39 2013.11.28 23:55 aTestEA USDJPY,M5: y[0-8]:2147483647, 102.286, 102.286, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:39 2013.11.28 23:45 aTestEA USDJPY,M5: y[0-8]:102.286, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 102.257, 102.257
2013.12.02 14:31:39 2013.11.28 23:15 aTestEA USDJPY,M5: y[0-8]:2147483647, 102.257, 102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:09 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:08 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:08 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:08 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:08 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
2013.12.02 14:31:39 2013.11.28 23:08 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.256, 102.257, 102.257, 102.257, 102.294, 102.257, 102.294
..........
2013.12.02 14:31:39 2013.11.28 22:49 aTestEA USDJPY,M5: y[0-8]:102.257, 102.257, 102.294, 102.257, 102.294, 102.294, 102.294, 102.294, 102.294
2013.12.02 14:31:39 2013.11.28 22:48 aTestEA USDJPY,M5: y[0-8]:102.256, 102.257, 102.294, 102.257, 102.294, 102.294, 102.294, 102.294, 102.294
2013.12.02 14:31:35 2013.11.28 00:02 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:02 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:01 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:35 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.174, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 aTestEA USDJPY,M5: y[0-8]:102.18, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
2013.12.02 14:31:34 2013.11.28 00:00 High_Low_Ind USDJPY,M5: loaded successfully
I can't understand the result as below:
1. the second line(from bottom), when the new price coming, array Bar_High[0] gets the new price and Bar_High[1] will get Bar_High[0]'s previous value, but in the result not,why?
2. how does the big value "2147483647" come again at the very top lines?
I think there is still something which I don't understand about indicator buffer array, but I don;t know exactly, that is why i post this .