Replicating condition on custom mql code block
-
I would like to replicate the (top) block condition (MA200) to the custom MQL code block (bottom)

both conditions in the MA200 block and custom MQL block use the same logic. using the MA200 block connected to the green bars will execute on each bar below the 200 length moving average

But when i have the custom MQL block connected, it executes on all bars. above and below the 200 moving average. ive added print function to confirm that mt5 is reading this code and it is

im at a loss as to why its executing on all bars instead of the bars below the moving average.
-
I know how much of a pain troubleshooting\debugging code is, If someone could please point me in the right direction, I can figure out the rest.
-
Sadly, I'm not a programmer, so I'm afraid I cannot be any helpful. However, jstap is, so maybe he can.