Please insert the code correctly: FIRST press the button
, and THEN paste the code in the pop-up window.
![Code Code](https://c.mql5.com/3/367/Code__1.png)
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
int intervalPredicate(double close, double open, double high, double low){…} double extreme_point (int intervalPredicate, double &higharray[], double &lowarray[]){ if (intervalPredicate == 1) {
Do not post code that will not even compile. If it's a function, how can it be a variable?
![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
I am trying to build an EA that defines a zone and counts the number of the tests to the zone. I calculate the highest/lowest point of the last 200 bars. Use it as the upper/lower border and calculate lower/upper border with the 3*atr. The goal is to find out how many times a price zone is tested. Also the tests to the zone must be at least 10 bars apart. But somehow the code keeps giving me mixed results. Sometimes it prints a signal where it shouldn't, sometimes it doesn't print where it should and sometimes prints a signal at a level depending on the outputs even debugging shows that it should anyway.
***