|Discuss Some TA Indicator Formulae at the Technical Analysis within the Traderji.com; Hope this helps 1) Simple Moving Average: The simple moving average sums the prices (you ...|
|Technical Analysis Discussion of all the principles involved in technical analysis.|
Some TA Indicator Formulae
Hope this helps
1) Simple Moving Average:
The simple moving average sums the prices (you can choose from the closing price, the VWAP time-weighted price or the high/low/close average price) for a specific number of data points and divides by that number. The calculation for a 3-bar simple moving average is:
(price_1) + (price_2) + (price_3) divided by 3
2) Weighted Moving Average:
The weighted moving average gives each data point a weight proportionate to its number in the sequence and divides by the sum of its weights. The calculation for a 3-bar weighted moving average is:
(1 x price_1) + (2 x price_2) + (3 x price_3) divided by 6, where 6 is the sum of the weights (1 + 2 + 3).
3) Exponential Moving Average:
The exponential moving average gives more weight to the latest prices and includes all of the price data in the life of the instrument. It is defined by taking:
(previous period's exponential moving average)/(N+1) and adding (current price)*2/(N+1). For the first period we take the simple average as above.
SMA/WMA/EMA Envelopes plot a band composed of two moving averages, one which is shifting upwards, the other shifting downwards, to help define a stock's upper and lower boundaries. The bands of an envelope are calculated as follows:
Upper Band = MA(CLOSE, N)*[1+K/100]
Lower Band = MA(CLOSE, N)*[1-K/100]
MA = Simple (or Weighted or Exponential) Moving Average;
N = averaging period;
K/100 = the value of shifting from the average (measured in basis points).
5) Bollinger Bands:
Bollinger Bands measure volatility by plotting a series of three bands. The middle band represents the moving average (SMA or WMA or EMA). The upper band is a set number of standard deviations higher than the middle band (generally 2), and the lower band is a set number of standard deviations (generally 2) lower than the middle band. You set the distance of standard deviation when you create the study.
Bollinger Bands are calculated like this:
ML = Avg. (N)
TL = ML + (D*StdDev)
BL = ML - (D*StdDev)
ML = middle line
Avg(N) = SMA or WMA or EMA
TL = top line
BL = bottom line
N = is the number of periods used in calculation;
StdDev = the Standard Deviation.
StdDev = SQRT(SUM[(CLOSE — SMA(CLOSE, N))^2, N]/N)
6) Parabolic SAR:
For use in trending markets, parabolic SAR uses a trailing stop and reverse method to help determine good exit and entry points. The Parabolic SAR calculation is:
SARt+1 = SARt+ AF x (EPtrade x SARt)
SARt+1 = next period's SAR
SARt = current SAR
AF = acceleration factor, begins at .02 and increases by .02 to a maximum of 20.
NOTE: You can reset the initial, increments and maximum acceleration factor when you create the study.
EPtrade = the extreme price (HIGH for long positions and LOW for short positions).
7) Relative Strength Indicator:
The RSI indicator is for overbought/oversold conditions. It goes up when the market is strong, and down when the market is weak, and oscillates between 0 -100. The RSI calculation is:
RSI = 100-(100/1+RS)
RS = Average of X bars Up Closes/Average X bars Down Closes (X=number of bars set by user)
8) Moving Average Convergence/Divergence (MACD):
This is a trend-following dynamic indicator that shows the correlation between two moving averages, generally a 26-period and 12-period SMA or WMA or EMA. You can modify the period length when you create the study. To help illustrate opportunity, a 9-period EMA "signal line" is plotted on top of the MACD.
The MACD and signal line are plotted using the following calculations:
MACD = MA(CLOSE, 12)-MA(CLOSE, 26)
SIGNAL = EMA(MACD, 9)
MACD Histogram/OSMA = MACD - SIGNAL
MA = Simple or Weighted or Exponential Moving Average;
SIGNAL = the signal line of the indicator.
The ADX/DMI is represented by three lines +DM, -DM and ADX.
The Directional movement
If today's High is higher than yesterday's High then:
+DM = today's High - yesterday's High
If today's Low is lower than yesterday's Low then:
-DM = yesterday's Low - today's Low
If +DM is greater than -DM then:-DM = 0
If +DM is less than -DM then:+DM = 0
The true range
True range is the largest of:
• |today's High - today's Low|
• |today's High - yesterday's Close|
• |yesterday's Close - today's Low|
Moving average of +DM, -DM and True Range
• +DMMA = exponential moving average of +DM
• -DMMA = exponential moving average of -DM
• TRMA = exponential moving average of True Range
The Directional Indicators
• +DI = +DMMA / TRMA
• -DI = -DMMA / TRMA
• DX = |(+DI - (-DI))| / (+DI + (-DI))
The Average Directional Movement Index
• ADX = the exponential moving average of DX
• ADX = SUM[(+DI-(-DI))/(+DI+(-DI)), N]/N
N — the number of periods used in the calculation.
10) Stochastic Oscillator:
The stochastic oscillator provides information about the location of a current close in relation to the period's high and low. It ranges between 0% and 100%. A reading of 0% indicates that the close was the lowest price at which the security traded during the preceding x number of time periods. A reading of 100% indicates that the close was the highest price at which the security traded during the preceding x number of time periods.
NOTE: You can specify the method (SMA, WMA or EMA), observation period, period of slow average and period of fast average when you create the study.
11) On Balance Volume:
The concept behind the OBV indicator is: volume precedes price. OBV is a simple indicator that adds a period's volume when the close is up and subtracts the period's volume when the close is down. A cumulative total of the volume additions and subtractions forms the OBV line.
If today’s close is greater than yesterday’s close then: OBV(i) = OBV(i-1)+VOLUME(i)
If today’s close is less than yesterday’s close then: OBV(i) = OBV(i-1)-VOLUME(i)
If today’s close is equal to yesterday’s close then: OBV(i) = OBV(i-1)
OBV(i) — is the indicator value of the current period.
OBV(i-1) — is the indicator value of the previous period.
VOLUME(i) — is the volume of the current bar.
12) Rate of Change:
ROC is a refined version of Momentum. The readings fluctuate as percentages around the zero line. You set the number of periods when you create the study.
Rate of change =100(V/Vx)
V - the latest closing price.
Vx - the closing price of x bars ago.
The Momentum is the difference between the current point (price or something else) and the point N periods ago. Momentum is calculated as a ratio of today’s price to the price several (N) periods ago.
Momentum = CLOSE(i)-CLOSE(i-N)
CLOSE(i) = the closing price of the current bar.
CLOSE(i-N) = the closing bar price N periods ago
14) Average True Range:
The Average True Range indicator is used to determine the volatility of the market. The idea is to replace the high-low interval for the given period, as the high-low does not take into consideration gaps and limit moves.
You set the period when you create the study.
The True Range is the largest of:
• difference between the current maximum and minimum (high - low)
• difference between the previous closing price and the current maximum
• difference between the previous closing price and the current minimum
The Average True Range is a simple moving average of the true range values.
15) Ultimate Oscillator:
The Ultimate Oscillator combines the price action for three different time frames. You set the observations periods 1, 2, and 3 when you create the study.
true low = min(low or prev close)
buying pressure = close - true low
true range = max(high - low, high - prev close, prev close - low)
Buying pressure sum 1, buying pressure sum 2 and buying pressure sum 3 are calculated by adding up buying pressures for 3 different time frames.
The same applies to the true range sum 1, 2 and 3.
raw ultimate oscillator = 4 * (buying pressure sum 1 / true range sum 1)
+ 2 * (buying_pressure_sum_2 / true_range_sum_2) + (buying_pressure_sum_3 / true_range_sum_3)
ultimate oscillator = raw ultimate oscillator / (4 + 2 + 1) ) * 100
16) Williams Oscillator:
The Williams Percent Range (%R) indicator identifies the overbought/oversold levels. The scale extends from 0 to -100.
%R = (HIGH(i-n)-CLOSE)/(HIGH(i-n)-LOW(i-n))-100
CLOSE = is today’s closing price.
HIGH(i-n) = is the highest high over a number (n) of previous periods.
LOW(i-n) = is the lowest low over a number (n) of previous periods.
Re: Some TA Indicator Formulae
Good Collection---Thanks---for ur efforts----for the benefit of all---
Re: Some TA Indicator Formulae
Can someone post the Amibroker afl for Volume Weighted MACD?
Indemnity, Disclaimer & Disclosure
• By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum/site.
• Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. You are recommended to make appropriate enquiries and seek appropriate advise before sending money, incurring any expenses, acting on recommendations or entering into any commitment in relation to any advertisement published here. Traderji.com does not vouch for any claims made by the advertisers of products and services. Traderji.com will not be held liable for any consequences in the event such claims are not honoured by the advertisers. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of any information by anybody mentioned anywhere on this site.
• Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy or legality of any information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. Although we constantly delete all irrelevant content and/or SPAM, if you should find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.