How to calculate positive and negative divergences

Optuma Forums Optuma Scripting How to calculate positive and negative divergences

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by Darren Darren 2 months, 4 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #45539
    Darren
    Darren
    • Topics: 42
    • Replies: 288
    • Posts: 330

    Divergences between the trend of prices and an indicator are often used as a signal for a change in price trend:

    Positive (Bullish) Divergence: prices are falling but the indicator is rising

    Negative (Bearish) Divergence: prices are rising but the indicator is falling

    This example compares RSI values at their highs with the closing price of the stock at the time of those highs. If the RSI high is lower than the previous high but the price is higher between those points then it gives a signal for negative divergence.

    This example uses a 10 bar pivot for the RSI(14) ie there are at least 10 lower days either side (this can be increased – the higher the number the more important the peak).

    For positive divergence:

    As in this example, use the above in two separate Show View tools and drag one over the other to display the signals:

    Capture

    At point B the RSI peak is lower than A, but the share price is higher (negative divergence), whereas at point D the RSI low is higher than at C but the share price is lower (positive divergence).

     

     

    #46779
    Avatar
    Luke
    • Topics: 3
    • Replies: 3
    • Posts: 6

    Hi Darren, what show bar scripts are you using on the RSI indicator to create the arrows?

    #46815
    Avatar
    Luke
    • Topics: 3
    • Replies: 3
    • Posts: 6

    Also why does this script not return any results for a daily scan of last bar but shows results one day after? Thanks

    #46819
    Darren
    Darren
    • Topics: 42
    • Replies: 288
    • Posts: 330

    Hi Luke,

    The scripts used are in the initial post.

    Because the scripts use pivot levels we have to wait until the pivot is confirmed so there will always be a delay. Do you have an example?

    #54077
    Darren
    Darren
    • Topics: 42
    • Replies: 288
    • Posts: 330

    On-balance Volume divergences

    Here are the results of the S&P500 companies over the last 5 years, 1 month after each of the 230 signals:

    DivOBV

    See here for articles on identifying and testing divergences:

    Identifying Divergences

    Testing Divergences

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close