|
CandleCode
MetaStock Indicator
CandleCode assigns a rank to each candlestick. A strongly bearish
candle will have a very low rank, whereas one with less bearish
sentiment will get a slightly higher rank. A bullish candle will get
a high rank and a strongly bullish candle will occupy the highest
place in this hierarchy. This scheme has worked well and has
introduced order to the world of candlestick charting.
|
Bdy:=Abs(O-C);
Lshd:=If(C>=O,O-L,C-L);
Ushd:=If(C>=O,H-C,H-O);
ThBotB:=BBandBot(Bdy,55,E,0.5);
ThTopB:=BBandTop(Bdy,55,E,0.5);
ThBotL:=BBandBot(Lshd,55,E,0.5);
ThTopL:=BBandTop(Lshd,55,E,0.5);
ThBotU:=BBandBot(Ushd,55,E,0.5);
ThTopU:=BBandTop(Ushd,55,E,0.5);
CCode:=If(C=O,1,0)*If(Ushd>=Lshd,64,48)+If(C=O,0,1)*(If(C>O,1,0)*(If(Bdy<=ThBotB,80,0)+If(Bdy>ThBotB
AND Bdy<=ThTopB,96,0)+ If(Bdy>ThTopB,112,0))+ If(C<O,1,0)*(If(Bdy<=ThBotB,32,0)+
If(Bdy>ThBotB AND Bdy<=ThTopB,16,0)))+(If(Lshd=0,3,0)+
If(Lshd<ThBotL AND Lshd>0,2,0)+ If(Lshd>ThBotL AND Lshd<=ThTopL
AND Lshd>0,1,0))+(If(Ushd>0 AND Ushd<=ThBotU,4,0)+ If(Ushd>ThbotU
AND Ushd<=ThTopU,8,0)+ If(Ushd>ThTopU,12,0));
CCode; |
|
|