Construction and formulas

0
9475

The CMO is a smoothed average of two other oscillators which have the same bandwidth (-100/+100) but different behaviours: the first is called XTL (slow, coincidental / lagging indicator, tends to signal a turn in the trend of prices “during” or “after”). The second one is called KEY (leading indicator, which tends to anticipate turns of the trend with its inflections).

Download the PDF version of Metastock Formulas: CMO MetaStock Formulas
Download the PDF version of ProRealTime Formulas: CMO ProRealTime Formulas

XTL

SLOW indicator: it is simply the 3 periods moving average of a stochastic (5,3). This oscillator is flexible enough to follow the development of the trend but it generates many false signals in presence of linear trends and sometimes lacks the responsiveness required in case of sudden changes in the trend. For its mathematics construction, XTL is an oscillator that works inside the range [- 100/100]. This is the part we can call “coincidental / lagging” oscillator COMPOSITE MOMENTUM.

XTL MetaStock formula:

Mov( Stoch(5,3),3,W)*2-100

XTL ProRealTime formula:

stoco=Stochastic[5,3](close)
xtl=WeightedAverage[3](stoco)*2-100
return xtl

In its interpretation, the indicator is similar to the stochastic and can be displayed as a solid line or as histogram. In both cases, it is appropriate to display as critical points also the levels of 0, +80, -80.

KEY

The second component of the COMPOSITE MOMENTUM is the oscillator KEY. It is much more complex and somehow refined in both construction and interpretation. It was officially presented to the IFTA community as part of the technical analysis of a larger study during the IFTA conference in Rome in 1998. This oscillator comes from a specific search to find a technical instrument sensitive not only to cyclical movements, but also able to react even in the early stages of the trading range, which could then help you to better understand the development of horizontal (running) corrections. Its purpose is to show both waves of buying / selling and situations of overbought / oversold that are somehow hidden by the action of prices and the strength / weakness of the trend, such as the horizontal corrections in linear or semi-linear trends, where the absorption voltage technique is much more in terms of time than price. The KEY is based on Wilder’s Directional Movement, where the Directional Movement is calculated not directly on price but on a momentum indicator based on the difference between two simple averages that have between them a ratio of 1: 3 (what in the formula below is defined MOM). The coefficient K, which adjusts the length of the short average, can vary from 3 to 5. The default is 4. The KEY has a scale of variation from +100 to -100.
Therefore, the basic formula is:

KEY = [Diplus ((Mov3-Mov9), 5) – Diminus ((Mov3-Mov9), 5)]

It appears that this formula can be easily written, but it is not. It was originally planned in a totally different software (a beautiful program, still unsurpassed in many ways as for the depth of algorithmic analysis and testing options: CompuTrac in DOS) and it was a very complex work to correctly translate the formula in MetaStock language.

KEY MetaStock formula:

K:=4;
MOM:=(Mov(C,K,W)-Mov(C,3*K,W)) / Mov(C,K,W) *100;
Mov( ((Ref(Sum(If(MOM>Ref(MOM,-1),MOM-Ref(MOM,-1),0),5),-1)-
(Ref(Sum(If(MOM>Ref(MOM,-1),MOM-Ref(MOM,-1),0),5),-1)/5)+
If(MOM>Ref(MOM,-1),MOM-Ref(MOM,-1),0)) /
(Ref(Sum(Abs(MOM-Ref(MOM,-1)),5),-1) –
(Ref(Sum(Abs(MOM-Ref(MOM,-1)),5),-1)/5) + Abs(MOM-Ref(MOM,-1)))*100) –
Abs(((Ref(Sum(If(MOM<Ref(MOM,-1),MOM-Ref(MOM,-1),0),5),-1)-
(Ref(Sum(If(MOM<Ref(MOM,-1),MOM-Ref(MOM,-1),0),5),-1)/5)+
If(MOM<Ref(MOM,-1),MOM-Ref(MOM,-1),0)) /
(Ref(Sum(Abs(MOM-Ref(MOM,-1)),5),-1) –
(Ref(Sum(Abs(MOM-Ref(MOM,-1)),5),-1)/5) + Abs(MOM-Ref(MOM,-1)))*100)), 3, E)

KEY ProRealTime formula:

k=4
media1=WeightedAverage[k](Close)
media2=WeightedAverage[k*3](Close)
MOM=average[1](media1-media2)/(media1)*100
diffMOM=MOM-MOM[1]
If MOM>MOM[1] then
temp1=diffMOM
else
temp1=0
endif
If MOM<MOM[1] then
temp2=diffMOM
else
temp2=0
endif

sumtemp1=summation[5](temp1)
sumtemp2=summation[5](temp2)
abssumdiff=summation[5](abs(diffMOM))
aa=((sumtemp1[1]-(sumtemp1[1]/5)+temp1)/(abssumdiff[1]-(abssumdiff[1]/5)+abs(diffmom))*100)
bb=((sumtemp2[1]-(sumtemp2[1]/5)+temp2)/(abssumdiff[1]-(abssumdiff[1]/5)+abs(diffmom))*100)
cc=aa-abs(bb)
key=ExponentialAverage[3](cc)
return key

