|
Advance Decline Noncumulative
!!!Indicators for Charts
! Advance Decline Noncumulative
! Advancing Issues less Declining Issues divided by Total Issues.
! Also known as the Hughes Breadth index, the theory
! behind the index is that increases in stock prices are
! preceded by strengthening internals of the market and
! the reverse is true for decreases in stock prices.
Issues is [Adv Issues] - [Dec Issues].
TotalIssues is [Adv Issues] + [Dec Issues] + [Unch Issues].
ADNoncumulative is Issues/TotalIssues.
! Applying a 10-day moving average improves the
! bullish and bearish patterns
ADnon10day is SimpleAvg(ADNoncumulative,10).
!!!Example Market DJIA
Return to Top of Page
Advance Decline Ratio
!!! Indicator for Charts
! A/D Ratio
! Works on markets only
! The A/D Ratio is similar to the Advancing-Declining Issues in that it
! displays market breadth. The advantage of the Ratio is that it remains
! constant regardless of the number of issues that are traded on the
! New York Stock Exchange.
ADRatio is [Adv Issues] / [Dec Issues].
! A moving average of the A/D Ratio is often used as an
! overbought/oversold indicator. The higher the value, the more
! overbought the market is and the likelihood of a correction. Low readings
! imply an oversold market andmay indicate a rally.
! Day-to-day fluctuations of the Advance/Decline Ratio
! can be smoothed by using the ratio with a moving average.
ADratio15dayaverage is SimpleAvg(ADRatio,15).
!!!Example Market DJIA
Return to Top of Page
ADX DirMov ADXR
!!! Indicator for Charts
!DMI & ADX indicators as defined by Wells Wilder.
!Coded by Rich Denning on 6/12/00 !Error in code fixed by Bill Shalasha
on 8/25/01 (ZERO was added) !Bill added ADXR 8/25/01
Dailyrange is [high]-[low].
Ycloseh is abs(val([close],1)-[low]).
Yclosel is abs(val([close],1)-[high]).
Trange1 is Max(Dailyrange,Ycloseh).
Trange is Max(Trange1,Yclosel). define days 27. !NOTE: Wilder says
he is using a 14 day averaging method but if expontential averages
are used
! 27 days must be used to closely approximate his 14 days weighted
averaging method.
!+DM CODE: yhigh is val([high],1).
ylow is val([low],1).
rhigh is ([high]-yhigh).
rlow is (ylow-[low]).
DMplus is iff(rhigh > 0 and rhigh > rlow, rhigh, 0).
DMminus is iff(rlow > 0 and rlow >= rhigh, rlow, 0).
AvgPlusDM is expAvg(DMplus,days).
AvgMinusDM is expavg(DMminus,days).
!AVERAGE TRUE RANGE FOR ADX14 USE 27 DAYS WITH EXPAVG:
ATR is expAvg(Trange,Days).
!DMI CODE: PlusDMI is (AvgPlusDM/ATR)*100. !PLOT AS INDICATOR (2lines)
MinusDMI is AvgMinusDM/ATR*100. !PLOT AS INDICATOR (2 lines).
!ADX INDICATOR as defined by Wells Wilder
DIdiff is PlusDMI-MinusDMI. !PLOT DIdiff as historigram is same
as DirMov (AIQ built in indicator)
ZERO if PlusDMI = 0 and MinusDMI =0.
DIsum is PlusDMI+MinusDMI.
DX is iff(ZERO,100,abs(DIdiff)/DIsum*100).
ADX is ExpAvg(DX,days). !PLOT ADX as single line indicator with
support at 24 is same as ADX (AIQ)
! ADX Rate using the Least Means Squared method !Coded by Bill Shalasha
on 8/25/01
define periods 14.
n is HasDataFor(periods).
x is offsettodate(month(),day(),year()) + 1.
daysqr is x * x.
sumdaysqr is Sum(daysqr,n).
sumdays is Sum(x,n).
sumx is Sum( x * ADX ,n).
sumADX is Sum(ADX,n).
D is (sumdays*sumdays) - ( n * sumdaysqr).
ADXRate1 is ((n * sumx) - ( sumdays * sumADX)) / D.
ADXRate2 is slope2(ADX,periods).
ADXaiq is [ADX].
Return to Top of Page
Alexander Elders SIROC
!!! Indicator for Charts
!!!! SIROC Indicator from Elder
MA is expavg([close], 13).
SIROC is ((ma - valresult(ma, 21)) / valresult(ma, 21)) * 100.
Return to Top of Page
Arms Ease of Movement
!!!Indicator for Charts
! Arms' Ease of Movement Value - Current Price less Previous Price
divided by Current Volume.
CurrentPrice is ([high] + [low])/2.
PreviousPrice is (Val([high], 1) + Val([low], 1))/2.
CurrentVolume is ([volume] / 10000)/([high] - [low]).
EMV is (CurrentPrice - PreviousPrice)/CurrentVolume.
Return to Top of Page
ARMS Index
!!!Indicator for Charts
! ARMS Index - Advancing Issues divided by Declining Issues divided by Advancing Volume divided by Declining Volume.
Issues is [Adv Issues] / [Dec Issues].
Volume is [Adv Volume] / [Dec Volume].
ARMSIndex is Issues / Volume.
Return to Top of Page
Average True Range Modified
!!!Indicator for Charts
!!! ATR modified
ATR1 is max(abs(val([close], 1) - [high]), abs(val([close], 1) -
[low])).
ATRmodified is max(atr1, [high] - [close]).
Return to Top of Page
Average True Range Ratio To Close
!!!Indicator for Charts
!!! ATR Ratio to Close.
AvgPd is 5.
TrueRange is max([high]-[low],max([high]-val([close],1),val([close],1)-[low])).
AvgTrueRange is SimpleAvg(TrueRange,AvgPd).
ATRR is avgtruerange / [close].
MAATRR is expavg(atrr, 3).
Return to Top of Page
Averages + ROC
!!!Indicator for Charts
!MOVING AVERAGES FOR PRICE, VOLUME, VELOCITY, & RATE OF CHANGE coded
by Rich Denning 8/4/01
define ST 17.
define IT 50.
define LT 200.
define eST 10.
define eIT 20.
define eLT 49.
!Short term simple moving average [ST MA]
STMA is simpleavg([close],ST).
!Intermediate term simple moving average [IT MA]
ITMA is simpleavg([close],IT).
!Long term simple moving average [LT MA]
LTMA is simpleavg([close],LT).
!Short term exponential moving average [ST ESA]
STESA is expavg([close],eST).
!Intermediate term exponential moving average [IT ESA]
ITESA is expavg([close],eIT).
!Long term exponential moving average [LT ESA]
LTESA is expavg([close],eLT).
!Volume exponential moving average [Volume ESA]
VolumeESA is expavg([volume],50).
!Velocity indicator [Velocity]
Velocity21 is slope([close],21).
!RateOfChange for X days (custom indicator) !Plot as line indicator
on charts with zero line support
!One day rate of change
ROC1 is ([close]/val([close],1)-1)*100.
!Two day rate of change, etc...
ROC2 is ([close]/val([close],2)-1)*100.
ROC5 is ([close]/val([close],5)-1)*100.
ROC10 is ([close]/val([close],10)-1)*100.
ROC15 is ([close]/val([close],15)-1)*100.
ROC20 is ([close]/val([close],20)-1)*100.
ROC50 is ([close]/val([close],50)-1)*100.
ROC100 is ([close]/val([close],100)-1)*100.
ROC200 is ([close]/val([close],200)-1)*100.
Return to Top of Page
Body Momentum Oscillator
!!!Indicator for Charts
B is [close] - [open].
Bgreater is b>0.
Blessthan is b<0.
Bup is sum(bgreater,14).
Bdn is sum(blessthan, 14).
BodyMomentum is (bup / (bup + bdn)) * 100.
BodyMomentumOscillator is simpleavg(bodymomentum, 3).
Return to Top of Page
Bollinger Bands
!!!Indicator for Charts
!BOLLINGER BANDS
!coded by Rich Denning on 8/12/01 with help from tv
!Set parameters:
Define L 20. !Default is 20
Define Factor1 2. !Default is 2
Define Factor2 2. !Default is 2
!Standard Deviation of the close is the square roor of variance
of the close is:
Variance is Variance([close],L).
StdDev is Sqrt(Variance).
!Middle Band SMA is simpleavg([close],L).
!Upper Bollinger Band UpperBB is SMA + Factor1 * StdDev. !!Plot
as single line indicator on chart
!Lower Bollinger Band LowerBB is SMA - Factor2 * StdDev. !!Plot
as single line indicator on chart
Return to Top of Page
Brad CCI
!!!Indicator for Charts
!!! Brad CCI
AvgHLC is ([high] + [low] + [close]) / 3.
Avg28MA is simpleavg([close], 28).
close is [close]. StdDev is sqrt(variance(close, 28)).
BradCCILine1 is (avghlc - avg28ma) / (0.015 * stddev).
BradCCILine2 is sqrt(variance(avghlc, 28)).
Return to Top of Page
Breadth Advance Decline
!!!Indicator for Charting
! Breadth Advance Decline Indicator - 10 -day simple average of Advancing Issues divided by Advancing Issues plus
! Declining Issues.
Breadth is [Adv Issues]/([Adv Issues] + [Dec Issues]).
BreadthAD is SimpleAvg(Breadth, 10).
!!!Example Market DJIA
Return to Top of Page
Breadth Thrust
!!!Indicator for Charting
! Breadth Thrust - Advancing Issues divided by Advancing Issues plus Declining Issues.
BreadthThrust is [Adv Issues] / ([Adv Issues] + [Dec Issues]).
!!!Example Market DJIA
Return to Top of Page
CCI
!!!Indicator for Charting
! CCI indicator.
n is 8.
!change the "n" value above to any # of days you want.
M is ([high] + [low] + [close]) / 3.
avgm is simpleavg(M,n). absdiff is abs(M-avgm).
sumD is sum(absdiff,n) * (1 / n).
CCI is (M - avgm) / (0.015 * sumD).
Return to Top of Page
Chaikin Oscillator
!!!Indicator for Charts
! Chaikin Oscillator 3 -day exponential average of Accumulation/Distribution less 10 -day exponential average of
! Accumulation/Distribution.
AcmDis is [AcmDis].
ChaikinOsc is ExpAvg(AcmDis, 3) - ExpAvg(AcmDis, 10).
!!!Example Market DJIA
Return to Top of Page
Chaikins Volatility
!!!Indicator for Charts
! Chaikin's Volatility -- EMA of the High-Low, and the percent that the EMA has changed.
HL is [high] - [low].
HLAverage is ExpAvg(HL, 10).
MAPct is (HLAverage - ValResult(HLAverage, 10)) / (ValResult(HLAverage, 10)).
ChaikinVolatility is MAPct * 100.
!!!Example Market DJIA
Return to Top of Page
Congestion Index
!!!Indicator for Charts
!!! Congestion Index
CongestionIndex is (((hival([close], 80)) - (loval([close], 80)))
/ (loval([close], 80))) * 100.
CongestionIndex5daysago is valresult(congestionindex, 5).
close is [close].
HighestHigh80 is highresult(close, 80).
HighestHigh80offset5 is highresult(close, 80, 5).
MovAvgVol5days is simpleavg([volume], 5).
MovAvgVol60days is simpleavg([volume], 60).
MovAvgVol60offset5 is highresult([volume], 60, 5).
MovAvgClose5days is simpleavg(close, 5).
Consolidationbreakout if (congestionindex5daysago < 10) and (congestionindex
>=10) and (close > highesthigh80offset5) and
(movavgvol5days >= (1.5
* movavgvol60offset5)).
Return to Top of Page
Dahl OBV Trend
!!!Indicator for Charts
!!! Dahl OBV Trend
DahlOBVTrend is expavg(([obv] - val([obv], 15)), 55).
Return to Top of Page
Dahl Oscillator
!!!Indicator for Charts
!!!Dahl Oscillator
MovAvg55 is simpleavg([close], 55).
MovAvg55offset15 is simpleavg([close], 55, 15).
LowestMovAvg55 is lowresult((movavg55 - movavg55offset15), 14).
HighestMaAvg55 is highresult((movavg55 - movavg55offset15),14).
DahlOsc is (expavg((movavg55 - movavg55offset15 - lowestmovavg55)
/ (highestmaavg55 - lowestmovavg55),14)) * 100.
Return to Top of Page
Donchian Channels
!!!Indicator for Charts
!!! Donchian Channels -- These channels are formed by the highest
high and lowest low in the last 20 days.
Define periods 20.
UpperChannel is hival([high], periods, 1).
LowerChannel is loval([low], periods, 1).
Return to Top of Page
Elliot Oscillator
!!!Indicator for Charts
!! Elliot Oscillator
Elliot is simpleavg(([high] + [low]) / 2, 5) - simpleavg(([high]
+ [low]) / 2, 34).
Return to Top of Page
Excel Confidence Percent
!!!Indicator for Charts
MA is simpleavg([close] * (2.5 / sqrt([volume] * 50)), 10).
LowestLow is lowresult(ma, 5). HighestHigh is highresult(ma, 5).
ExcelConfidencePercent is (sum((ma - lowestlow), 3) / sum((highesthigh
- lowestlow), 3)) * 100.
Return to Top of Page
Front Weighted 36 Day MA
!!!Indicator for Charts
!!! Front Weighted 36 Day Moving Average is similar to all other
moving averages.
!!! The interpretation is just like with all the others, the trend
is up when prices are
!!! above the moving average and the trend is down when prices are
below the
!!! moving average. This particular variation attempts to weight
the data at the front more
!!! than that at the back, with a sliding scale for each trading
days value.
Bar34 is val([close], 34) * 0.01.
Bar33 is val([close], 33) * 0.01.
Bar32 is val([close], 32) * 0.01.
Bar31 is val([close], 31) * 0.01.
Bar30 is val([close], 30) * 0.01.
Bar29 is val([close], 29) * 0.01.
Bar28 is val([close], 28) * 0.01.
Bar27 is val([close], 27) * 0.01.
Bar26 is val([close], 26) * 0.01.
Bar25 is val([close], 25) * 0.02.
Bar24 is val([close], 24) * 0.02.
Bar23 is val([close], 23) * 0.02.
Bar22 is val([close], 22) * 0.02.
Bar21 is val([close], 21) * 0.02.
Bar20 is val([close], 20) * 0.02.
Bar19 is val([close], 19) * 0.02.
Bar18 is val([close], 18) * 0.02.
Bar17 is val([close], 17) * 0.03.
Bar16 is val([close], 16) * 0.031.
Bar15 is val([close], 15) * 0.031.
Bar14 is val([close], 14) * 0.031.
Bar13 is val([close], 13) * 0.031.
Bar12 is val([close], 12) * 0.031.
Bar11 is val([close], 11) * 0.031.
Bar10 is val([close], 10) * 0.031.
Bar9 is val([close], 9) * 0.031.
Bar8 is val([close], 8) * 0.031.
Bar7 is val([close], 7) * 0.006.
Bar6 is val([close], 6) * 0.006.
Bar5 is val([close], 5) * 0.07.
Bar4 is val([close], 4) * 0.07.
Bar3 is val([close], 3) * 0.07.
Bar2 is val([close], 2) * 0.07.
Bar1 is val([close], 1) * 0.07.
Bar0 is [close] * 0.079.
OneFrontWeighted36BarMA1 is bar34 + bar33 + bar32 + bar31 + bar30
+ bar29 + bar28 + bar27 + bar26 + bar25 + bar24 + bar23 + bar22
+ bar21 + bar20 + bar19 + bar18.
TwoFrontWeighted36BarMA2 is bar17 + bar16 + bar15 + bar14 + bar13
+ bar12 + bar11+ bar10 + bar9 + bar8 + bar7 + bar6 + bar5 + bar4
+ bar3 + bar2. ThreeFrontWeighted36BarMA3 is bar1 + bar0.
FrontWeighted36DayMA is OneFrontWeighted36BarMA1 + TwoFrontWeighted36BarMA2
+ ThreeFrontWeighted36BarMA3.
Return to Top of Page
Haurlan Index
!!!Indicator for Charts
! Haurlan Index - 3 -day Exponential Average of Advancing Issues less Declining Issues.
Issues is [Adv Issues] - [Dec Issues].
HaurlanIndex is ExpAvg(Issues, 3).
!!!Example Market DJIA
Return to Top of Page
High Low
!!!Indicator for Charts
!! High Low
Define Periods 89.
Yclose is val([close], 1).
HighLow is (expavg(([high] - [low] + abs([high] - yclose)) + (abs([low]
- yclose)), periods)) / 2.
Return to Top of Page
Keltner
! keltner///upper and lower trading bands, overbought and oversold areas...cuts through
! upper is a sell point, and crossing lower is a buy point.
Price is [close].
MA is 8.
Constant is 1.3.
TrueRange is [high] - [low].
CentLine is SimpleAvg(price, MA).
AvgRange is SimpleAvg(TrueRange, MA).
Upper is Centline + (AvgRange * Constant).
Lower is Centline - (AvgRange * Constant).
Return to Top of Page
Lone Ranger
!!!! Lone Ranger. Volume is adjust by a factor of
10000 to display properly.
Close is [close]. Volume is [volume] / 10000.
Zrange is highresult(close, 3) - lowresult(close, 3).
LoneRanger is ((zrange / volume) - ((valresult(zrange, 5)) / (valresult(volume,
5)))) * -1.
Return to Top of Page
LSS Oscillator
!!! LSS Oscillator and Pivot Point
HighestHigh5 is hival([high], 5).
LowestLow5 is loval([low], 5).
Close is [close].
X is highesthigh5 - val([open], 5).
Y is close - lowestlow5.
LSS5day is 100* (x + y) / (highesthigh5 - lowestlow5) * 2.
LSSdiff3 is LSS5day - valresult(lss5day, 3).
Return to Top of Page
LSS Strength Index
!!! LSS Strength Index
LSSStrength is ((val([close], 1) - val([low], 1)) / (val([high],
1) - val([low], 1))) * 100.
Return to Top of Page
MACD Osc
Define S 12.
Define L 25.
Define X 9.
ShortMACDMA is expavg([Close],S).
LongMACDMA is expavg([Close],L).
MACDValue is ShortMACDMA-LongMACDMA.
SignalMACD is expavg(MACDValue,X).
MACDOscValue is MACDValue-SignalMACD.
Return to Top of Page
Market Pressure
Volume is [volume] /10000.
Rule1 if [close]> val([close],1) and [volume]> val([volume],1).
Rule2 if [close]< val([close],1) and [volume]< val([volume],1).
MP1 is iff(rule1, volume,0).
MP2 is iff(rule2, -volume,MP1).
MP is sum(mp2,7) *4 + sum(mp2,14) *2 + sum(mp2,28) .
Return to Top of Page
Market Thrust
!!!Indicator for Charts
! Market Thrust Indicator (The power of the move) measures
! the number of stocks and the volume going into those stocks
Thrust is (([Dec issues] * [Dec volume]) - ([Adv issues] * [Adv volume]))/1000000.00.
!!!Example Market DJIA
Return to Top of Page
Market Thrust Oscillator
!!!Indicator for Charts
!Market Thrust Oscillator Indicator.
ThrustOsc is ([Dec Issues]*[Dec Volume])-([Adv Issues]*[Adv Volume]).
OSC is ThrustOsc/(([Dec Issues]*[Dec Volume])+([Adv Issues]*[Adv Volume]))*100.00.
!!!Example Market DJIA
Return to Top of Page
Martin Pring's KST Formulas
!! Martin Pring's KST Formulas - From "Stocks and
Commodities", Sept 1992, Summed Rate of Change(KST).
ROC3 is (([close] - val([close], 3)) / (val([close], 3))) * 100.
ROC4 is (([close] - val([close], 4)) / (val([close], 4))) * 100.
ROC6 is (([close] - val([close], 6)) / (val([close], 6))) * 100.
ROC9 is (([close] - val([close], 9)) / (val([close], 9))) * 100.
ROC10 is (([close] - val([close], 10)) / (val([close], 10))) * 100.
ROC12 is (([close] - val([close], 12)) / (val([close], 12))) * 100.
ROC13 is (([close] - val([close], 13)) / (val([close], 13))) * 100.
ROC15 is (([close] - val([close], 15)) / (val([close], 15))) * 100.
ROC18 is (([close] - val([close], 18)) / (val([close], 18))) * 100.
ROC20 is (([close] - val([close], 20)) / (val([close], 20))) * 100.
ROC24 is (([close] - val([close], 24)) / (val([close], 24))) * 100.
ROC26 is (([close] - val([close], 26)) / (val([close], 26))) * 100.
ROC30 is (([close] - val([close], 30)) / (val([close], 30))) * 100.
ROC39 is (([close] - val([close], 39)) / (val([close], 39))) * 100.
ROC52 is (([close] - val([close], 52)) / (val([close], 52))) * 100.
ROC78 is (([close] - val([close], 78)) / (val([close], 78))) * 100.
ROC109 is (([close] - val([close], 109)) / (val([close], 109)))
* 100.
DailyKSTMA is (simpleavg(roc10, 10) * 1) + (simpleavg(roc10, 10)
* 2) + (simpleavg(roc20, 10) * 3) + (simpleavg(roc30, 15) * 4).
LTMonthlyKSTMA is ((simpleavg(roc9, 6) * 1) + (simpleavg(roc12,
6) * 2) + (simpleavg(roc18, 6) * 3) + (simpleavg(roc24, 9) * 4))
/ 4.
ITKSTMA is (simpleavg(roc10, 10) * 1) + (simpleavg(roc13, 13) *
2) + (simpleavg(roc15, 15) * 3) + (simpleavg(roc20, 20) * 4).
ITKSTESA is (expavg(roc10, 10) * 1) + (expavg(roc13, 13) * 2) +
(expavg(roc15, 15) * 3) + (expavg(roc20, 20) * 4).
LTKSTESA is (expavg(roc39, 26) * 1) + (expavg(roc52, 26) * 2) +
(expavg(roc78, 26) * 3) + (expavg(roc109, 39) * 4).
!! Use with Weekly Chart
STWeeklyKSTESA is (expavg(roc3, 3) * 1) + (expavg(roc4, 4) * 2)
+ (expavg(roc6, 6) * 3) + (expavg(roc10, 8) * 4).
Return to Top of Page
McClellan Oscillator
!!!Indicator for Charts
! McClellan Oscillator - the difference between the 10% (19day) and 5% (39 day) EMA of
! advancing issues minus declining issues.
Breadth is [Adv Issues] - [Dec Issues].
McClellanOsc is ExpAvg(Breadth, 19) - ExpAvg(Breadth, 39).
!!!Example Market DJIA
Return to Top of Page
McGinley Dynamic
!!! McGinley Dynamic
ExpAvg12offset1 is expavg([close], 12, 1).
Dynamic is (expavg12offset1 + ([close] - expavg12offset1)) / (([close]
/ expavg12offset1) * 125).
Return to Top of Page
Median Price
!!!Indicator for Charts
! Median Price - High plus Low divided by 2.
Price is [high] + [low].
MedianPrice is Price/2.
Return to Top of Page
MF RSI
Define days 4.
Close is [close].
Yclose is val([close],1).
PVF is iff(close>yclose,1,0).
NVF is iff(close<=yclose,1,0).
AvgPrice is ([high]+[low]+close)/3.
MF is [volume]*AvgPrice.
PMF is Sum(MF*PVF,days).
NMF is Sum(MF*NVF,days).
MFRSI is 100*(PMF/(PMF+NMF)).
Return to Top of Page
Modified MA Oscillator
Close is [close].
MA is expavg(close, 3) + expavg(close, 5) + expavg(close, 8) + expavg(close,
10) + expavg(close, 12) + expavg(close, 15) + expavg(close, 30)
+ expavg(close, 35) + expavg(close, 40) + expavg(close, 45) + expavg(close,
50) + expavg(close, 60).
MMA is MA * 10.
MMAOsc is (expavg(mma, 13)) * 10.
Return to Top of Page
Modified William's Percent R with Bollinger Bands
!! The periods value for UpperBB and
LowerBB need to be changed to 5.
MWilliamsR is 100 * (([close] - [lower bb]) / ([upper bb] - [lower
bb])).
Return to Top of Page
Phase
STesa is expavg([close],10). !default
= 10
LTesa is expavg([close],49). !default = 49
Phase is 100 * ((stesa / ltesa) - 1).
Return to Top of Page
RSI Wilder
!! 7-days here is equivalent to a 4-day
RSI Wilder in charts
!! 9-days here is equivalent to a 5-day RSI Wilder in charts
!!13-days here is equivalent to a 7-day RSI Wilder in charts
!! 27-days here is equivalent to a 14-day RSI Wilder in charts
Define days 7.
U is [close]-val([close],1).
D is val([close],1)-[close].
AvgU is ExpAvg(iff(U>0,U,0),days).
AvgD is ExpAvg(iff(D>=0,D,0),days).
RSIw is 100-(100/(1+(AvgU/AvgD))).
Return to Top of Page
RS
Index
Close is [close].
RSotc3 is expavg([close] / TickerUDF("OTC",Close), 3) * 10000.
RSotc10 is expavg([close] / TickerUDF("OTC",Close), 10) * 10000.
RSotc30 is expavg([close] / TickerUDF("OTC",Close), 30) * 10000.
RSspx3 is expavg([close] / TickerUDF("SPX",Close), 3) * 10000.
RSspx10 is expavg([close] / TickerUDF("SPX",Close), 10) * 10000.
RSspx30 is expavg([close] / TickerUDF("SPX",Close), 30) * 10000.
Return to Top of Page
Schultz AT
!!!Indicator for Charts
! Schultz Adv/Tot Issues - Advancing Issues divided by Total Issues.
TotalIssues is [Adv Issues] + [Dec Issues] + [Unch Issues].
SchultzAT is [Adv Issues]/TotalIssues.
!!!Example Market DJIA
Return to Top of Page
Sheldon Natenberg's Volatility
!!! Natenberg's Volatility -- Defined
as the standard deviation of the logarithmic price changes
!!! measured at regular intervals of time. From Sheldon Natenberg's
book "Option Volatility and Pricing".
Close is [close]. Yclose is val([close], 1).
Log is ln(close / yclose).
NatenbergsVolatility is sqrt(variance(log, 10)) * sqrt(365).
Return to Top of Page
Sine Weighted Moving Average
!!! Sine Weighted Moving Average
S1 is sin(30) * [close].
S2 is sin(60) * val([close], 1).
S3 is sin(90) * val([close], 2).
S4 is sin(120) * val([close], 3).
S5 is sin(150) * val([close], 4).
SineWeightedMA is (s1+ s2+ s3 + s4 + s5) / (sin(30) + sin(60)
+ sin(90) + sin(120) + sin(15)).
Return to Top of Page
SK-SD
!STOCHASTICS & SK-SD
Define L 21. !(Default=21)
Define S 10. !(Default=10)
Define PctK 10. !(Default=10)
Define PctD 10. !(Default=10) !Plot as line with 80/20 lines =
Stochastic
Stoch is 100*(([close] - loval([low],L)) / (hival([high],L) -
loval([low],L))).
FastK is SimpleAvg(Stoch,L).
FastD is SimpleAvg(FastK,S).
!Plot as two line indicator = SK-SD
SK is SimpleAvg(Stoch,PctK).
SD is SimpleAvg(SK,PctD).
Return to Top of Page
Spreads
!!!Indicator for charts
! Spread ---Difference in price between 2 securities.
Close is [close].
Spread is TickerUDF("DJIA", close) - TickerUDF("OTC", close).
!!!Example Market DJIA
Return to Top of Page
ST Oscillator
!!! The ST Oscillator is a momentum
indicator and plts very similiar to the "Chande Momentum
!!! Oscillator" with the difference being the STOsc does not swing
as far as the CMO.
Define LB 5.
Num is [close] - val([close], 1).
Den is [high] - [low].
MovNum is simpleavg(num, lb).
MovDen is simpleavg(den, lb).
MN is iff(movnum = 0, 0.01, movnum).
MD is iff(movden = 0, 0.01, movden).
STOsc is (mn / md) * 100.
Return to Top of Page
Stix Indicator
!!! Stix Indicator
HL is ([high] + [low]) / 2.
Stix is simpleavg(hl, 5) - simpleavg(hl, 35).
Return to Top of Page
Stochatic Momentum Oscillator
!!! Stochastic Momentum Oscillator
Close is [close].
HighValue is hival([high], 13).
LowValue is loval([low], 13).
Define1 is (close) - (0.5 * (highvalue + lowvalue)).
Define2 is highvalue - lowvalue.
ExpavgDefine1 is expavg(define1, 2).
ExpavgDefine2 is expavg(define2, 2).
StochasticOscillator is ((expavgdefine1) / (0.5 * define2)) *
100.
Return to Top of Page
Stochastic
RSI
!STOCHASTIC RSI
!From Opening Bell 2/2002
!In charts the parameter for the RSI Wilder must be set to the
desired value; default is 14
Define p 14.
StochRSIob is ([RSI Wilder] - loval([RSI Wilder],p)) /(hival([RSI
Wilder],p) -loval([RSI Wilder],p)) * 100.
!!RSI Wilder (Coded by Rich Denning).
!The following will allow you to set the RSI Wilder parameter
in the EDS without having to worry how it is set in the charts:
!! 7-days here is equivalent to a 4-day RSI Wilder in charts
!! 9-days here is equivalent to a 5-day RSI Wilder in charts !!
13-days here is equivalent to a 7-day RSI Wilder in charts
!! 27-days here is equivalent to a 14-day RSI Wilder in charts
Define days 27. !!!! 27 is same as default of 14 in charts
U is [close]-val([close],1).
D is val([close],1)-[close].
AvgU is ExpAvg(iff(U>0,U,0),days).
AvgD is ExpAvg(iff(D>=0,D,0),days).
RSIw is 100-(100/(1+(AvgU/AvgD))).
!!STOCHASTIC RSI with hard coded RSI:
StochRSI is (RSIw - lowresult(RSIw,p)) /(highresult(RSIw,p) -
lowresult(RSIw,p)) * 100.
Return to Top of Page
TCI
!! TCI Indicator Hard-Coded.
n1 is 10.
!! Channel periods.
n2 is 21.
!! Average periods.
AP is ([high] + [close] + [low]) / 3.
ESA is expavg(AP, n1).
D is expavg(abs(AP - ESA), n1).
CI is (AP - ESA) / (0.015 * D).
TCI is expavg(CI, n2).
Return to Top of Page
True Strength Index
!!! True Strength Index
ROC1day is [close] - val([close], 1).
AvgROC25 is expavg(roc1day, 25).
ExpAvg13AvgROC25 is expavg(avgroc25, 13).
ABSRoc is abs(roc1day). ExpAvgABSRoc is expavg(absroc, 25).
ExpAvg13ExpAvgABSRoc is expavg(expavgabsroc, 13).
TrueStrengthIndex is ((ExpAvg13AvgROC25) / (ExpAvg13ExpAvgABSRoc))
* 100.
ExpMovAvgTSI is expavg(truestrengthindex, 20).
Return to Top of Page
Tushar Chandes Momentum Oscillator
Close is [close].
Yclose is val([close], 1).
CMO1 is iff(close > yclose, close - yclose, 0).
SumCMO1 is sum(cmo1, 14).
CMO2 is iff(close < yclose, yclose - close, 0).
SumCMO2 is sum(cmo2, 14).
CMOFinal is ((sumcmo1 - sumcmo2) / (sumcmo1 + sumcmo2)) * 100.
Return to Top of Page
Tushar Chandes Target Price
!!! Tushar Chande's Target Price
Close is [close].
Yclose is val([close], 1).
A is simpleavg(abs(close - yclose), 20).
TPH1 is close + A.
TPH2 is close + (2 * A).
TPL1 is close - A.
TPL2 is close - (2 * A).
Return to Top of Page
Tushar Chande's Trendscore
!!! Tushar Chande's Trendscore
Close is [close].
Close11 is val([close], 11).
Close12 is val([close], 12).
Close13 is val([close], 13).
Close14 is val([close], 14).
Close15 is val([close], 15).
Close16 is val([close], 16).
Close17 is val([close], 17).
Close18 is val([close], 18).
Close19 is val([close], 19).
Close20 is val([close], 20).
ChandesTrendscore is iff(close >= close11, 1, -1) + iff(close
>= close12, 1, -1) + iff(close >= close13, 1, -1) + iff(close
>= close14, 1, -1) +
iff(close >= close15, 1, -1) + iff(close >= close16, 1, -1) +
iff(close >= close17, 1, -1) + iff(close >= close18, 1, -1) +
iff(close >= close19, 1, -1) +
iff(close >= close20, 1, -1).
Return to Top of Page
Tushar Chande's Vidya
!!! Tushar Chande's Vidya
close is [close].
yclose is val([close], 1).
StdDev is sqrt(variance(close, 5)).
MAStdDev is simpleavg(stddev, 20).
SC is 0.9.
K is stddev / mastddev.
Vidya is sc * k * close + (1- sc * k) * yclose.
Return to Top of Page
Typical Price
!!!Indicator for Charting
! Typical Price - High + Low + Close divided by 3.
TypicalPrice is ([high] + [low] + [close]) /3.
!!!Example Market DJIA
Return to Top of Page
Unchanged Issues Index
!!!Indicator for Charts
! Unchanged Issues Index - Unchanges Issues divided by Total Issues.
TotalIssues is [Adv Issues] + [Dec Issues] + [Unch Issues].
UnchIssuesIndex is [Unch Issues]/TotalIssues.
!!!Example Market DJIA
Return to Top of Page
VApct
!Volume Accumulation Percentage [VA
Pct]
define n 21.
AccumFac is (([close]-[low]) - ([high]-[close])) / ([high]-[low]).
VolumeSum is sum([volume],n).
VolumeAccum is sum([Volume] * AccumFac,n).
!Plot as historigram with zero line
VApct is VolumeAccum / VolumeSum * 100.
Return to Top of Page
Volatility
!!Hard-Coded Volatility Indicator
!! set "n" to any # of days.
Define n 21.
dp is Ln([Close] / val([close],1)).
sumdp is Sum(dp,n).
sumdpsqr is sumdp * sumdp.
sumdpave is sumdpsqr / n.
dpsqr is Ln([Close] / val([close],1)) * Ln([Close] / val([close],1)).
totdpsqr is Sum(dpsqr,n).
diff is totdpsqr -sumdpave.
!!use 250 for daily, or 52 for weekly below
factor is 250 / (n-1).
result is sqrt(diff * factor).
Volatility1 is result * 100.
Volatility2 is result * 100.4.
Return to Top of Page
Volume rate of change
!!!Indicator for Charts
! Volume Rate-of-Change - Divide the amount volume has changed over the last N periods by the
! volume N periods ago.
VolumeRoc is [volume] - Val([volume], 12)/ Val([volume], 12).
!!!Example Market DJIA
Return to Top of Page
Weighted Close
!!!Indicator for charts
! Weighted close - Multiply the close by 2, add the high and low to the product and divide by 4.
Close is ([close] * 2) + [high] + [low].
WeightedClose is Close/ 4.
!!!Example Market DJIA
Return to Top of Page
Williams%R
!!!Indicator for Charts
! Williams % R - Momentum indicator that measures overbought/oversold levels.
! Attributed to Larry Williams
HighPrice is (HiVal([high], 14) - [close]) /(HiVal([high], 14) - LoVal([low], 14)).
WilliamsPctR is HighPrice * -100.
!!!Example Market DJIA
Return to Top of Page
ZeroLagMACD
!!! Zero Lag MACD
EMA1 is expavg([close], 13).
EMA2 is expavg([close], 21).
Difference is ema1 - ema2.
ZeroLagEMA13 is ema1 + difference.
EMA3 is expavg([close], 21).
EMA4 is expavg([close], 21).
Difference1 is ema3 - ema4.
ZeroLagEMA21 is ema3 - difference.
ZeroLagMACD is zerolagema13 - zerolagema21.
Return to Top of Page
|