I´m trying to programmatically analyse candle stick pattern: I have historical OCHL data that I want to perform an automated analysis on, via b4j which is a programming language. The thing is that I do not know how to distinguish between a common doji and a longlegged doji - and I may run into other headaches like this. Yes, on some nice chart it looks pretty obvious: The common doji shows that the price has not moved much during the timeframe neither up nor down, whereas the longlegged doji shows that alot more happened with the price before it returned to the opening price. But how do you decide, if wanting to mimic this, what is alot and not so much? When is a common doji a longlegged doji? Where´s the threshold? 2 %... ? I guess that´s all relative to previous price action scaled over many candles, determining when something is long or shortlegged, but what´s the formula to do this? I have been googling this but could only find formulas describing what various common candlesticks look like in code, but I would think that deciding what their strength is also depends on a range of historical candlesticks to which they are relative.
Thanks in advance!