PureBytes Links
Trading Reference Links
|
Function written for the Traders' Tips section of "Technical
Analysis of Stocks and Commodities" magazine.
FUNCTION: Fractional MACD
FORMULA: fracMACD
DESC: Calculate the division of two moving averages for a field.
NOTES: This function calculates the division of two moving averages
for a field.
Parameters
------------------
Data The data to use in the calculation. This is
typically a field in a data series or a calculated value.
Short Period The number of bars of data to include in the shorter
average, including the current value. For example, a period of 3
includes the current value and the two previous values.
Long Period The number of bars of data to include in the longer
average, including the current value. For example, a period of
7 includes the current value and the six previous values.
Function Value
------------------------
The Fractional MACD is calculated by dividing the value of a short
term moving average with the value of a longer term moving average.
The Fractional MACD at the beginning of a data series is not defined
until there are enough values to fill the longer period.
Usage
-----------
The Fractional MACD can be used for analyzing both price data and
volume data.
When analyzing price data, it can be used to detect price trends.
Specifically, when the shorter term moving average decreases below
the longer term moving average, prices have been trending lower.
When this function is used in entry/exit systems, signals are
typically generated when the value crosses zero or specific
thresholds.
Trading when a value oscillator crosses zero is functionally the
same as trading when the shorter moving average crosses the longer
moving average.
When analyzing volume data, it can used to detect trends in market
sentiment. For example, when the shorter term moving average
decreases below the longer term moving average, overall
volume is decreasing, indicating reduced interest in the current
trend.
Source
------------
This function is based on the article "Divergence Bias" by Giorgos
Siligardos in the December 2003 issue of "Technical Analysis of
Stocks and Commodities".
Div(MA(Data,Short Period),MA(Data,Long Period))
END OF NOTES
HASBUFFER
INPUT: Data
TYPE: series
INPUT: Short Period
TYPE: integer
DEFAULT: 12
INPUT: Long Period
TYPE: integer
DEFAULT: 26
STEP: 1
PERFORM: MA
INPUT COLUMN: 1
INPUT COLUMN: 2
STEP: 2
PERFORM: MA
INPUT COLUMN: 1
INPUT COLUMN: 3
STEP: 3
PERFORM: Div
INPUT COLUMN: -1
INPUT COLUMN: -2
END OF FUNCTION FILE
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|