You logic is correct. What you need to do is:
-
Specify candle ID 1 on all condition blocks. Now you are working on cnadle ID 0 and that can lead to weird results.
-
You need to create two Constants called 'A' and 'X' and insert them in teh exact same places you wrote them. Because you wrote them manually the EA doesn't work.
Try it and tell me how it works.
