DEA:EMA(DIFF,9);
MACD:= 2 *(DIFF-DEA);
Adhesive tape (MACD & gt;; =0,MACD,0,4, 1),COLORF00FF0
Adhesive tape (MACD <: 0,MACD,0,4, 1),COLORWHITE
Adhesive tape (MACD <: REF(MACD, 1) and MACD >; 0,0,MACD,4,0),COLOR00AAFF
Adhesive tape (MACD <: REF(MACD, 1) and MACD >; 0,0,MACD,3.3,0),COLOR00BBFF
Adhesive tape (MACD <: REF(MACD, 1) and MACD >; 0,0,MACD,2.2,0),COLOR00CCFF
Adhesive tape (MACD <: REF(MACD, 1) and MACD >; 0,0,MACD, 1.65,0),COLOR00DDFF
Adhesive tape (MACD <: REF(MACD, 1) and MACD >; 0,0,MACD, 1. 1,0),COLOR00EEFF
Adhesive tape (MACD <: REF(MACD, 1) and MACD >; 0,0,MACD,0.55,0),COLOR00FFFF
Adhesive tape (MACD & gt;; =REF(MACD, 1) and MACD >; 0,0,MACD,4,0),COLOR0000AA
Adhesive tape (MACD & gt;; =REF(MACD, 1) and MACD >; 0,0,MACD,3.3,0),color 00 1 1BB;
Adhesive tape (MACD & gt;; =REF(MACD, 1) and MACD >; 0,0,MACD,2.2,0),COLOR0022CC
Adhesive tape (MACD & gt;; =REF(MACD, 1) and MACD >; 0,0,MACD, 1.65,0),COLOR0033DD
Adhesive tape (MACD & gt;; =REF(MACD, 1) and MACD >; 0,0,MACD, 1. 1,0),COLOR0044EE
Adhesive tape (MACD & gt;; =REF(MACD, 1) and MACD >; 0,0,MACD,0.55,0),COLOR0055FF
Adhesive tape (MACD & gt;; REF(MACD, 1) and MACD <; 0,0,MACD,4,0),COLORAA00BB
Adhesive tape (MACD & gt;; REF(MACD, 1) and MACD <; 0,0,MACD,3.3,0),colorbb 1 1BB;
Adhesive tape (MACD & gt;; REF(MACD, 1) and MACD <; 0,0,MACD,2.2,0),COLORCC22BB
Adhesive tape (MACD & gt;; REF(MACD, 1) and MACD <; 0,0,MACD, 1.65,0),COLORDD33BB
Adhesive tape (MACD & gt;; REF(MACD, 1) and MACD <; 0,0,MACD, 1. 1,0),COLOREE44BB
Adhesive tape (MACD & gt;; REF(MACD, 1) and MACD <; 0,0,MACD,0.55,0),COLORFF55BB
Adhesive tape (MACD <: =REF(MACD, 1) and MACD <; 0,0,MACD,4,0),COLORFFAA00
Adhesive tape (MACD <: =REF(MACD, 1) and MACD <; 0,0,MACD,3.3,0),color ffbb 1 1;
Adhesive tape (MACD <: =REF(MACD, 1) and MACD <; 0,0,MACD,2.2,0),COLORFFCC22
Adhesive tape (MACD <: =REF(MACD, 1) and MACD <; 0,0,MACD, 1.65,0),COLORFFDD33
Adhesive tape (MACD <: =REF(MACD, 1) and MACD <; 0,0,MACD, 1. 1,0),COLORFFEE44
Adhesive tape (MACD <: =REF(MACD, 1) and MACD <; 0,0,MACD,0.55,0),COLORFFFF55
IF(DIFF & lt; 0,DIFF,0),COLORRED,line thick 1;
IF(DIFF & lt; 0,0,DIFF),COLORYELLOW,line thick 1;
IF(DIFF & lt; DEA,DIFF,DEA),COLOR00FF00,line thick 1;
IF(DIFF & gt; DEA,DEA,DEA),COLORWHITE,line thick 1;
● Golden fork: = cross (diff, DEA) and diff.
STICKLINE (0,0-0.18,6,0), COLORYELLOW
DRAWTEXT (low gold fork, -0. 1,' low gold fork'), COLORYELLOW
JCCOUNT:=COUNT(CROSS(DIFF,DEA),bars last(DEA & gt; =0));
Quadratic golden fork: = cross (diff, DEA) and DEA < 0 AND COUNT(JCCOUNT=2 = 2,21) =1;
STICKLINE (quadratic golden fork, 0, -0. 18, 6, 0), COLORFF00FF.
DRAWICON (secondary gold fork, DEA* 1.04,13);
DRAWTEXT (secondary golden fork, -0. 1,' secondary golden fork'), COLORFF00FF.
a 1:= bars last(REF(CROSS(DIFF,DEA), 1));
Bottom deviation: REF(CLOSE, A 1+ 1) > close and distinguish & gtREF(DIFF, A 1+ 1) and CROSS(DIFF, DEA);
STICKLINE (base deviation, 0,0.13,6,0), COLOR00FF00.
DRAWLINE(A 1=0, DEA, bottom deviation, DEA, 0), color, line thickness 2;
DRAWTEXT (bottom deviation, 0. 1,' bottom deviation'), COLOR00FF00.
A2:=BARSLAST(REF(CROSS(DEA,DIFF), 1));
Top deviation: ref (close, a2+ 1)
DRAWLINE(A2=0, DEA, top difference, DEA, 0), COLORGREEN, LINETHICK5.