Block logic "Indicator moves within limits"
-
... seems to evaluate one situation wrongly:
When the earliest bar is the only one NOT satisfying the condition, the output is false (wrong result), when "With exception of few candles" is one or greater.
When the exception occurs in any other bar, the output is true (the correct result).
-
@sparrow Hello. You mean ignore the wrong bar and count (as correct) only the right bar?
-
@pheaktra-capo I don't understand your question. Could you please explain.
-
@sparrow Personally never used this block. Can you please share a visual example of the problem?
-
https://fxdreema.com/shared/c0utwZIkb
Meanwhile, I found another issue that might be related. When running EU M1 with block "Indicator fall" as in the demo project (see also screenshot below), there are frequent "holes" in the sequence of falling SMA50 values (see second screenshot below). Even though the SMA50 values are falling all the way. As verified with the MT5 Data Window.

It might be a double value / pip value precision issue.

EDIT: The same thing happes with block "Condition". Tried this as a workaround but failed in the same way. Screenshot of this block below.

-
@sparrow Working on 1 minute is always very tricky. My suggestions is testing this exact config in 1H and check is the problem still persists. Then I see you are using 'once per par'. That means each 1M is checked as soon as it is open but price can move a lot before the next one appears. Remove it and try again.
-
Many thanks, @l-andorrà for your suggestions,
The reason are changes in indicator values less than a pip fraction. This can happen in any timeframe depending on the indicator calculation logic. Woudln't it be better to NOT normalize double values so that coparisons are exact no matter what?
-
Honestly I don't know. I try not to work on 1M. Maybe it can work but the only way to know it for sure is testing. Sorry for not being more helpful.
-
@Sparrow said in Block logic "Indicator moves within limits":
https://fxdreema.com/shared/c0utwZIkb
Meanwhile, I found another issue that might be related. When running EU M1 with block "Indicator fall" as in the demo project (see also screenshot below)
I checked this and the problem looks to be that I'm rounding the indicator value to 5 digits (or whatever the symbol digits are).
There was a time in the past when I decided that I should use the NormalizeDouble() function for each MQL5 indicator (doesn't apply for MQL4), mostly to minimize some crazy long numbers that often happen when doing calculations. I selected the number of digits for each indicator. In case of MA, it's the number of digits for the symbol, which is 5 for EURUSD. Usually this is not a problem, but in your case it is, because you are detecting very small MA changes.
I changed the rounding digits to 10 for MA. Now my tests are showing white vertical lines on every candle, so I guess I fixed something. I will do this for the other indicators as well.
I didn't tested "Indicator moves withing limits". Is there still a problem there?
-
Many thanks! All is working now. Including "Indicator moves within limits".