Because of its algorithmic construction, even KEY is an oscillator that works in a band [-100 / + 100] and is the “leading” part (more reactive) of the COMPOSITE MOMENTUM. In the opinion of the author, this oscillator deserves a discussion case study of its own as the KEY is not only interesting as a component of the COMPOSITE MOMENTUM, but has its own dignity, its autonomy and its own method of use. This indicator is born exactly from this logic of “research opportunity in the direction of the trend.” Obviously, this is not the only interpretation but it is the one to be preferred.

The COMPOSITE MOMENTUM oscillator is a smoothed average of the two indicators, XTL and KEY:

CM = Mov ((Fml (“KEY”)*2 + Fml (“XTL”)) / 3,2, W)

The CMO complete MS formula is:

K: = 4;
MOM: = (Mov (C, K, W) -Mov (C, K 3 *, W)) / Mov (C, K, W) * 100;
KEY: = Mov (((Ref (Sum (If (MOM> Ref (MOM, -1), MOM-Ref (MOM, -1), 0), 5) – 1) –
(Ref (Sum (If (MOM> Ref (MOM, -1), MOM-Ref (MOM, -1), 0), 5) – 1) / 5) + if (MOM> Ref (MOM, -1 ), MOM-Ref (MOM, -1), 0)) /
(Ref (Sum (Abs (MOM-Ref (MOM, -1)), 5) – 1) –
(Ref (Sum (Abs (MOM-Ref (MOM, -1)), 5) – 1) / 5) + Abs (MOM-Ref (MOM, -1))) * 100) –
Abs (((Ref (Sum (If (MOM <Ref (MOM, -1), MOM-Ref (MOM, -1), 0), 5) – 1) –
(Ref (Sum (If (MOM <Ref (MOM, -1), MOM-Ref (MOM, -1), 0), 5) – 1) / 5) + if (MOM <Ref (MOM, -1 ), MOM-Ref (MOM, -1), 0)) /
(Ref (Sum (Abs (MOM-Ref (MOM, -1)), 5) – 1) –
(Ref (Sum (Abs (MOM-Ref (MOM, -1)), 5) – 1) / 5) + Abs (MOM-Ref (MOM, -1))) * 100)), 3, E) ;
XTL: = (Mov (Stoch (5.3), 3, W)) * 2-100;
Mov ((KEY * 2 + XTL) / 3,2, W)

CMO ProRealTime formula:

k = 4
media1 WeightedAverage = [k] (Close)
Media2 WeightedAverage = [k * 3] (Close)
MOM = average [1] (media1-Media2) / (media1) * 100
diffMOM = MOM-MOM [1]
If MOM> MOM [1] then
temp1 = diffMOM
else
temp1 = 0
endif
If MOM <MOM [1] then
Temp2 = diffMOM
else
Temp2 = 0
endif

sumtemp1 = summation [5] (temp1)
sumtemp2 = summation [5] (Temp2)
abssumdiff = summation [5] (abs (diffMOM))
aa = ((sumtemp1 [1] – (sumtemp1 [1] / 5) temp1 +) / (abssumdiff [1] – (abssumdiff [1] / 5) + abs (diffmom)) * 100)
bb = ((sumtemp2 [1] – (sumtemp2 [1] / 5) Temp2 +) / (abssumdiff [1] – (abssumdiff [1] / 5) + abs (diffmom)) * 100)
aa-cc = abs (bb)
key = ExponentialAverage [3] (CC)

Stoco = Stochastic [5,3] (close)
xtl = WeightedAverage [3] (Stoco) * 2-100

Composite = WeightedAverage [2] ((2 * key + xtl) / 3)

l1 = 50
l2 = -50
line1 = 80
linea2 = -80
line3 = 0

return line1, line2, line3, l1, l2, Composite

The CMO is a smoothed average of the two. It is applied in the ranking model in two different explorations and defines both momentum direction and momentum position. Momentum is ranked positive and weighted +1 when the COMPOSITE MOMENTUM is rising and vice versa.

CMO direction – MetaStock formula and weight:

CM: = Mov ((Fml (“KEY”)*2 + Fml (“XTL”)) / 3,2, W);
If ((CM> Ref (CM, -1)), 1,
If ((CM <Ref (CM, -1)), -1.0))

CMO Metastock formula:

CM: = Mov ((Fml (“KEY”)*2 + Fml (“XTL”)) / 3,2, W);
If (CM <0 AND CM> Ref (CM, -1), 1,
If (CM> 0 AND CM> Ref (CM, -1), 2,
If (CM> 0 AND CM <Ref (CM, -1), 3,
If (CM <0 AND CM <Ref (CM-1), 4, 0))))

The paper on the presentation and use of this indicator, “Technical Tools And Equity Selection: A Reward/Risk Rating Indicator For The Stock Market Components” was awarded with the “John Brooks Award” of the International Federation of Technical Analysts – IFTA 2008-2009 (best MFTA paper) and published in the IFTA Journal 2010 Edition, pp. 57-67.

Note: when copying these formulas into your software, be aware that you could need to modify them for reasons of programming language (you need to insert some spaces between certain parts of the formula).

 

Construction and formulas ultima modifica: 2016-05-30T14:55:59+00:00 da FC
SHARE
Previous articleAWARDS
Next articleMarket Map 05.2016