Traders' Tips from TASC Magazine

Coding Candlesticks (II)

In my article in this issue, "Coding Candlesticks (II)," I continue with a discussion of my method for quantitatively analyzing candlestick charts, a discussion I began in the November 1999 issue of STOCKS & COMMODITIES with my original article, "Coding Candlesticks". My approach is to assign values to each candlestick, so that candlestick charting will lend itself better to analysis with indicators, pattern recognition, and trading systems.

Here is the code for the CandleWeight indicator I discuss in this month's article.

If(CLOSE=OPEN,1,0) * If(Fml("ushd")>=Fml("lshd"),64,-64)+
If(CLOSE=OPEN,0,1) *
If(CLOSE>OPEN,1,-1) * (If(Fml("body")<=Fml("thBot_b"),80,0)
     +If(Fml("body")>Fml("ThBot_b") AND Fml("body") <=
     Fml(THTop_b"),96,0)+
If(Fml("body")>Fml(ThTop_b"),112,0)) + If(CLOSE>=OPEN,-
4,4)*(If(Fml("Lshd")=0,3,0)+If(Fml("lshd")<Fml("ThBot_l") AND
     Fml("lshd")>0,2,0)+
If(Fml("lshd")>Fml("thBot_l") AND Fml("lshd")<=FML("ThTop_l")
     AND Fml("lshd")>0,1,0))+If(CLOSE>=OPEN,1,-1)*(
If(Fml("ushd")>0 AND Fml("ushd")<=Fml("ThBot_u"),4,0)+If(
     Fml("ushd")>Fml("ThBot_u") AND Fml("ushd")<=
     Fml("thTop_u"),8,0)+If(Fml("ushd")>Fml("ThTop_u"),12,0))


Contents