Spotting consolidation

 
I am trying to program an EA to be able to spot consolidation. It is easy to spot visually, but I have not come up with a good way of spotting it numerically. Any ideas?
 

https://www.mql5.com/en/code/mt4

can this help?

I suppose when in consolidation the price moves in tight channels

 

perhaps you could try to describe in details how you spot it visually...in other words to define what you consider "consolidation"...in details...

then you can code an EA/indicator according to this definition.


thank you

Automated (automatedfx@gmail.com)

--

my latest grid trading:
http://fx-grid2.forexmosaic. com/ - 55% profits for 6 weeks
http://fx-grid3.forexmosaic. com/ - 40% profits for 4 weeks

Reason: