StockFetcher Forums · General Discussion · How to create MACD - Divergence (Bullish or Bearish)<< >>Post Follow-up
mdaprasad
6 posts
msg #101771
Ignore mdaprasad
7/22/2011 12:05:21 PM

I am trying to generate what is explained in http://www.babypips.com/school/regular-divergence.html. If any one already have a script please let me know.

four
5,087 posts
msg #101787
Ignore four
modified
7/23/2011 1:00:59 PM

perhaps ... use slope

Fetcher[
10 day slope of macd(2,3,1) > 0.010
10 day slope of high < 0.010
macd(2,3,1) < -0.05
5 day slope of macd(2,3,1) > 0.010
5 day slope of high < 0.010
close > 10
volume > 6000

]



TheRumpledOne
6,411 posts
msg #101819
Ignore TheRumpledOne
modified
7/26/2011 1:56:03 PM

I think I posted some RSI divergence filters years ago.

TheRumpledOne
6,001 posts
msg #100140
- Edit message
modified 4/6/2011 2:11:54 AM

Fetcher[

/* TRO Positive Divergence 2 - 5 days*/

set{nd2,count(close below close 2 days ago,1) * count(rsi(2) above rsi(2) 2 days ago,1)}}

set{nd3,count(close below close 3 days ago,1) * count(rsi(2) above rsi(2) 3 days ago,1)}

set{nd4,count(close below close 4 days ago,1) * count(rsi(2) above rsi(2) 4 days ago,1)}

set{nd5,count(close below close 5 days ago,1) * count(rsi(2) above rsi(2) 5 days ago,1) }

Set{n1, nd5 * 1}
Set{n2, nd4 * 10}
Set{n3, nd3 * 100}
Set{n4, nd2 * 1000}

Set{na, n1 + n2}
Set{nb, n3 + n4}
Set{PD2345, na + nb}

/* POSDIV is the number of times there was a 2, 3, 4 or 5 day positive divergence during the past 10 days */

set{POSDIV, count(PD2345 above 0, 10)}

/* PDDAYS is the number of days since there hasn't been a 2, 3, 4 or 5 day positive divergence */

set{PDDAYS, days(PD2345 EQUAL 0, 100)}


set{rsidays,days(RSI(2) below 1, 15)}


set{T10, count(10 day slope of the close above 0,1)}
set{T60, count(60 day slope of the close above 0,1)}
set{T200, count(200 day slope of the close above 0,1)}

Set{u1, T200 * 1}
Set{u2, T60 * 10}
Set{u3, T10 * 100}

Set{uu, u1 + u2}
Set{TREND, uu + u3}


add column PD2345
add column posdiv
add column pddays



add column separator
add column trend

add column rsidays
add column rsi(2) 200 day low
add column separator
add column CMA(Day Point Range, 30)
add column separator


close above 1
avgvol(90) above 1000000

rsi(2) below rsi(2) 1 day ago

PD2345 above 0

sort column 5 descending

]



mdaprasad
6 posts
msg #101840
Ignore mdaprasad
7/27/2011 10:16:27 AM

Thanks guys...I will look into this.

My main goal is to combine Acceleration bands and MACD divergences both are leading indicators.

Thanks
Prasad

Eman93
4,750 posts
msg #101903
Ignore Eman93
8/1/2011 7:17:29 AM

dont want to burst you bubble but no such thing as a leading indicator. they all follow price and volume of some type. they do let you sort stocks into candidates for trading, overbought - oversold. ... ect

The Williams(2) will sometimes turn up before you get an up day. but you will see a longer tail on that candle.

GLT.....

Eman93
4,750 posts
msg #101913
Ignore Eman93
8/1/2011 3:26:17 PM

I would say a MACD divergence is indicating a slow down in the momentum in that direction bear or bull. but not allways a trend change.

the hard thing about coding this i you cant really store a price point and compare it to yesterdays price. You can trick it a bit but still not right.

You want to store the low of the day when the MACD histo made its 30 week low. for example then you want low today to be less than that price but the MACD histo to be higher ... for bull divergence. not possible here. wont store the low of that day.




StockFetcher Forums · General Discussion · How to create MACD - Divergence (Bullish or Bearish)<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.