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 #

Front Weighted 36 Day Moving Average
This indicator requires 3 sub calculations and then the totalling of all3to get the final indicator:
This is the basic calculation:

Take the closing prices of your instrument 34 days ago - 26 days ago(inclusive), multiply each daily value by 0.01 and write each value down.

Then take the closing prices of your instrument 25 days ago - 18 daysago(inclusive),multiply each daily value by 0.02 and write each value down.

Then take the closing prices of your instrument 25 days ago - 18 daysago(inclusive),multiply each daily value by 0.02 and write each value down.

Then take the closing price of your instrument 17 days ago and multiplyby 0.03 ad write the value down.

Then take the closing price of your instrument 16 days ago - 8 daysago (inclusive), multiply by 0.031 and write each value down.

Then take the closing price of your instrument 7 days ago - 6 daysago (inclusive), multiply by 0.006 and write each value down.

Then take the closing price of your instrument 5 days ago - 1 day ago(inclusive), multiply by 0.07 and write each value down.

Then take the closing price of your instrument today, multiply by 0.079andwrite this value down.

Finally, add up all the values that you wrote down and plot the valueonthe chart, repeat this for every new trading day.

Simple Interpretation:
Front Weighted 36 Day Moving Average is similar to all other movingaverages. The interpretation is just as with all others, the trend is up when prices are above the moving average and the trendis downwhen prices are below the moving averages. This particular variation attempts to weight the data at the front morethan thatat the back, with a sliding scale for each trading daysvalue.

Metastock code for :

1FrontWeighted36BarMA1

0.01 * Ref(P,-34) +
0.01 * Ref(P,-33) +
0.01 * Ref(P,-32) +
0.01 * Ref(P,-31) +
0.01 * Ref(P,-30) +
0.01 * Ref(P,-29) +
0.01 * Ref(P,-28) +
0.01 * Ref(P,-27) +
0.01 * Ref(P,-26) +
0.02 * Ref(P,-25) +
0.02 * Ref(P,-24) +
0.02 * Ref(P,-23) +
0.02 * Ref(P,-22) +
0.02 * Ref(P,-21) +
0.02 * Ref(P,-20) +
0.02 * Ref(P,-19) +
0.02 * Ref(P,-18)

2FrontWeighted36BarMA2

0.03 * Ref(P,-17) +
0.031 * Ref(P,-16) +
0.031 * Ref(P,-15) +
0.031 * Ref(P,-14) +
0.031 * Ref(P,-13) +
0.031 * Ref(P,-12) +
0.031 * Ref(P,-11) +
0.031 * Ref(P,-10) +
0.031 * Ref(P,-9) +
0.031 * Ref(P,-8) +
0.006 * Ref(P,-7) +
0.006 * Ref(P,-6) +
0.07 * Ref(P,-5) +
0.07 * Ref(P,-4) +
0.07 * Ref(P,-3) +
0.07 * Ref(P,-2)

3FrontWeighted36BarMA3

0.07 * Ref(P,-1) + 0.079 * P

Front Weighted 36 Day Moving Average

Fml( "1FrontWeighted36BarMA1" ) +
Fml( "2FrontWeighted36BarMA2" ) +
Fml( "3FrontWeighted36BarMA3" )

Source / From: TOP