false true (MA(C,N1)+MA(C,N2)+MA(C,N3)+MA(C,N4))/4 algorithm BBI = a weighted sum of the other indicators that have a bullish trend. Bullish-Bearish Indicator Var1:=IF(YEAR>=2010 & MONTH>=2,0,1); Var2:=VOL*C; Var3:=EMA(Var2,13)/EMA(VOL,13); CYS: (EMA(CLOSE,P1)-Var3)/Var3*100*Var1; ML: EMA(CYS,P2)*Var1; LO: 0, POINTDOT; This indicator shows the percentage of buyer which earn money. TR:=MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))); DMZ:=IF((H+L)<=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1)))); DMF:=IF((H+L)>=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1)))); DIZ:=SUM(DMZ,N)/(SUM(DMZ,N)+SUM(DMF,N)); DIF:=SUM(DMF,N)/(SUM(DMF,N)+SUM(DMZ,N)); DDI:DIZ-DIF,COLORSTICK; ADDI:SMA(DDI,N1,M); AD:MA(ADDI,M1); Directional Divergence Index DDD : (MA(CLOSE,SHORT)-MA(CLOSE,LONG)); AMA : MA(DDD,M) A moving average calculated based upon daily activity. A number preceding the abbreviation indicates the daily time period used to calculate the average. Daily Moving Average TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N); HD := HIGH-REF(HIGH,1); LD := REF(LOW,1)-LOW; DMP:= SUM(IF(HD>0 & HD>LD,HD,0),N); DMM:= SUM(IF(LD>0 & LD>HD,LD,0),N); PDI: DMP*100/TR; MDI: DMM*100/TR; ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M); ADXR:(ADX+REF(ADX,M))/2 Directional movement is a system for providing trading signals to be used for price breaks from a trading range. The system involves 5 indicators which are the Directional Movement Index (DX), the plus Directional Indicator (+DI), the minus Directional Indicator (-DI), the average Directional Movement (ADX) and the Directional movement rating (ADXR). The system was developed J. Welles Wilder and is explained thoroughly in his book, New Concepts in Technical Trading Systems . The basic Directional Movement Trading system involves plotting the 14day +DI and the 14 day -DI on top of each other. When the +DI rises above the -DI, it is a bullish signal. A bearish signal occurs when the +DI falls below the -DI. To avoid whipsaws, Wilder identifies a trigger point to be the extreme price on the day the lines cross. If you have received a buy signal, you would wait for the security to rise above the extreme price (the high price on the day the lines crossed). If you are waiting for a sell signal the extreme point is then defined as the low price on the day's the line cross. Directional Movement Index MA1:EMA(CLOSE,P1); MA2:EMA(CLOSE,P2); MA3:EMA(CLOSE,P3); MA4:EMA(CLOSE,P4) An exponential moving average (EMA) is calculated by adding a percentage of yesterday's moving average to a percentage of today's closing value. In this way an investor can put more emphasis on more recent data and less weight on past data in the calculation of the moving average. Exponential Moving Averages MA1:MA(CLOSE,P1); MA2:MA(CLOSE,P2); MA3:MA(CLOSE,P3); MA4:MA(CLOSE,P4); Moving averages are used to help identify the trend of prices. By creating an average of prices, that "moves" with the addition of new data, the price action on the security being analyzed is "smoothed". In other words, by calculating the average value of a underlying security or indicator, day to day fluctuations are reduced in importance and what remains is a stronger indication of the trend of prices over the period being analyzed. Moving Averages DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG); DEA : EMA(DIFF,M); MACD : 2*(DIFF-DEA), COLORSTICK; The Moving Average Convergence/Divergence indicator (MACD) is calculated by subtracting the value of a 26-period exponential moving average from a 12-period exponential moving average (EMA). A 9-period dotted exponential moving average (the "signal line") of the difference between the 26 and 12 period EMA is used as the signal line. The basic MACD trading rule is to sell when the MACD falls below its 9 day signal line and to buy when the MACD rises above the 9 day signal line. Traders sometimes vary the calculation period of the signal line and may use different moving average lengths in calculating the MACD dependent on the security and trading strategy. Moving Average Convergence Divergence MTM : CLOSE-REF(CLOSE,N); MTMMA : MA(MTM,N1) The Momentum is simply the difference between the current point (price or something else) and the point N periods ago. Usage: The rising line signals that the uptrend is getting stronger, the horizontal line at zero level means there is no trend, and falling line means the downtrend is getting stronger. The momentum can be used for identifying trends, overbought/oversold conditions and divergences. Momentum PPO:(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG))/EMA(CLOSE,LONG)*100; EMA(PPO,N); An indicator which attempts to assess the momentum of price activity by the use of two or more moving averages, for a predefined time frame period. Price Oscillator SAR(N,STEP,MAXP),CIRCLEDOT Parabolic Stop and Release was introduced by J Welles Wilder. The Parabolic SAR is a trend following indicator that is designed to create a trailing stop. This is a point that follows a prevailing trend, giving a possible value for a stop loss order that is far enough away from the original trend to avoid being stopped out with a small consolidation and retraction moves. The trailing stop moves with the trend, accelerating closer to price action as time passes giving the path of the indicator a parabolic look. When price penetrates the SAR a new calculation is started taking the other side of the market with an initial setting that again allows a certain amount of initial volatility if the trend is slow to get underway. Stop and Reverse TR:= EMA(EMA(EMA(CLOSE,N),N),N); TRIX : (TR-REF(TR,1))/REF(TR,1)*100; TRMA : MA(TRIX,M); TRIX is a momentum indicator that displays the percent rate-of-change of a triple exponentially smoothed moving average of the security's closing price. It is designed to keep you in trends equal to or shorter than the number of periods you specify. DIFF : EMA(VOL,SHORT) - EMA(VOL,LONG); DEA : EMA(DIFF,M); MACD : DIFF-DEA, ff,COLORSTICK Volumn Moving Average Convergence Divergence ZIG(PER),Width2 Zig Zag is trend following indicator that helps define what the trend has been, and can be used as a significance test to help determine when changes in the current price might indicate when the trend of price might be changing. The zig zag indicators filters out changes in a data item that are less than a specific amount that you define. Below is a chart of National Semiconductor. If you bought every time the zig zag moved up and sold every time the zig zag moved down, every trade would be a winner. Zig Zag TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N); HD := HIGH-REF(HIGH,1); LD := REF(LOW,1)-LOW; DMP:= SUM(IF(HD>0 & HD>LD,HD,0),N); DMM:= SUM(IF(LD>0 & LD>HD,LD,0),N); PDI: DMP*100/TR; @SetName(PDI,'+DI'); MDI: DMM*100/TR; @SetName(MDI,'-DI'); ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,N),Width2; J. Welles Wilder Jr. developed the Average Directional Index (ADX) in order to evaluate the strength of the current trend, be it up or down. It's important to detemine whether the market is trending or trading (moving sideways), because certain indicators give more useful results depending on the market doing one or the other. Average Directional Index (C-C.First)/C.First*100 Performance RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:SMA(RSV,M1,1),COLOR#ffffff; D:SMA(K,M2,1),COLOR#ffd700; J:3*K-2*D,COLOR#8b00ff; KDJ true B36 : MA(CLOSE,3)-MA(CLOSE,6); B612 : MA(CLOSE,6)-MA(CLOSE,12) Bias3-Bias6 and Bias6-Bias12 BIAS1 : (CLOSE-MA(CLOSE,L1))/MA(CLOSE,L1)*100; BIAS2 : (CLOSE-MA(CLOSE,L2))/MA(CLOSE,L2)*100; BIAS3 : (CLOSE-MA(CLOSE,L3))/MA(CLOSE,L3)*100; Show the distance of close and moving average. BIAS TYP := (HIGH + LOW + CLOSE)/3; (TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)) The Commodity Channel Index measures the position of price in relation to its moving average. This can be used to highlight when the market is overbought/oversold or to signal when a trend is weakening. The indicator is similar in concept to Bollinger Bands but is presented as an indicator line rather than as overbought/oversold levels. The Commodity Channel Index was developed by Donald Lambert and is outlined in his book Commodities Channel Index: Tools for Trading Cyclic Trends. Commodity Channel Index BIAS:=(C-MA(C,N))/MA(C,N); DIF:=(BIAS-REF(BIAS,M)); DBCD:SMA(DIF,T,1); MM:MA(DBCD,5) Bias Convergence Divergence C - REF(MA(CLOSE,20),11) Detrended Price Oscillator compares closing price to a prior moving average, eliminating cycles longer than the moving average. The real power of the Detrended Price Oscillator is in identifying turning points in longer cycles: When Detrended Price Oscillator shows a higher trough - expect an upturn in the intermediate cycle; When Detrended Price Oscillator experiences a lower peak - expect a downturn. Detrended Price Oscillator K:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; D:MA(K,M); The Stochastic Oscillator is a measure of the relative momentum of current prices to previous closing prices within a given interval. When it is plotted, it is two lines that move within a range of 0 and 100. Values above 80 are considered to be in overbought territory giving an indication that a reversal in price is possible. Values below 20 are considered oversold and again are an indication that a reversal of the price trend is a higher risk. In a strong trending environment, the Stochastic Oscillator can stay in overbought or oversold territory for some time while price continues in a single direction. In relation to a longer term price trend environment, the stochastic provides little interest. In its construction it is meant to relate the current periods momentum to the most recent previous periods of momentum in price in an attempt to identify periods where momentum may be easing or increasing. The easing (at a top) or increase (at a bottom) of momentum occurs at reversal points for the price trend being measured. However changing momentum also occurs during times when there is no change in the overall trend in prices and should be understood as a period when a reversal in price trend is possible but not guaranteed. Fast Stochastic RSV:= (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100; LWR1:SMA(RSV,M1,1); LWR2:SMA(LWR1,M2,1) 100-Stochastic ROC:(CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100; ROCMA:MA(ROC,M) ROC is a refinement of Momentum - readings fluctuate as percentages around the zero line. Further details are given at Construction. The indicator is designed for use in ranging markets - to detect trend weakness and likely reversal points. However, when combined with a trend indicator, it can be used in trending markets. Ranging Markets First, you will need to set overbought and oversold levels based on your observation of past ranging markets. The levels should cut across at least two-thirds of the peaks and troughs. Go long when ROC crosses to below the oversold level and then rises back above it. Go long on bullish divergences - where the first trough is below the oversold level. Go short when ROC crosses to above the overbought level and then falls back below it. Go short on a bearish divergence - with the first peak above the overbought level. Price Rate-of-Change LC := REF(CLOSE,1); RSI:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100; The Relative Strength Index was introduced by Welles Wilder. It is an indicator for overbought / oversold conditions. It is going up when the market is strong, and down, when the market is weak. The oscillation range is between 0 and 100. The indicator is non-linear, it is moving faster in the middle of its range, and slower - in the overbought / oversold territory. The RSI should not be confused with the relative strength indicator which is used to compare stocks to each other. Relative Strength Index LC:=REF(C,1); AA:=ABS(H-LC); BB:=ABS(L-LC); CC:=ABS(H-REF(L,1)); DD:=ABS(LC-REF(O,1)); R:=IF(AA>BB & AA>CC,AA+BB/2+DD/4,IF(BB>CC & BB>AA,BB+AA/2+DD/4,CC+DD/4)); X:=(C-LC+(C-O)/2+LC-REF(O,1)); SI:16*X/R*MAX(AA,BB) Swing Index A:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:MA(A,M1); D:MA(K,M2) The Slow Stochastic applies further smoothing to the Stochastic oscillator, to reduce volatility and improve signal accuracy. Slow Stochastic DMZ:=IF((H+L)<=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1)))); DMF:=IF((H+L)>=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1)))); ADMZ:=MA(DMZ,10); ADMF:=MA(DMF,10); SRDM:IF(ADMZ>ADMF,(ADMZ-ADMF)/ADMZ,IF(ADMZ=ADMF,0,(ADMZ-ADMF)/ADMF)); ASRDM:SMA(SRDM,N,1); SRDM (VOL-REF(VOL,N))/REF(VOL,N)*100 Rate of Change Volume (ROCV) is an oscillator applied to volume rather than price and is calculated in the same manner as the Rate of Change (Price) indicator. ROCV highlights increases in volume, which normally occur at most significant market tops, bottoms and breakouts. Rate of Change (Volume) SMA(MAX(VOL-REF(VOL,1),0),N,1)/SMA(ABS(VOL-REF(VOL,1)),N,1)*100 Volumn RSI Volumn Relative Strength Index -100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)) The The Williams %R indicator was introduced by Larry Williams. It is working by identifying the overbought / oversold levels. The scale extends from 0 to -100. Usage The overbought level is considered 0 to -20, and oversold -70 to -100. As a confirmation signal, we can wait for the indicator to cross the -50 line. Williams %R K :=(C-L)/(H-L); SK : SMA(K,N1,1); SD : SMA(SK,N2,1); The Stochastic Oscillator was introduced by George C. Lane. The indicator provides information about the location of a current close in relation to the period's high and low. The closer the close is to the period's high, the higher is the buying pressure, and the closer the close is to the period's low, the more selling pressure is. Usage: The indicator is considered bullish, when above 80, and bearish, when below 20. As this definition does not provide any insights on when to buy or sell, consider generating signals when the indicator moves from the overbought / oversold territory back. The crossings between the %K and its moving average can be used for the same purpose. Finally, the divergence can be considered a very strong signal. When the divergence develops when the indicator is moving from the overbought / oversold levels, it is a sell / buy signal. Additionally, the K39 (unsmoothed 39 period stochastic oscillator) was reported to generate good results when tested on paper. A buy signal is generated when K crosses above 50% and the close price is above the previous week's highest close. Sell signals are generated when K crosses below 50% and the close is below the previous week's lowest close. An additional confirmation can be provided by some indicators from the different group, for example, the On Balance Volume (OBV) indicator. The most value of a stochastics is when the strong trend is present. According to Lane, the safest way to trade is to buy when the trend is up, and to sell with the downtrend. Stochastic Oscillator TP :=(High + Low + Close) / 3; LTP := REF(TP,1); MF :=TP*V; PMF := IF(TP>LTP,MF,0); NMF := IF(TP<=LTP,MF,0); MR :=MA(PMF,N)/MA(NMF,N); MFI :100-(100/(1+MR)); 20,Color#808080,NoValueLabel; 80,Color#808080,NoValueLabel; FillRGN(MFI>80,MFI,80),Brush#20808000; FillRGN(MFI<20,MFI,20),Brush#20800000; @SetHLine(20,50,80,100); @SetYMinMax(0,100) Money Flow LC := REF(CLOSE,1); RSI:=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100; (RSI-LLV(RSI,N))/(HHV(RSI,N)-LLV(RSI,N)); Developed by Tushard Chande and Stanley Kroll, StochRSI is an oscillator that measures the level of RSI relative to its range, over a set period of time. The indicator uses RSI as the foundation and applies to it the formula behind Stochastics. The result is an oscillator that fluctuates between 0 and 1. StochRSI MP:=(H+L)/2; MM :=MP-REF(MP,1); BR :=V/(H-L)/1000000; EOM : MM/BR; MA(EOM,N); Ease of Movement true COUNT(CLOSE>REF(CLOSE,1),N)/N*100 people resist paying more for a stock than others unless the stock continues to move up. People resist selling a stock for less than the price others have been getting for it unless the price continues to decline. People who purchase the stock at the top of a trading range have a strong inclination to wait until the price comes back before they get out. Psychogical line LC:=REF(CLOSE,1); SUM(IF(CLOSE>LC,VOL,0),N)/ SUM(IF(CLOSE<=LC,VOL,0),N)*100 This ratio is derived from the Volatility Ratio introduced by Jack Schwager in Technical Analysis to identify wide-ranging days. Designed to highlight breakouts from a trading range, this VR compared to true range for the indicator period. Volatility Ratio LC :=REF(CLOSE,1); TR := MAX(HIGH-LOW,ABS(LC-HIGH),ABS(LC-LOW)); ATR : SMA(TR,N,1) The Average True Range indicator was created by J. Welles Wilder. Its primary use is for determining the volatility of the security. 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. Average True Range EC := EMA(HIGH-LOW,N); (EC-REF(EC,N))/REF(EC,N)*100 Marc Chaikin measures volatility as the trading range between high and low for each period. This does not take trading gaps into account as Average True Range does. Chaikin's Volatility Up:(N-HHVBARS(C,N))/N*100; Down:(N-LLVBARS(C,N))/N*100; The Aroon indicator system consists of two lines, 'Aroon(up)' and 'Aroon(down)'. It takes a single parameter which is the number of time periods to use in the calculation. Aroon(up) is the amount of time (on a percentage basis) that has elapsed between the start of the time period and the point at which the highest price during that time period occurred. If the stock closes at a new high for the given period, Aroon(up) will be +100. For each subsequent period that passes without another new high, Aroon(up) moves down by an amount equal to (1 / # of periods) x 100. Aroon LogS :=Log(C/Ref(C,1)); TLogs :=Sum(LogS,N); ALogs :=TLogs/N; Delta :=LogS-ALogs; SSD :=Sum(Delta*Delta,N); HV : Sqrt(SSD/(N-1))*Sqrt(T) Historic Volatility true LC:=REF(CLOSE,1); AA:=ABS(HIGH-LC); BB:=ABS(LOW-LC); CC:=ABS(HIGH-REF(LOW,1)); DD:=ABS(LC-REF(OPEN,1)); R:=IF(AA>BB & AA>CC,AA+BB/2+DD/4,IF(BB>CC & BB>AA,BB+AA/2+DD/4,CC+DD/4)); X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1)); SI:=16*X/R*MAX(AA,BB); ASI:SUM(SI,0) The Accumulation Swing Index (ASI) is a cumulative sum of the Welles Wilder’s Swing Index indicator Accumulation Swing Index OBV:SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0),Width2; M:MA(OBV,N); Volume is the number of shares or contracts that change ownership over a given period of time. It is an indication of supply and demand that is independent from price and can relate a great deal about the relative enthusiasm of buyers and sellers in the market place. On Balance Volume is one indicator that is designed to track changes in volume over time. It is the running total of volume calculated in such a way as to add the day's volume to a cumulative total if the day's close was higher than the previous day's close and to subtract the day's volume from the cumulative total on down days. The assumption is that changes in volume will precede changes in price trend. On Balance Volume was created by Joseph Granville and has a number of interpretive qualities and should be used in conjunction with other indications of price trend reversals. Another use of On Balance Volume (OBV) is to look at the trend in the indicator. A rising trend in the OBV gives sign of a healthy move into the security. A doubtful trend, or sideways trend in the OBV leaves price trend suspect and a candidate for a reversal of the trend. A falling OBV trend signals an exodus from the security despite price activity and leads to the caution that price may follow if it is not already. As indicated on the graphs above, look for divergences between the price and the OBV indicator. Divergences between the peaks warns of a potential fall in prices. Divergences between the troughs warns of a potential rise in prices. On Balance Volume SUM((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*VOL,0) Price and Volume Trend (PVT) is a variation of On Balance Volume, used to determine the strength of trends and warn of reversals. PVT = yesterday's PVT + today's Volume * (today's Close - yesterday's Close) / yesterday's Close PRICE AND VOLUME TREND SUM(IF(ISUP,VOL,IF(ISDOWN,-VOL,0)),0) SOBV WVAD : (CLOSE-OPEN)/(HIGH-LOW)*VOL; MA1:MA(WVAD,N1); MA2:MA(WVAD,N2); Williams'Variable Accumulation Distribution A:=IF(V<=REF(V,1),C/REF(C,1),1); NVI:Start*MUL(A); M1:EMA(NVI,N1); M2:EMA(NVI,N2); The Negative Volume Index ("NVI") focuses on days where the volume decreases from the previous day. The premise being that the "smart money" takes positions on days when volume decreases. 1.Take yesterday's Negative Volume Index 2.If today's volume is lower than yesterday, add: { ( Close [today] - Close [yesterday] ) / Close [yesterday] } * NVI [yesterday] 3.Otherwise, add zero. Negative Volume Index A:=IF(V>=REF(V,1),C/REF(C,1),1); PVI:Start*MUL(A); M1:MA(PVI,N1); M2:MA(PVI,N2); 1.Take yesterday's Positive Volume Index 2.If today's volume is greater than yesterday, add: { ( Close [today] - Close [yesterday] ) / Close [yesterday] } * PVI [yesterday] 3.Otherwise, add zero Positive Volume Index true BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; UPR:BBI+P*STD(BBI,N); DWN:BBI-P*STD(BBI,N) BBIBOLL MID : MA(CLOSE,N); UPPER: MID + P*STD(CLOSE,N); LOWER: MID - P*STD(CLOSE,N); The Bollinger Bands were introduced by John Bollinger. Its primary use is for presenting the volatility of the security in an easy to view form. The indicator consists of three bands: a simple moving average (middle), SMA plus 2 standard deviations (upper), and SMA minus 2 standard deviations (lower). Bollinger Bands PT := REF(HIGH,1)-REF(LOW,1); CDP : (HIGH + LOW + CLOSE)/3; AH : CDP + PT; AL : CDP - PT; NH : 2*CDP-LOW; NL : 2*CDP-HIGH CDP UPPER : MA(CLOSE,N)*1.06; LOWER : MA(CLOSE,N)*0.94 An envelope is comprised of two moving averages. One moving average is shifted upward and the second moving average is shifted downward. ENVELOPES (TRADING BANDS) TYP:=(HIGH+LOW+CLOSE)/3; LL:=LLV(LOW,N); HH:=HHV(HIGH,N); WR:TYP+(TYP-LL); MR:TYP+(HH-LL); SR:2*HH-LL; WS:TYP-(HH-TYP); MS:TYP-(HH-LL); SS:2*LL-HH MIKE M :=(H+L+C)/3; A :=H-L; RR:=M+A; SS:=M-A; R:BackSet(IsLastBar,5)*RR.LastData,Width2,HighSpeed,ColorRed; S:BackSet(IsLastBar,5)*SS.LastData,Width2,HighSpeed,ColorDarkGreen; DrawNumber(BarsSince(R)==1,R,R,'f2'),Label0,VCenter,Right,ColorRed; DrawNumber(BarsSince(S)==1,S,S,'f2'),Label0,VCenter,Right,ColorDarkGreen; Support & Resistance P*STD(C,N)*2,Width1.6,HighQuality The Bollinger Band Width indicator charts the width of the Bollinger Bands. When the Bollinger Band Width increases in value, it indicates that the volatility of the underlying stock has also increased. Bollinger Band Width Shift := FACTOR * ATR(Length); Avg := EMA(C, Length); Upper : Avg + Shift; Lower : Avg - Shift Keltner channel true ABS(ADVANCE - DECLINE) The Absolute Breadth Index ("ABI") is a market momentum indicator that was developed by Norman G. Fosback. The ABI shows how much activity, volatility, and change is taking place on the New York Stock Exchange while ignoring the direction prices are headed. You can think of the ABI as an "activity index." High readings indicate market activity and change, while low readings indicate lack of change. Absolute Breadth Index SUM(ADVANCE-DECLINE,0) The advance and decline line is a cumulative, ongoing sum of the difference between the number of stocks closing higher minus the number of stocks closing lower each day. It can be used as a measure of market strength as it moves higher when the there are more advancing issues than declining issues. It moves lower when there are more declining issues than advancing issues. Plotting the Advance/Decline line allows insight into market strength. At times the major U.S. indices can continue higher while we are seeing a drop in the advance/decline line. This is called a divergence and warns that we may be at the end of an upward movement and sets the stage for a possible reversal of price trend. However such divergences can exist over a long period of time before evidence of price trend reversal occur. It becomes a matter of sound analysis to build as wide a body of evidence as possible in forming an outlook for the future path of prices. Advance/Decline line SUM(ADVANCE,N)/SUM(DECLINE,N) The Advance/Decline Ratio ("A/D Ratio") shows the ratio of advancing issues to declining issues. It is calculated by dividing the number of advancing issues by the number of declining issues. Interpretation The A/D Ratio is similar to the Advancing-Declining Issues in that it displays market breadth. But, where the Advancing-Declining Issues subtracts the advancing/declining values, the A/D Ratio divides the values. 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 (which has steadily increased). A moving average of the A/D Ratio is often used as an overbought/oversold indicator. The higher the value, the more "excessive" the rally and the more likely a correction. Likewise, low readings imply an oversold market and suggest a technical rally. Keep in mind, however, that markets that appear to be extremely overbought or oversold may stay that way for some time. When investing using overbought and oversold indicators, it is wise to wait for the prices to confirm your belief that a change is due before placing your trades. Day-to-day fluctuations of the Advance/Decline Ratio are often eliminated by smoothing the ratio with a moving average ADVANCE/DECLINE RATIO MA(ADVANCE/(ADVANCE-DECLINE),N) The Breadth Thrust indicator is a market momentum indicator. It was developed by Dr. Martin Zweig. The Breadth Thrust is calculated by dividing a 10-day exponential moving average of the number of advancing issues, by the number of advancing plus declining issues. Interpretation A "Breadth Thrust" occurs when, during a 10-day period, the Breadth Thrust indicator rises from below 40% to above 61.5%. A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought. According to Dr. Zweig, there have only been fourteen Breadth Thrusts since 1945. The average gain following these fourteen Thrusts was 24.6% in an average time-frame of eleven months. Dr. Zweig also points out that most bull markets begin with a Breadth Thrust. Breadth Trust ADL := SUM(ADVANCE-DECLINE,0); CHA : MA(ADL,SHORT) - MA(ADL,LONG) A cumulative volume indicator attempting to assess the net volume movement on a day or week. Chaikin's Accumulation/Distribution Indicator EMA(ADVANCE-DECLINE,N1)/10 - EMA(ADVANCE-DECLINE,N2)/20 The McClellan Oscillator can be used as an overbought/oversold indicator. It also has value at predicting short term trend changes when it crosses the zero line. A rising indicator that crosses the zero line from below is a bullish sign. A falling indicator that crosses the zero line from above is a bearish sign. The McClellan Oscillator is calculated by subtracting a 39 day moving average of advances minus declines, from a 19 day moving average of advances minus declines. Generally it is not considered a forward looking indicator but can tell you a lot about trend. McClellan Oscillator MA(ADVANCE-DECLINE,N) Over Buy/Over Sell EMA(ADVANCE/(ADVANCE+DECLINE)*100,N) STIX true AMOUNT,VOLSTICK; MA1:MA(AMOUNT,N1); MA2:MA(AMOUNT,N2) AMOUNT AMOUNT VV:V,VOLSTICK; @SetName(VV,''); MA1:MA(VV,M1); @SetName(MA1,'MA'); Volumn and moving average Volumn (MA(VOL,SHORT)-MA(VOL,LONG))/MA(VOL,SHORT)*100 The Volume Oscillator (VO) identifies trends in volume using a two moving average system. The Volume Oscillator measures the difference between a faster and slower moving average (MA). If the fast MA is above the slow MA the oscillator will be positive. If the fast MA is below the slow MA then the oscillator will be negative. The Volume Oscillator will be zero when the two MA's cross. Volume Oscillator STD(VOL,N) Volumn STD Volumn STD E1 :=EMA(V,N1); PVO : (E1-EMA(V,N2))/E1*100,Width1.6,HighQuality; M : EMA(PVO,N3); The Percentage Volume Oscillator (PVO) is the percentage difference between two moving averages of volume. Percentage Volume Oscillator HHV(V,N) N day's maximum volume STICKLINE(C>REF(C,1),V,0),Brush#FF0000,Color#800000; STICKLINE(C<=REF(C,1),V,0),Brush#00FF00,Color#008000; Volume with custom color true AD:SUM(((CLOSE-LOW)-(HIGH-CLOSE))/(HIGH-LOW)*VOL,0); M:MA(AD,N); The Accumulation/Distribution is a momentum indicator that associates changes in price and volume. The indicator is based on the premise that the more volume that accompanies a price move, the more significant the price move. Accumulation/Distribution A:C-REF(C,N); MI:SMA(A,N,1); MI MI:=C-REF(C,1); AMI:=SMA(MI,N,1); DIF:MA(REF(AMI,1),N1)-MA(REF(AMI,1),N2); MICD:SMA(DIF,10,1) MICD RC:=C/REF(C,N); ARC:SMA(REF(RC,1),N,1) Rate of Change RC:=C/REF(C,N); ARC:=SMA(REF(RC,1),N,1); DIF:MA(REF(ARC,1),N1)-MA(REF(ARC,1),N2); RCCD:SMA(DIF,N,1) Rate of Change Convergence Divergence IF(C<REF(C,N),(C-REF(C,N))/REF(C,N),IF(C==REF(C,N),0,(C-REF(C,N))/C)) SRMI D :=(HIGH-LOW); AD:=IF(D==0,0,((CLOSE-LOW)-(HIGH-CLOSE))/D*VOL); MV :=MA(VOL,N); CMF:IF(MV==0,0,MA(AD,N)/MV),COLORSTICK; Developed by Marc Chaikin, the Chaikin Money Flow oscillator is calculated from the daily readings of the Accumulation/Distribution Line. The basic premise behind the Accumulation Distribution Line is that the degree of buying or selling pressure can be determined by the location of the close relative to the high and low for the corresponding period (Closing Location Value). There is buying pressure when a stock closes in the upper half of a period's range and there is selling pressure when a stock closes in the lower half of the period's trading range. The Closing Location Value multiplied by volume forms the Accumulation/Distribution Value for each period. Chaikin Money Flow LC :=REF(C,1); TL :=MIN(L,LC); BP :=C-TL; TR := MAX(H-L,ABS(LC-H),ABS(LC-L)); BPSum1 := MA(BP,N1); BPSum2 := MA(BP,N2); BPSum3 := MA(BP,N3); TRSum1 := MA(TR,N1); TRSum2 := MA(TR,N2); TRSum3 := MA(TR,N3); RawUO :=4*(BPSum1/TRSum1)+2*(BPSum2/TRSum2)+(BPSum3/TRSum3); (RawUO/(4+2+1))*100,Width1.6,HighQuality; Developed by Larry Williams and first described in a 1985 article for Technical Analysis of Stocks and Commodities magazine, the "Ultimate" Oscillator combines a stock's price action during three different time frames into one bounded oscillator. Values range from 0 to 100 with 50 as the center line. Oversold territory exists below 30 and overbought territory extends from 70 to 100. Ultimate Oscillator 0; "Aroon(N)[UP]"-"Aroon(N)[DOWN]" The Aroon Oscillator was constructed by subtracting Aroon(down) from Aroon(up). Since Aroon(up) and Aroon(down) oscillate between 0 and +100, the Aroon Oscillator oscillate between -100 and +100 with zero as the center crossover line. Aroon Oscillator true SUM(EMA((HIGH-LOW),N1)/EMA(EMA((HIGH-LOW),N1),N1),N2) The Mass Index was designed to identify trend reversals by measuring the narrowing and widening of the range between the high and low prices. As this range widens, the Mass Index increases; as the range narrows the Mass Index decreases. The Mass Index was developed by Donald Dorsey. Mass Index STD(CLOSE,N) STD STD (HHV(CLOSE,N)-LLV(CLOSE,N))/SUM(ABS(CLOSE-REF(CLOSE,1)),N) Vertical Horizontal Filter (VHF) was created by Adam White to identify trending and ranging markets. VHF measures the level of trend activity, similar to ADX in the Directional Movement System. Trend indicators can then be employed in trending markets and momentum indicators in ranging markets. Vary the number of periods in the Vertical Horizontal Filter to suit different time frames. White originally recommended 28 days but now prefers an 18-day window smoothed with a 6-day moving average. Vertical Horizontal Filter SUM(IF( CLOSE>REF(CLOSE,1),CLOSE-MIN(REF(CLOSE,1),LOW),IF(CLOSE<REF(CLOSE,1), CLOSE-MAX(REF(CLOSE,1),HIGH),0)),0) A price indicator attempting to assess the accumulation or distribution of securities. William's Accumulation/Distribution DrawNumber(FindPeak(N),H,H,'f2'),Label3; DrawNumber(FindTrough(N),L,L,'f2'),Label3,Valign2; Zig Zag Label PR:C/FML(StockCode,'C')*100,HighQuality; EMA(PR,N); The Price Relative compares the performance of one security against that of another. It is often used to compare the performance of a particular stock to a market index, usually the S&P 500. Because the goal of many portfolio managers is to outperform the S&P 500, they are usually interested in the strongest stocks. The price relative offers a straightforward and accurate portrayal of a stock's performance relative to the market. Price Relative A := HHV(H,N); B := LLV(L,N); HH:BackSet(IsLastBar,N)*A.LastData,Width2; LL:BackSet(IsLastBar,N)*B.LastData,Width2; Height := HH-LL; A1 : LL+Height*0.382; A2 : LL+Height*0.5; A3 : LL+Height*0.618; @SetTextVisible(HH,false); @SetTextVisible(LL,false); @SetTextVisible(A1,false); @SetTextVisible(A2,false); @SetTextVisible(A3,false); Fibonnaci A := LR(C,N); Dist :=C-A; M := Max(MaxValue(Dist),ABS(MinValue(Dist)))*P/100; Upper : A +M; Lower : A - M; A; @SetName(A,''); @SetTextVisible(Upper,false); @SetTextVisible(Lower,false); Linear Regression Channels O:OrgData(DataName); @SetName(O,DataName); @SetTextVisible(false); Provide raw data from data provider Zig(N),Width2; A :=FindPeak(N); B :=FindTrough(N); A1 :=ToValue(A,H,0.5); A2 :=ToValue(B,L,0.5); PolyLine(A,H),StyleDash; PolyLine(B,L),StyleDash,SameColor; A3 :=ZIGP(N); DrawNumber(A1,A1,A3,'f3'),Label3,VAlign0; DrawNumber(A2,A2,A3,'f3'),Label3,VAlign0; Zig /w retracements A1 :=Peak(N); A2 :=Peak(N,2); B1 :=PeakBars(N); B2 :=PeakBars(N,2); DrawLine(B2.LastData,A2.LastData,B1.LastData,A1.LastData,1); DrawText(B2.LastData,A2.LastData,'{HIGH} +hi[UP]'),SameColor; DrawText(B1.LastData,A1.LastData,'{HIGH} +hi'),SameColor; D1 :=Trough(N); D2 :=Trough(N,2); E1 :=TroughBars(N); E2 :=TroughBars(N,2); DrawLine(E2.LastData,D2.LastData,E1.LastData,D1.LastData,1),SameColor; DrawText(E2.LastData,D2.LastData,'{LOW} +lo[up channel]'),VAlign2,SameColor; DrawText(E1.LastData,D1.LastData,'{LOW} +lo[b/o retest]'),VAlign2,SameColor; Zig support and resistance DrawIcon(FindPeak(N),H,'dn.gif'),Top; DrawIcon(FindTrough(N),L,'up.gif'),Bottom; Draw buy sell Icon according Zig AA : DrawText(NEARESTTIME(D,T),C,Text); @SetAttr(AA,Style); @SETTEXTVISIBLE(false); Draw label at specific time true N Horizon Line EMA(C,N); EMA MA(C,N); MA M:STOCK; @SetName(''); @SetTextVisible(M,false); Stock area VOL,VOLSTICK; Volumn View N,StyleDash,ColorRed Dot Horizon Line M:STOCK; @SetName(M,StkLabel); @SetTextVisible(false); Stock area show symbol and value A:VOL,VOLSTICK,HIGH0.2,Alpha100; @SETNAME(A,'V'); @SETTEXTVISIBLE(false) Volume for overlay A:=REF(FML(Indi),N); BackSet(IsLastValue(A),A,M) Reference values of N days before REF(C,N); Reference Close Value true MID := MA(CLOSE,N); UPPER: MID + P*STD(CLOSE,N),Color#8080c0; LOWER: MID - P*STD(CLOSE,N),Color#8080c0; FILLRGN(1,LOWER,UPPER),Brush#200000C0; The Bollinger Bands were introduced by John Bollinger. Its primary use is for presenting the volatility of the security in an easy to view form. The indicator consists of three bands: a simple moving average (middle), SMA plus 2 standard deviations (upper), and SMA minus 2 standard deviations (lower). Area Bollinger Bands LC := REF(CLOSE,1); RSI:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100; 70,HighSpeed; 30,HighSpeed; FILLRGN(RSI>70,RSI,70),Brush#20808000; FILLRGN(RSI<30,RSI,30),Brush#20800000; The Relative Strength Index was introduced by Welles Wilder. It is an indicator for overbought / oversold conditions. It is going up when the market is strong, and down, when the market is weak. The oscillation range is between 0 and 100. The indicator is non-linear, it is moving faster in the middle of its range, and slower - in the overbought / oversold territory. The RSI should not be confused with the relative strength indicator which is used to compare stocks to each other. Relative Strength Index M :=(H+L+C)/3; S:M +((-L+(2*M)-(-H+2*M))),Color#80c080; R:M-((-L+(2*M))-(-H+2*M)),Color#80c080; FILLRGN(1,S,R),Brush#2000C000; Support & Resistance FML(StockCode,'C'),FirstDataOfView,HighQuality; @SetName(StockCode); Compare Stocks V1:FML(Indi),HighQuality; V2:FML(StockCode,Indi),HighQuality; @SetName(V1,StkLabel); @SetName(V2,StockCode); @SetName(Indi); Compare two indicators M :=(H+L+C)/3; A :=H-L; RR:=M+A; SS:=M-A; R : DrawAxisY(RR,-10,12),Width2,Color#A0FF0000,AxisMargin12; S : DrawAxisY(SS,-10,12),Width2,Color#A0004000; DrawTextAxisY(RR,'R',1),Color#FF0000,VCenter; DrawTextAxisY(SS,'S',1),Color#004000,VCenter; @SetName('SR'); Support & Resistance on AxisY A:=(C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100; K:MA(A,M1),ColorDarkGreen,Width2,HighQuality; D:MA(K,M2); PartLine(K>=D,K),ColorRed,Width2,HighQuality; Slow Stochastic REF(FML(Indi),N); @SetName(Indi+'-'+N); Reference indicator's value MAIN : C,HighQuality; FILLAREA(MAIN),Brush#20808000; @SetTextVisible(MAIN,false); @SetTextVisible(false); Main Area View P := (H+L+C)/3; YL := REF(L,1); YH := REF(H,1); R1 : 2 * P - YL; S1 : 2 * P - YH; R2 : (P - S1) + R1; S2 : P - (R1-S1); R3 : (P + R2) - S1; S3 : (P - R2) + S1; R4 : (P + R3) - S1; S4 : (P - R3) + S1; R5 : (P + R4) - S1; S5 : (P - R4) + S1; Support & Resistance 2 FML(StockCode,'STOCK'),FullView,HighQuality,MonoStock; @SetName(StockCode); Compare Stocks C1:=FML(Symbol2,'C')-C; H1:=FML(Symbol2,'H')-H; L1:=FML(Symbol2,'L')-L; O1:=FML(Symbol2,'O')-O; GETSTOCK(O1,C1,MAX(C1,O1,H1,L1),MIN(C1,O1,H1,L1)); draw difference of two symbol in candle mode. Difference of Two Symbol DrawIcon(FML(Indi+'[ExitLong]'),H,'DN.GIF'),TOP; DrawIcon(FML(Indi+'[EnterLong]'),L,'UP.GIF'),BOTTOM; Trading Icon FML(StockCode,'C'),HighQuality; @SetName(StockCode); Compare Stocks M : SAR(N,STEP,MAXP),COLORBLUE; A1:STOCK,MONOSTOCK,BRUSHRED,COLORRED; A2:IF(M<C,STOCK,NAN),MONOSTOCK,BRUSHBLUE,COLORBLUE; A3:IF(M<C,M,NAN),COLORRED,CIRCLEDOT; @SETNAME(M,'SAR'); @SETTEXTVISIBLE(A1,FALSE); @SETTEXTVISIBLE(A2,FALSE); @SETTEXTVISIBLE(A3,FALSE); @SETTEXTVISIBLE(FALSE); Color candle bar based on sar true H1:=IF(IsLastDay & Time<=N,H,NaN); L1:=IF(IsLastDay & Time<=N,L,NaN); HH :=HHV(H1,0); LL :=LLV(L1,0); Extend(IF(HH.LastValue==HH,HH,NaN)),StyleDash,Width2; Extend(IF(LL.LastValue==LL,LL,NaN)),StyleDash,Width2; a horizontal line based on the high and low of the first X minutes of the trading day. Opening Range "REFC#DAY",StyleDash,ColorRed,NoValueLabel,Horizontal,Width2; @SetTextVisible(false); Prior day's close "RefIndi(H,1)#DAY",StyleDash,NoValueLabel,Horizontal,Width2; "RefC#DAY",StyleDash,NoValueLabel,Horizontal,Width2; "RefIndi(L,1)#DAY",StyleDash,NoValueLabel,Horizontal,Width2; @SetTextVisible(false); Prior day's High,Low,Close Cond := Between(DoubleDate,LastDoubleDate-N,LastDoubleDate-0.00001); HH :=HHV(IF(Cond,H,NaN)).LastValue; LL :=LLV(IF(Cond,L,NaN)).LastValue; CC :=IF(Cond,C,NaN).LastValue; P :=(HH+LL+CC)/3; M :=(HH+LL)/2; PD :=ABS(P-M); PH:IF(IsLastDay,P+PD,NaN),StyleDash,Width2; PL:IF(IsLastDay,P-PD,NaN),StyleDash,Width2; Three Days Pivot Range Test some operation false "MACD(26,12,9)" TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N); HD := HIGH-REF(HIGH,1); LD := REF(LOW,1)-LOW; DMP:= SUM(IF(HD>0 & HD>LD,HD,0),N); DMM:= SUM(IF(LD>0 & LD>HD,LD,0),N); PDI: DMP*100/TR; MDI: DMM*100/TR; ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M); ADXR:(ADX+REF(ADX,M))/2 HD := HIGH-REF(HIGH,1);