 MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

CandleWeight by Viktor Likhovidov

Viktor Likhovidov's article "Index Of Chart Sentiment" builds on his previous articles
presenting CandleCode (November 1999, April 2001). In this month's article, Likhovidov gives the MetaStock formula for the double-smoothed symmetric variant of CandleCode (IndSent - CW), which requires the formulas he introduced in the previous articles.

These formulas are given here. These formulas are all used by the CandleWeight formula through an Fml() function. It is very important that the names are typed exactly the same everywhere you see them. If either spacing or capitalization is off, the referencing formula will give errors.

First, create the following three formulas in MetaStock. To do so, go to Tools | Indicator Builder. Click New and enter the name for the formula. Then click in the larger window and enter the actual formula. Click OK. If the formula was entered with no syntax errors, you will be returned to the Indicator Builder, ready to create the next formula.

body

Abs(OPEN-CLOSE)

lshd

If(CLOSE>=OPEN, OPEN-LOW, CLOSE-LOW)

ushd

If(CLOSE>=OPEN, HIGH-CLOSE, HIGH-OPEN)

After you have created the first three, you can now create the next six formulas. Since they reference the first three, those had to be made first.

ThBot_b

BBandBot( Fml( "body") ,55,E,0.5)

ThBot_l

BBandBot( Fml( "lshd") ,55,E,0.5)

ThBot_u

BBandBot( Fml( "ushd") ,55,E,0.5)

ThTop_b

BBandTop( Fml( "body") ,55,E,0.5)

ThTop_l

BBandTop( Fml( "lshd") ,55,E,0.5)

ThTop_u

BBandTop( Fml( "ushd") ,55,E,0.5)

The CandleWeight formula can now be created. After it is entered, you can create the IndSent - CW formula.

CandleWeight

If(C=O,1,0)*If(Fml("ushd") >= Fml("lshd"),64,-64)+
If(C=O,0,1)*If(C>O,1,-1)*(If(Fml("body")<= Fml("ThBot_b"),80,0)+
If( Fml("body")> Fml("ThBot_b") AND Fml("body")<=Fml("ThBot_b"),96,0)+
If(Fml("body")> Fml("ThTop_b"),112,0))+
If(C>=O,-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(C>=O,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)) After plotting the IndSent - CW indicator, you can quickly plot the four lines with the standard error channel line study . Plot it once, right-click on it, and change the properties to the desired number of errors. Then you can plot it again for the second number of errors.

- William Golson, Equis Support
Equis International, www.equis.com

Source / From: TOP