Please check the code - page 3

 
Thank your for the histogram idea))
RaptorUK:
Thank you :-) learn something new every day :-)
 
dabbler:

I did spot this ...

which is a bit naughty. The second parameter should be 0 not NULL (regardless of what the numerical value of NULL happens to be at this point in time).

https://docs.mql4.com/series/ihigh





I changed it 0, nothing changes, why is Null not valid, could you please explain, thx!
 
Jay007:

I changed it 0, nothing changes, why is Null not valid, could you please explain, thx!

There are many constants defined as symbols. It is considered bad practice to use the numerical value of such a constant as that make the code breakable by future code releases. The idea is to make the code both readable and maintainable.

Consider this set of constants ...

https://docs.mql4.com/constants/series

The value of MODE_OPEN just happens to be 0 but if you wrote

         dHigh1 = iHigh(NULL,MODE_HIGH,pos+1);

the code would still work but would be less than helpful to a reader.

In your case the first variable is of type string and the second is of type int. It is really bad form to put the wrong type of variable or constant into a function call.