This ProBuilder code snippet is designed to detect when two specific moving averages, the Kijun Sen and a 20-period simple moving average (MA20), are within a specified percentage proximity of each other. Additionally, it checks if the last two closing prices are above both these moving averages.
prox = 3 //proximité en pourcentage
// -------------
ikijun=KijunSen[9,26,52]
mm20=average[20]
ratio = mm20/ikijun
percent = abs(1-ratio)*100
test = percent<=prox
below = summation[2](close>ikijun and close>mm20)=2
screener[test and below](percent as "% prox")
Explanation of the Code:
This snippet is useful for traders or analysts who want to monitor the convergence or divergence of these two key indicators, potentially signaling changes in market trends.
Check out this related content for more information:
https://www.prorealcode.com/topic/signal-kijun-et-ma202/#post-163559
Visit Link