get shape on EA

 

hi,

how can I get EA code to descript the various shape of bars or MACD? such as double bottom, head and shoulder? some examples for reference? Thanks.

 
First you have to decide on your own definitions of these candle arrangements . . . for example, what is a double bottom ? the rest is easy . .
 
heyigeng:

hi,

how can I get EA code to descript the various shape of bars or MACD? such as double bottom, head and shoulder? some examples for reference? Thanks.

The fact is that only a human being can spot these patterns because they are subjective. Once you can invent an algorithm to detect them then the coding is going to be pretty straightforward. The algorithm itself is going to be difficult (I suspect). Possibly you would use a zig-zag indicator and inspect the highs/lows.
 
yes, the most difficult things are definitions of these candle arrangements. zig-zag is good to inspect the highs/lows before. it seems a good idea. however, for definition everytime, the EA always do somethings different from my mind:)
Reason: