MACD >= than the MACD Signal line
- This topic has 1 reply, 2 voices, and was last updated 8 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
Similar topics:
Forums › ProRealTime English forum › ProScreener support › MACD >= than the MACD Signal line
A request that was addressed to ProRealTime:
Can you write me two screeners please?
1. A screener for where MACD equals or is greater than the MACD Signal line to show the possibility of a change of direction. I’d like to be able to have user defined values for the normally default values of 12,26,9 if possible. The screener should also report RSI so that I can sort the result by RSI. (I’d like to use the Screener in all the longer timescales).
2. A Screener for where two MACD Signal lines are compared to get an earlier indication of the possibility of a change of direction. Again I’d like to be able to have user definable values for the normally default values of 12,26,9 if possible. What I’m thinking is:
MACD1 = MACD[12,26,9]
MACD2 = MACD[12,26,6] for exampleThe Screener would report where the value for the Signal value for MACD2 > MACD1 Signal value (i.e the ‘6’ value of MACD2 is greater than the ‘9’ value of MACD1). Again, RSI is included in the Screener so that the results can be sorted by RSI.
In both the examples above, I’d like to play with the code so that I can use it to screen for stocks going the other way (It’s how I can learn the code)
I’ve tried to do this but failed miserably and got very cheesed off with myself!
Suggestion for an anwser:
First code:
12345678 p=12q=26r=9condition=MACD[p,q,r](close)>=0criteria=RSI[14](close)screener[condition](criteria as "value of rsi")
Second code:
12345678910111213 p=12q=26r=9r1=6LineMACD=MACDLINE[p,q,r](close)signal=exponentialaverage[r](LineMACD)signal1=exponentialaverage[r1](LineMACD)condition=signal1>signalcriteria=RSI[14](close)screener[condition](criteria as "value of rsi")
Thank you for this. I’d like to ask if you could do one more iteration on the following code please?
Question: For the following code, could you add a results column before the RSI column that counts the number of periods that the condition has been met? I am using Proreatime on IG. Thank you
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
p<span class="token operator">=</span><span class="token number">12</span> q<span class="token operator">=</span><span class="token number">26</span> r<span class="token operator">=</span><span class="token number">9</span> r1<span class="token operator">=</span><span class="token number">6</span> LineMACD<span class="token operator">=</span>MACDLINE<span class="token punctuation">[</span>p<span class="token punctuation">,</span>q<span class="token punctuation">,</span>r<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token keyword">close</span><span class="token punctuation">)</span> signal<span class="token operator">=</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>r<span class="token punctuation">]</span><span class="token punctuation">(</span>LineMACD<span class="token punctuation">)</span> signal1<span class="token operator">=</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>r1<span class="token punctuation">]</span><span class="token punctuation">(</span>LineMACD<span class="token punctuation">)</span> condition<span class="token operator">=</span>signal1<span class="token operator">></span>signal criteria<span class="token operator">=</span><span class="token indicators">RSI</span><span class="token punctuation">[</span><span class="token number">14</span><span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token keyword">close</span><span class="token punctuation">)</span> <span class="token keyword">screener</span><span class="token punctuation">[</span>condition<span class="token punctuation">]</span><span class="token punctuation">(</span>criteria <span class="token keyword">as</span> <span class="token string">"value of rsi"</span><span class="token punctuation">) </span> |
Find exclusive trading pro-tools on