screener for MACD histogram momentun change
Forums › ProRealTime English forum › ProScreener support › screener for MACD histogram momentun change
- This topic has 6 replies, 4 voices, and was last updated 4 years ago by Vonasi.
-
-
01/13/2020 at 5:35 PM #116670
Hi, I would like to make a screener to show a when a certain MACD histogram appears first time above ( for a buy) or below (for sell ) the zero line and to scan and display this potential setup on multiple time frames all in one scan like 15m, 30 min, 60min, 4 hr, D, W.
Is this easy to do?
I will attach a chart for clearer explanation
Thanks
01/14/2020 at 8:34 AM #11672501/14/2020 at 3:50 PM #11678601/15/2020 at 7:00 PM #11691601/19/2020 at 12:26 AM #11718401/19/2020 at 9:51 AM #1171911234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374Timeframe(Weekly)AboveW = Macd[12,26,9](close) CROSSES OVER 0UnderW = Macd[12,26,9](close) CROSSES UNDER 0//Timeframe(Daily)AboveD = Macd[12,26,9](close) CROSSES OVER 0UnderD = Macd[12,26,9](close) CROSSES UNDER 0//Timeframe(4 hour)Above4 = Macd[12,26,9](close) CROSSES OVER 0Under4 = Macd[12,26,9](close) CROSSES UNDER 0//Timeframe(1 hour)Above1 = Macd[12,26,9](close) CROSSES OVER 0Under1 = Macd[12,26,9](close) CROSSES UNDER 0//Timeframe(30 minutes)Above30 = Macd[12,26,9](close) CROSSES OVER 0Under30 = Macd[12,26,9](close) CROSSES UNDER 0//Timeframe(15 minutes)Above15 = Macd[12,26,9](close) CROSSES OVER 0Under15 = Macd[12,26,9](close) CROSSES UNDER 0//Timeframe(default)CondW = 9000000If AboveW ThenCondW = 1000000Elsif UnderW ThenCondW = 2000000EndifCondD = 900000If AboveD ThenCondD = 100000Elsif UnderD ThenCondD = 200000EndifCond4 = 90000If Above4 ThenCond4 = 10000Elsif Under4 ThenCond4 = 20000EndifCond1 = 9000If Above1 ThenCond1 = 1000Elsif Under1 ThenCond1 = 2000EndifCond30 = 900If Above30 ThenCond30 = 100Elsif Under30 ThenCond30 = 200EndifCond15 = 90If Above15 ThenCond15 = 10Elsif Under15 ThenCond15 = 20EndifAboveALL = AboveW + AboveD + Above4 + Above1 + Above30 + Above15UnderALL = UnderW + UnderD + Under4 + Under1 + Under30 + Under15CondALL = 9If AboveALL = 111111 ThenCondALL = 1Elsif UnderALL = 222222 ThenCondALL = 2EndifResult = CondW + CondD + Cond4 + Cond1 + Cond30 + Cond15 + CondALLIf Result = 9999999 ThenResult = 0EndifScreener[Result](Result AS “WD4135A”)This will return 1 when MACD crosses over 0, 2 when it crosses under 0, for any of the following TF’s:
W=weekly
D=daily
4=4 hour
1=1 hour
3=30 minutes
15=15 minutes
A=all TF’s at the same time, same direction
I could not test it.
01/19/2020 at 10:07 AM #117192Very similar to what I came up with!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475result = 0timeframe(weekly)a = MACD[12,26,9](close)c1 = a > 0 and a[1] < 0c2 = a < 0 and a[1] > 0if c1 thenresult = result + 100000endifif c2 thenresult = result + 200000endiftimeframe(daily)a = MACD[12,26,9](close)c1 = a > 0 and a[1] < 0c2 = a < 0 and a[1] > 0if c1 thenresult = result + 10000endifif c2 thenresult = result + 20000endiftimeframe(4 hour)a = MACD[12,26,9](close)c1 = a > 0 and a[1] < 0c2 = a < 0 and a[1] > 0if c1 thenresult = result + 1000endifif c2 thenresult = result + 2000endiftimeframe(1 hour)a = MACD[12,26,9](close)c1 = a > 0 and a[1] < 0c2 = a < 0 and a[1] > 0if c1 thenresult = result + 100endifif c2 thenresult = result + 200endiftimeframe(30 minute)a = MACD[12,26,9](close)c1 = a > 0 and a[1] < 0c2 = a < 0 and a[1] > 0if c1 thenresult = result + 10endifif c2 thenresult = result + 20endiftimeframe(15 minute)a = MACD[12,26,9](close)c1 = a > 0 and a[1] < 0c2 = a < 0 and a[1] > 0if c1 thenresult = result + 1endifif c2 thenresult = result + 2endifSCREENER[result](result as "Result")Mine returns a 1 in any position for a cross under and a 2 for a cross over. From weekly down to 15 minute for all your chosen time frames. So 10000 = a weekly cross under and 00020 a 30 minute cross over. 22222 is a crossover in all time frames.
-
AuthorPosts
Find exclusive trading pro-tools on