I want to use that block in my new EA but apparently I don't understand how it works. This is my code so far:
https://fxdreema.com/shared/qAmLLKSCb
And this is what I want it to do:
-
I'm using the "superprofit" indicator. It shows a continuous line that changes from green to red depending on the trend. This means that when the red buffer appears the green one disappears and viceversa.
-
There are two conditions required at a higher time frame before a trade can be opened. They are not relevant in this case.
-
Once both conditions are met new conditions must be met at the current time frame and this is where this block is to be used. What I want is a new change of buffer colour after the higher time frame are met.
Let me put an example. Conditions at the higher time frame indicate uptrend. What I want is that on the current time frame, when the superprofit changes from downtrend (red) to uptrend (green) that condition is then met, but not if the buffer right now is just that. So, if the higher time frame indicates uptrend but the superprofit indicator is green right now at the current time frame, I want it to become red first and then green again for the condition to be met.
It doesn't work right now. I specify at blocks 24 and 25 which buffer I want it to appear, but apparently I'm missing something because no buffer change is detected and condition is considered as permanently met, no matter what the indicator is showing.
Could someone please help me?