open and close trade when the indicator changes color
-
I need to build a robot that opens and closes the trade when the line indicator (plotted on the chart) changes color. And do only trade when the line indicator (in separate window) is the same color.
How do I do this? -
Colors mean nothing for the EA, the values in the output buffers are what you are looking for. For example, you may have 2 separate buffers, one for the first line and one for the second. And if both lines have different colors, you see something like one line with 2 colors, but they are 2 separate lines :))
So, first try the indicator with Trace block, to see what's inside those buffers - https://fxdreema.com/demo/mt4-trace-multiple
When you know the values in the buffers, you can decide how to use the indicator, because it really depends.
-
hello and thx for kindly reply . sorry could you please help me more how can i know indicator lines color changing?
-
@birdana That depends on the indicator. Does the indicator show those colours in its buffers?