How can I specify a distance between indicators?
-
I want to create an EA in which the main condition is that a Moving Average must be AT LEAST 30 pips above/below another Moving Average. Which block should I use? I see that the "Condition" one can compare the value of indicators but apparently not distances.
Any help?
-
Hi
This could be work for your purpose

Regards
-
Great! Thank you very much

-
I found this within the "Condition" block. Would it work?

In this example, the value of the second operand (the right MA) would be modified by susbtracting it 20 pips, if I understand it correctly. Is this how it works?
-
Yes, this should remove 20 pips from the value of MA20. If the value of MA20 is let's say 1.2345, then this value will be modified to be 1.2325 (which is 1.2345 - 0.0020). You can actually see the result of this calculation if you try this in the "Trace" block
-
Ok. Thank you.