There are two errors, one of them trashes MT4 until it is restarted.
for ( int i = 0 ; i <= Bars ; i ++ )Try Bars -1, you may be over running the storage size of the array you are writing to
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Lime
#property indicator_color4 Peru
#property indicator_chart_window
#property indicator_buffers 4
int init ()
{
IndicatorBuffers ( 3 ) ;
Mismatched declarations for the number of buffers
Fix that.
Restart MT4
---
Not sureif the order of the #property settings is important, but, change it to
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Lime
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The highs were easy. I figured out an even easier way of doing it afterwards (because by looking at it you'll know I'm an idiot) but I left it this way.
As far as the lows go, The Hourly Low will not store into the Buffer Array. It stores into a basic variable, but will not store in the Array.
Here's the complete code.
LowHourArray[i] is meant to store the lowest point in the last hour.
Any help will be much appreciated.