This screener returns the information of the last signals generated by the crossings of MACD, the result is displayed in the window of ProScreener according to 4 different scenarios, in order to alert you on the state of the current trend…
//RB@72 @
//SCREENER
A=12
B=26
C=9
REM MACD
rb=exponentialaverage[A](close) - exponentialaverage[B](close)
REM Signal
rb1=exponentialaverage[C](rb)
//POSITIVO
IF rb>0 AND rb crosses over 0 THEN
SENAL=1
ENDIF
IF rb>0 AND rb crosses under rb1 THEN
SENAL=-2
ENDIF
IF rb<=0 AND rb crosses under 0 THEN
SENAL=-3
ENDIF
IF rb<0 AND rb crosses over rb1 THEN
SENAL=-4
ENDIF
TIMING = SENAL
SCREENER (TIMING AS "Timing")