# problem with #property strict 32

Hello

I have a problem with the following coding.

I know the problem is because of using the following code :

`#property strict`

When I use it, I have the  error : 2019.11.16 12:03:11.915 2017.01.02 00:00:00  S_R EURUSD,H1: array out of range (75,43)
Can you help me solve the problem?

thanks

```#property copyright ""
#property strict
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Yellow
#property indicator_color2 Yellow

//---- input parameters

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];

int K;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Yellow);
SetIndexDrawBegin(0,K-1);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexLabel(0,"Resistance M15");
SetIndexArrow(0, 158);
SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Yellow);
SetIndexDrawBegin(1,K-1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexLabel(1,"Support M15");
SetIndexArrow(1, 158);

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//------------------------------------------------------------------
bool Fractal (string M,int P, int shift)
{
if (Period()>P) return(0);
P=P/Period()*2+MathCeil(P/Period()/2);
if (shift<P)return(0);
if (shift>Bars-P)return(0);
for (int i=1;i<=P;i++)
{
if (M=="U")
{
if (High[shift+i]>High[shift])return(0);
if (High[shift-i]>=High[shift])return(0);
}
if (M=="L")
{
if (Low[shift+i]<Low[shift])return(0);
if (Low[shift-i]<=Low[shift])return(0);
}
}
return(1);
}
//------------------------------------------------------------------
int start()
{
int  M15=15;
K=Bars;
while(K>=0)
{
if (Fractal("U",M15,K)==1) ExtMapBuffer1[K]=High[K];
else ExtMapBuffer1[K]=ExtMapBuffer1[K+1];
if (Fractal("L",M15,K)==1) ExtMapBuffer2[K]=Low[K];
else ExtMapBuffer2[K]=ExtMapBuffer2[K+1];

K--;
}

return(0);
}``` 3768

You are trying to assign to ExtMapBuffer1[K] the value of K+1. At the beginning K is equal to Bars, and K+1 will be Bars+1. The array of an indicator cannot be bigger than bars.

Try to change the code in this way

```K=Bars-1;
```

Please, consider the use of IndicatorCounted() in order to avoid indicator to recalculate ALL bars for each new tick, it will be very resources heavy. 20210

You should stop using the old event handlers and IndicatorCounted() and start using the new ones.
Event Handling Functions - Functions - Language Basics - MQL4 Reference
How to do your lookbacks correctly.
{"ft_lang_label":"__label__en","ft_lang_prob":0.87315524,"math_prob":0.7745162,"size":645,"snap":"2019-51-2020-05","text_gpt3_token_len":182,"char_repetition_ratio":0.09828393,"word_repetition_ratio":0.0,"special_character_ratio":0.3007752,"punctuation_ratio":0.15923567,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97308266,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-20T14:12:59Z\",\"WARC-Record-ID\":\"<urn:uuid:640da904-3e5f-47ad-a093-5ade22c8972e>\",\"Content-Length\":\"37427\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:74419bf1-d8d8-4003-bd70-04e0e47d56d0>\",\"WARC-Concurrent-To\":\"<urn:uuid:1fdde887-1322-416e-821c-cac64d7a27d9>\",\"WARC-IP-Address\":\"78.140.180.100\",\"WARC-Target-URI\":\"https://www.mql5.com/en/forum/326595\",\"WARC-Payload-Digest\":\"sha1:XWEMUKMYE3OCXVIO4JB7HNXYF7BJFBWR\",\"WARC-Block-Digest\":\"sha1:TOCGQEQV6UTVBRLWQGCZHIZNSQHFUF5K\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250598800.30_warc_CC-MAIN-20200120135447-20200120164447-00182.warc.gz\"}"}