Candlestick Analysis

 
Suppose you want to analyse the candles in shown on the attached image (e.g. to test a Japanese engulfing pattern). On the image the candle labeled 0 refers to the current situation in the market and candles 1 and 2 refer to the last to periods.

To avoid misinterpretation you want to make sure that the real body of candles(1&2) are not very small comparing to the high-low difference. What would you do to make sure about this?

Do the following lines calculate the difference between high-low and close-open of each session?

high_low_2=High[2]-Low[2];
high_low_1=High[1]-Low[1];
close_open_2=MathAbs(Close[2]-Open[2]);
close_open_1=MathAbs(Close[1]-Open[1]);

 
body2         =close_open_2/Point;
whole2        =high_low_2/Point;
if you want to indicate by number

if(body2>30).......any code.....


if you want to indicate by percent

percentbody2 =MathRound(body2/whole2*100);

or any other specific condition


may this help

 

Thanks. I'll check this out as soon as I get back home.