MACD screener to code
- This topic has 5 replies, 2 voices, and was last updated 7 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Similar topics:
Forums › ProRealTime English forum › ProScreener support › MACD screener to code
Here is the code you are requested, the MACD was at least 6 bars above 0 and the Close of the current candlestick is breaking the highest high of the last 10 bars:
1 2 3 4 |
m = summation[6](macd[12,26,9]>0)=6 b = close crosses over highest[10](high)[1] screener [m and b] |
Not tested, please tell us if it’s working ok for you.
Hi Nicolas, sorry for the delay.. Thanks very much for your answer… and for your time!!
I tried your code and work verygood!!
But my mistake, I actually wanted to ask that the condition “b” is verified within 6 bar since when macd[12,26,9] crosses over 0. (Not only >0)
This code with the condition macd[12,26,9]>0
finds a many shares.
I tried to write a code, but not work good… could you help me? Thank very much!!
1 2 3 4 5 6 7 8 9 10 |
a = macd[12,26,9] c1= a crosses over 0 if c1 then m = summation[6](a>0)=6 b = close crosses over highest[10](high)[1] endif screener [m and b] |
Dear Nicolas, so work very good!! It’s just that I needed!!
I wrote a screener (long or Short)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
once direction =0 a = macd[12,26,9] c1= a crosses over 0 c2 = a crosses under 0 m = summation[6](c1)>0 n = summation[6](c2)>0 b1 = close crosses over highest[10](high)[1] b2 = close crosses under Lowest[10](low)[1] if m and b1 then direction=1 endif if n and b2 then direction=-1 endif screener [(m and b1) or (n and b2)](direction) |
Could I make a new library screener?
Find exclusive trading pro-tools on