[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Re: help with stop formula



PureBytes Links

Trading Reference Links

------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=6023
------------------------------------------------------------------------

Barry

MACD uses exponential smoothing. The 26 period EMA requires at least 100
periods for reasonable accuracy, but 130-150 periods would be better. Your
chart probably has more periods loaded than this but your exploration is
probably using "minimum" periods or something less than 100.

The reason for the discrepancy with less bars loaded by the exploration is
that an exponential moving average retains a portion of ALL data, not just
the 12 and 26 periods as used in MACD. The older data has a diminishing
effect as it ages, but until there is at least 4-5 times as much data
supplied as there are periods specified by the EMA the accuracy will be
suspect.

An easy test for this is to slowly increase the number of periods for your
exploration and you will find that as you increase the number of periods the
accuracy will improve.

There are a number of MS functions that suffer from the same problem, namely
any function that uses exponential smoothing internally, including Wilders
Smoothing as found in RSI and ADX. I posted the following item to
StockCentral several months ago.  See
http://www.stockcentral.com.au/forum/machine/Forum32/HTML/000414.html . It
expands a little on what I said above.

Roy

>From the number of questions that I have seen posted recently about
exploration events not coinciding with charted events I thought it might be
useful to discuss further the major cause of the problem, and to identify
many of the MetaStock functions that can contribute to it.

The problem does not lie with the MetaStock formula language but with the
way that individual users set up their explorations.

There seems to be a general lack of understanding, even among experienced
users, that EXPONENTIAL moving averages require much more data than the
"PERIODS" value of any affected function will supply. When using the
Explorer with the "Minimum Periods" option set we need to be aware that the
number of records explored will not exceed the highest "PERIODS" value used
in the active exploration formulas.

An EMA displayed on a chart has access to ALL loaded data, regardless of the
"PERIODS" value of the indicator. However an exploration will only have
access to the amount of data that the user has specified. The point to
remember with an exponential MA is that new data is added with each bar, but
old data is never dropped out (as happens with a simple MA). The old EMA
data becomes less significant with each new bar but it continues to be a
component of the final EMA value. This is the essential factor that causes
differences between chart and exploration values.

Quite a number of MetaStock functions use internal smoothing, and this is
usually (but not always) exponential in nature. Some functions allow user
control over the smoothing method employed, Mov() being an obvious example.

The following list cannot be guaranteed as 100% accurate but these are the
MS functions to watch out for that appear to use, or are in themselves, a
form of exponential smoothing.

adx()
adxr()
atr()
bbandbot()
bbandtop()
dema()
dx()
emv()
forecastosc()
imi()
inertia()
macd()
mass()
mdi()
mov()
oscp()
oscv()
pdi()
pfe()
projosc()
qstick()
rangeindicator()
rmi()
rvi()
sar()
stoch()
tema()
trix()
wilders()

When using any of these functions in an exploration the accuracy of the
reported results will require the number of records explored to be set
appropriately. As a rule of thumb I would suggest multiplying the highest
"PERIODS" value by a factor of 5.

Another trick that should force the exploration to include the required
minimum number of records without actually specifying that number is to add
the following code to the filter and adjust "PERIODS" to a suitable value.
" AND Mov(C,PERIODS,S)>0"




> I use the indicator MACD_H = MACD()-Mov(MACD(),9,E).  I have just
> realized that when I use it in a weekly exploration, and in a weekly
> chart display, the numbers are different.  For example, weekly MACD_H
> calculated in Explorer for Wesfarmers (I am in Australia) for eod data
> for 10 January 2003 is 0.1218, but in the weekly chart it shows as
> .09746 (and the chart is internally consistent, ie, the histogram is
> exactly the difference between the MACD lines).  I noticed it because
> the Exploration was occasionally returning rising MACD_H's that didn't
> appear to be rising on the charts.  I would appreciate any ideas on why
> MACD_H in Explorer and the display might be different, when they both
> appear to be based on the same formula.
> Thanks,
> Barry
>
>
>
>



To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/