Page 2 of 8 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 72
Like Tree14Likes

Divergence indicator(s)

This is a discussion on Divergence indicator(s) within the Trading tools forums, part of the Trading Forum category; Those are two articles about divergence (attached inside zip and rar archives)....

      
   
  1. #11
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,473
    Blog Entries
    2909
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    Those are two articles about divergence (attached inside zip and rar archives).
    Attached Files Attached Files
    CamaRon likes this.

  2. #12
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,473
    Blog Entries
    2909
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    And this is Wpr MTF alerts + divergence indicator :

    Divergence indicator(s)-wprdiver.png
    Attached Files Attached Files

  3. #13
    Member
    Join Date
    Jul 2013
    Location
    A, A
    Posts
    57
    Quote Originally Posted by newdigital View Post
    Those are two articles about divergence (attached inside zip and rar archives).
    Interesting stuff.

  4. #14
    Member
    Join Date
    Jul 2013
    Location
    A, A
    Posts
    57
    Yes. How'bout it, Igorad?

    Quote Originally Posted by newdigital View Post
    Yes, I see. It may be some other indicators for divergence ... or Igorad will improve this one or create new one.

    As to me so I will try to find some free divergence indicators for now to upload it here.

  5. #15
    igorad
    Guest
    One more interesting article about the Momentum Divergence from "New Trading Systems and Methods" by Perry J. Kaufman.
    Attached Files Attached Files
    CamaRon likes this.

  6. #16
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,473
    Blog Entries
    2909
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    This is what I got from Igorad's file (except images) :

    MOMENTUM DIVERGENCE

    Divergence occurs when two price series move apart. The Dow Jones Industrials and Dow Jones Utilities are diverging if the Industrials are rising while the Utilities are falling. Divergence between these two markets has always been considered a leading indicator of a downturn in the economy. The S&P 500 is also watched in relationship to the 10-year Treasury note, the benchmark long-term rate. Notes usually counterbalance moves in the stock market. When the S&P rallies, the price of notes falls to reflect the anticipation of higher interest rates. When the S&P and the price of notes both rise, or both fall, something special is happening. When prices diverge with an indicator, such as an unsmoothed momentum or the MACD, the direction of prices are expected to follow the direction of momentum.

    Momentum divergence is measured by comparing the direction of prices with the direction of the momentum indicator value over the same time interval. Most often, this is done by connecting the peaks of the price movement when prices are rising (or the valleys of the price declines).
    Connecting only the peaks and valleys of both prices and momentum avoids the problems associated with erratic data. Figure 9.17 shows three examples of a 20-day momentum divergence for Intel.

    A bearish divergence is one that anticipates a downturn in prices. Because momentum is the leading indicator, a bearish divergence occurs when prices are rising while the momentum values are falling. This can be seen in the middle of Figure 9.17 where line 2 shows sharply rising prices at the same time that line B shows clearly falling momentum values. Price follows momentum, and a sharp decline lasts for all of December 2002.

    A bullish divergence is formed when prices are declining while momentum values are rising. Two examples of a bullish divergence can be seen in Figure 9.17 marked with 1 and 3 on the price chart and A and C on the momentum indicator.

    The important points to remember about a divergence are:

    • Prices and momentum must be moving in opposite directions. It is not correct to say there is a bullish divergence when momentum is rising quickly while prices are moving sideways or slightly higher. They must be moving in opposite directions.

    • The greater the divergence, the more likely prices will change direction soon. That is, when prices are moving up very sharply and momentum is clearly moving lower, then the likelihood of a fast change of direction for prices is much greater than if prices were gradually rising while the momentum was slowly falling.

    • A divergence can be interpreted as a market that is rising slower and slower. Each successive peak is closer to the previous peak, or each successive peak occurs after more and more time has elapsed. This may appear similar to a rounding top before prices start down.

    • Divergence that occurs over a longer time period (for example, months) will forecast a larger price reversal than a divergence formed over hours or days.

    Momentum divergence allows you to use a momentum indicator effectively without regard to the absolute highs and lows of the momentum values, which was a problem determining overbought and oversold conditions. Regardless of how high momentum goes, the divergence occurs when the values decline or rise relative to prices. The absolute values of momentum are not relevant.

    An Amazon.com Example Using Momentum Peaks

    Momentum divergence is an important concept. The following example, applied in Figure 9.18, uses the method of momentum peaks with MACD, plus an additional rule. Use the following steps:

    1. Find the swing highs on the chart. This can be done simply by looking at the highest peaks. In Figure 9.18 there are two significant peaks,one in January 1999 and the other at the end of April 1999. There is a peak slightly earlier in April; however, that is part of the price move that ends with a rally to 110.

    2. Draw a line connecting the January and April peaks.

    3. There will be two corresponding peaks in the MACD lines directly below the price chart. Connect the two peaks in the MACD line.

    4. The line drawn across the price highs is clearly rising. The line across the MACD peaks is clearly falling; therefore, the pattern indicates a bearish divergence. Prices confirm the divergence by dropping from 110 to 70 in less than two weeks, and below 50 in the same move.

    There is also an unmarked bullish divergence on the chart. Prices bottom in June and August with clearly rising lows in the MACD occurring at the same time. The August price low marks the bottom of the move and a rally follows.

    Trading Rules for Divergence

    There are a number of alternative rules for trading a momentum divergence, each differing in the amount of anticipation.

    MACD Divergence

    The simplest of rules is based on using the MACD to create a bearish divergence. Once the second rising price peak is identified, along with the corresponding MACD peak, the divergence sell signal comes when the MACD line crosses the signal line as it moves lower. This is seen in Figure 9.18 at the end of April. The trade is exited when the MACD value becomes zero, or if a price objective is reached, based on a top formation. The same rules apply to a bullish divergence.

    General Rules for Trading Momentum Divergence

    1. Enter a short position when the divergence is identified, provided prices have not already reached the correction level or profit target. Bearish divergence is recognized after the second momentum peak has crested; therefore, it is possible that the momentum value will be near neutral (the midpoint value). The neutral momentum is the normal profit because we cannot expect high momentum to alternate with low momentum, but we can expect high or low momentum to correct to neutral, or zero. Waiting until the divergence is extremely clear is often too late. Momentum will have achieved most of its correction. An alternative is discussed in the following section, Anticipating the Divergence.

    2. Enter a short position using MACD when the MACD line crosses the signal line after the divergence formation is recognized. MACD offers a clear signal: The crossing of the faster MACD line with the slower signal line. This is a basic buy or sell signal and applies equally to divergence patterns.

    3. Exit the short position when the current momentum moves above the last momentum peak. A new momentum high, following a divergence signal, indicates that the divergence has disappeared and there is no basis for this trade. The exact price at which this occurs may be calculated one day in advance for most momentum indicators.

    4. Exit the short position when the market has corrected or an objective has been reached. Once the momentum has declined to the midpoint level of 50 for the RSI and stochastic, or zero for the simple momentum, it should be considered neutral and cannot be expected to continue on to negative values. A price objective can also be set using volatility or support levels.

    5. Exit the MACD short divergence when the MACD crosses the signal line moving higher. MACD provides a signal that may allow the divergence trade to be held longer, or exited quickly. In Figure 9.18 the MACD line gives at the beginning of May and does not give another buy signal to close out the trade, until mid-June. This adds considerable profit to the trade.

    6. Allow the short divergence position to convert to a short trend position. If the MACD is not used, then a simple trend, such as a moving average, can be substituted. A short divergence signal can be converted to a short trend signal using, for example, one of the trends that creates the MACD.

    Anticipating the Divergence

    Divergence signals are often recognized too late. When the second momentum peak is recognized, especially when the divergence is very severe, the momentum values are already near their neutral value, 50 or zero. Anticipating the divergence signal can be a more successful approach to trading.

    Bearish divergence can be anticipated at the point where prices move above their previous resistance level. This is shown in Figure 9.18 with the line market horizontal resistance. Once prices move higher there is always a potential divergence. If the current value of momentum is lower than the value of momentum at the previous price peak, an anticipated divergence sell signal exists. The short sale is now entered as prices are rising as long as the current momentum value is below the last peak momentum value. For Amazon.com, that means holding a short position while prices continue higher. The trade is exited if the momentum value continues higher and exceeds the previous peak momentum value. This method offers the best opportunity for profiting from the entire downward reversal, but at higher risk. A less risky alternative would be to divide trading
    capital into three parts, then

    • Sell the first third when prices make a new high and the MACD value is much lower.
    • Sell the second part when the MACD value moves to within 15–20% of the previous MACD high.
    • Sell the third part when the MACD value crosses the signal line heading down.

    If there is only one choice, it is better to take the second signal. If there are two choices, take the first and second. If you only take the third sell signal, when the MACD crossed the signal line, prices will have already dropped significantly and you will be disappointed with your entry price and the lack of profit opportunity.

    Exiting a Divergence Trade

    A bearish divergence is a special case of overbought prices. Prices have reached new highs but have slowed down and give every sign of wanting to reverse direction. As with other overbought situations, once prices have returned to a neutral position, the trade is over. For divergence, that happens when the value of the MACD reaches zero. It is possible to play for a small penetration of zero, because of market noise, but there is a tradeoff between adding a small amount of profit to each trade and missing a few additional profit targets. As mentioned earlier, divergence can be combined with a simple trend system so that, when prices approach the profit target moving lower, the trade can be continued by shifting to the trend system if the trend has turned down. In that way the trend entry timing can be improved for special situations where a divergence pattern has formed.

    The Divergence Disappears.

    Not all trades reach their profit targets. Once a short sale has been entered following one or more of the bearish divergence rules, that trade should be exited if the MACD, or momentum value, rises above the last momentum peak. For example, a bearish divergence followed after a momentum peak of 95 was followed by a second peak of 85. After entering a short position, momentum drops to 75, then prices rally. Momentum now moves above 85 and the divergence pattern has disappeared. Exit the trade. Prices are now rising faster than they were at the time you entered the short position and a renewal of the uptrend is indicated.

    Single, Double, and Triple Divergences

    In fewer cases, double and triple bearish divergences will occur. A double bearish divergence is one in which three momentum peaks are declining with prices rising at each corresponding momentum peak. Most often, the second momentum peak is only slightly lower than the first, and the last peak drops off noticeably, indicating that a drop in price is soon to follow. Multiple divergences are expected to be more reliable than single divergency, and represent a prolonged period in which prices are rising at a slower and slower rate, in the manner of a rounded top.

    Alternating Divergence Peaks

    A common bearish pattern is where a lower momentum peak falls between two declining peaks. For example, the first momentum peak is at 90, the next at 60 and the last at 75. When studying the price and momentum charts, most analysts will ignore the lower peak in the middle and consider only the 90-75 divergence. In the following section, this combination can be automated by looking at the most recent momentum peak, i, and the previous two momentum peaks, i - 1 and i - 2, along with their corresponding prices.

    Identifying Divergence Using a Computer Program

    The peaks or valleys of any momentum indicator can be compared to the corresponding peaks or valleys of the price series that was used to calculate the momentum values. In a programmed version of divergence, the stochastic indicator is used instead of either a simple momentum or the MACD. Price peaks and valleys are first identified using the swing technique explained in Chapter 5. Momentum values are then chosen corresponding to those price extremes. All other momentum values are ignored for the purpose of deciding on the entry signal. If the momentum peaks are declining and the price peaks are rising, there is a bearish divergence. If momentum peaks are rising and the price peaks are falling, there is a bullish divergence.

    In addition to the standard single divergence, the following program recognizes a double divergence, the combination of three rising price peaks and three declining momentum peaks.

    It is easier to find divergence by looking at a chart on a quote screen than to program it into a computer. Translating what you see into a systematic analysis of divergence signals is very difficult. You will find that this program does not always find the divergence that seems obvious to the eye. A divergence may be missed when there is a steady rise in prices that do not create swing highs, even though there is a corresponding steady decline in momentum. This situation is addressed using slope divergence.

    Code:
    { TSM Divergence:
    Single and double divergence using TSM SWING and TSM INDEX 
    Copyright 1994–2003, P J Kaufman. All rights reserved. }
     
    { INPUT for TSM SWING: }
    input:      diverge (1  ), //1=single divergence, 2=double divergence
                    swing   (2.0), //price swing in %
                    strength(5  ), //decline in current indicator high (or low) in percent, from last high
                    length  (5  ), //number of periods in stochastic
                    exit    (0  ), //value added or subtracted from 50 for exit criteria
                    fastx   (10 ); //close-out when slowK stochastic touches this value
                                  
    vars:       pcswing(0), lastd(0), curhigh(0), curlow(0), swhigh(0), swlow(0),
                    swhigh1(0), swlow1(0), highbar(0), highbar1(0), STslowk(0),
                    lowbar(0), lowbar1(0), chighbar(0), clowbar(0), exittype(0),
                    STtoday(0), SThigh(0), STlow(0), curSThigh(0), curSTlow(0),
                    xhigh(0), xlow(0), xclose(0),signal(0),
                    highclose(0), lowclose(0), chighprice(0), clowprice(0);
     
    pcswing = swing/100.;
    STslowk = SlowK(length);
    STtoday = SlowD(length);
    xclose  = close;
    xhigh   = high;
    xlow    = low;
     
    { SWINGS: INITIALIZE MOST RECENT HIGH AND LOW }
                    if currentbar = 1 then begin //Initialize curhigh and curlow 
                    curhigh = xhigh; {current high price}
                    curlow  = xlow; {current low price }
                    end;
                   
                    { SEARCH FOR A NEW HIGH }
                    if lastd <> 1 then begin
                                   if xhigh > curhigh then begin
                                   curhigh   = xhigh; {save values at new high}
                                   curSThigh = STtoday;
                                   chighbar  = currentbar;
                                   end;
     
                                   if xlow < curhigh - curhigh*pcswing then begin
                                   lastd = 1; {last high fixed}
                                  
                                   if exittype = -1 then exittype = 0;
                                                  
                                   swhigh1   = swhigh; {previous high}
                                   highbar1  = highbar;
                                   swhigh    = curhigh; {new verified high}
                                   highbar   = chighbar;
                                   curlow    = xlow; {initialize new lows}
                                   SThigh     = curSThigh;
                                   highclose = swhigh;
                                   clowbar   = currentbar;
                                   end;
                    end;
     
    { SEARCH FOR A NEW LOW }
                    if lastd <> -1 then begin
                                   if xlow < curlow then begin
                                   curlow   = xlow; {save values at new lows}
                                   curSTlow = STtoday;
                                   clowbar  = currentbar;
                                   end;
     
                                   if xhigh > curlow + curlow*pcswing then begin
                                   lastd = -1;
                                  
                                   if exittype = 1 then exittype = 0;
                                                                  
                                   swlow1   = swlow;
                                   lowbar1  = lowbar;
                                   swlow    = curlow;
                                   lowbar   = clowbar;
                                   curhigh  = xhigh; {initialize current high}
                                   STlow    = curSTlow;
                                   lowclose = swlow;
                                   chighbar = currentbar;
                                   end;
                    end;
     
    { DIVERGENCE LOGIC }
                    chighprice = curhigh;
                    clowprice  = curlow;
    { SINGLE DIVERGENCE }
                    if diverge = 1 then begin
    If {lastd = -1 and exittype <> -1 and} close > highclose and high = chighprice and
    STslowk > fastx and (STtoday[1] > 50 + exit or STtoday < STtoday[1]) and STtoday 
    < SThigh - strength then begin
    Sell Short ("Short") this bar close
                                   signal   = -1;
                                   exittype = 0;
                                   end;
     
                                   if {lastd = 1 and exittype <> 1 and} close < lowclose and low = clowprice and
                                   STslowk < 100-fastx and (STtoday[1] < 50-exit or STtoday > STtoday[1]) and STtoday > STlow + strength then begin
                                   Buy ("Long") this bar close;
                                   signal   = 1;
                                   exittype = 0;
                                   end;
                    end;
     
    { DOUBLE DIVERGENCE - MIN ON CURRENT STOCH ONLY }
                    if diverge = 2 then begin
                                   if lastd = -1 and xhigh = curhigh and STslowk > fastx and (STtoday[1] > 50 + exit or STtoday < STtoday[1]) then begin
                                                   if xclose > swhigh and swhigh > swhigh1 and STtoday < SThigh - strength {and SThigh < SlowD(length)[currentbar - highbar1]} then begin
                                                   Sell Short ("Short1") this bar close;
                                                   signal = -1;
                                                   exittype = 0;
                                                   end;
                                   end;
                   
                                   if lastd = 1 and xlow = curlow and STslowk < 100-fastx and (STtoday[1] < 50-exit or STtoday > STtoday[l]) then begin
                                                   if xclose < swlow and swlow < swlow1 and STtoday > STlow + strength {and STlow > SlowD(length)[currentbar - lowbar1]} then begin
                                                   Buy ("Long2") this bar close; 
                                                   end;
                                   end;
                    end;
     
    { Get out if divergence disappears or swing reverses }
                    if (STtoday > SThigh or STtoday=100) and signal=-1 then begin
                    buytocover this bar close;
                    signal = 0;
                    exittype = -1;
                    end;
     
                    if (STtoday < STlow or STtoday=0) and signal=1 then begin
                    sell this bar close;
                    signal = 0;
                    exittype = 1;
                    end;
     
    { Get out if Stochastic reverses after crossing thresholds }
                    if STslowk <= fastx or (STtoday[1] < 50+exit and STtoday > STtoday[1]) and signal=-1 then begin
                    buytocover this bar close;
                    exittype = -1;
                    signal = 0;
                    end;
     
                    if STslowk >= 100-fastx or (STtoday[1] > 50-exit and STtoday < STtoday[1]) and signal=1 then begin
                    sell this bar close;
                    signal = 0;
                    exittype = 1;
                    end;
    Slope Divergence

    One of the problems in using peak prices and peak momentum values is that some of the most obvious divergence situations are missed. Prices can move higher or lower steadily, without large swings, while momentum moves the other way. This will happen during a very orderly rounded top or rounded bottom formation. Without peaks that can be identified using a swing analysis, this pattern is missed.

    An alternative technique is to analyze the slope of both the price movement and the momentum indicator over the same time interval. This can be done using a spreadsheet function, slope, or the TradeStation function LinearRegSlope, over a specified time interval. Because momentum is a way of detrending the price series, the period used for the calculation should not be too long; otherwise the slope values of the momentum will tend towards zero.

    Divergence can be any combination of conflicting directions between the slope of price and the slope of momentum, including prices rising faster than momentum, momentum rising faster than prices, or the opposite. However, classic analysis has focused on momentum as a leading indicator of a change in the price trend, which limits the combinations to:

    • Prices rising and momentum falling (a bearish divergence).
    • Prices falling and momentum rising (a bullish divergence).

    The strength of a bearish divergence, which is helpful when selecting which situations are best for trading, can be determined primarily by the momentum slope, but can also be assessed as the net difference between the rising slope of prices and the falling slope of momentum. When comparing the two slopes, care must be taken because the angle of price movement can be far greater than the angle of momentum movement.

    Slope Divergence Using Double Smoothing

    Double smoothing, discussed earlier in this chapter, is a tool that represents the trend of momentum but may not show many momentum peaks; therefore, it becomes a good indicator for slope divergence. In Figure 9.19 there is a long upwards move in the Nasdaq 100 throughout 1999. The price swings are relatively small and may not be picked up using a swing value that worked during prior years. At the same time there is a steady decline in momentum, represented by a double smoothing of 20-20-20 (a 20-day momentum, smoothed twice using 20-day exponentials). Lines are drawn through both prices and momentum to show the slope of the corresponding movement.

    One way to produce a trading signal for the two slope calculations is to monitor their relative movement. While they remain constant or are moving apart, no action is taken. Once the slope values begin to converge beyond a threshold value representing normal variance, a short sale signal is produced. After that, normal price targets apply. If the price slope continues to decline the trade should be held. If the momentum slope rises above its value at the time of the short sale signal, the trade should be exited, or if the slopes begin to diverge significantly, the trade should also be exited.

  7. #17
    Member
    Join Date
    Jul 2013
    Location
    A, A
    Posts
    57
    I believe MLaden's normalized SSA end-pointed version could be valid candidate for a divergence indi (with the current settings).
    What do you think?
    Attached Thumbnails Attached Thumbnails Divergence indicator(s)-usdjpyh1.jpg  
    Attached Files Attached Files

  8. #18
    Administrator newdigital's Avatar
    Join Date
    Feb 2013
    Posts
    10,473
    Blog Entries
    2909
    Follow newdigital On Twitter Add newdigital on Facebook Add newdigital on Google+ Add newdigital on MySpace
    Add newdigital on Linkedin
    I do not know ... I think - it is recalculated (as any SSA). Mladen made a lot of indicators but most of them are recalculated or repainted so it is difficult to use them ... at least - he did not tell it anywhere about how how to use them sorry.

  9. #19
    Member
    Join Date
    Jul 2013
    Location
    A, A
    Posts
    57
    Quote Originally Posted by newdigital View Post
    I do not know ... I think - it is recalculated (as any SSA). Mladen made a lot of indicators but most of them are recalculated or repainted so it is difficult to use them ... at least - he did not tell it anywhere about how how to use them sorry.
    No, this is the real thing (end pointed) - nrp.
    Last edited by CamaRon; 07-29-2013 at 08:53 PM.

  10. #20
    Junior Member
    Join Date
    May 2013
    Posts
    25
    Divergence indicators prone to noise-more false signalsThe smoother they are the better.That is my experience.

Page 2 of 8 FirstFirst 1 2 3 4 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •