+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

LIinkon Rsi Divergence Candle

LIinkon RSI Divergence Candle AFL likely identifies divergence patterns in RSI (Relative Strength Index) in conjunction with candlestick patterns. Leveraging AmiBroker data feed, it aids traders in spotting potential trend reversals or continuations based on RSI divergence and candlestick formations.

/// ********************************************
// INDICATOR	:DIVERGENCE
// DATE		:07-30-04
// PROGRAMMER	:M.Lauronen
// COPYRIGHTS	:Public Domain
// ********************************************

// --------------------------------------------
// Recommended AmiBroker indicator settings:
//		Level 0
//		Percent
//		Middle
//		Scaling: Custom 0 - 100
// --------------------------------------------

// Adjust the following parameters to suit your needs
period	= 5;
numChg = 0.001;

// --------------------------------------------
// Divergence for LONG
// --------------------------------------------

trendMom	= RSI(period);
trendZig	= Zig(L, numChg);

f	= trendZig > Ref(trendZig, -1) AND Ref(trendZig, -1) < Ref(trendZig, -2);

p1	= ValueWhen(f, Ref(trendZig, -1), 1);
p2	= ValueWhen(f, Ref(trendZig, -1), 2);
r1	= ValueWhen(f, Ref(trendMom,-1), 1);
r2 	= ValueWhen(f, Ref(trendMom,-1), 2);

f	= r1 > r2 AND p1 < p2;

sig	= f AND NOT Ref(f, -1) AND trendMom > Ref(trendMom, -1); 

_N(str = "(" + period + ")");
Plot(trendMom, "RSI" + str, colorWhite);
Plot(sig * 100, "Sig", colorGreen, styleHistogram + styleThick +
styleNoLabel);

// --------------------------------------------
// Divergence for SHORT
// --------------------------------------------

trendZig2	= Zig(H, numChg);

f	= trendZig2 < Ref(trendZig2, -1) AND Ref(trendZig2, -1) > Ref(trendZig2,
-2);

p1	= ValueWhen(f, Ref(trendZig2, -1), 1);
p2	= ValueWhen(f, Ref(trendZig2, -1), 2);
r1	= ValueWhen(f, Ref(trendMom,-1), 1);
r2 	= ValueWhen(f, Ref(trendMom,-1), 2);

f	= r1 < r2 AND p1 > p2;

sig	= f AND NOT Ref(f, -1) AND trendMom < Ref(trendMom, -1); 

_N(str = "(" + period + ")");
Plot(sig * 100, "Sig", colorRed, styleHistogram + styleThick + styleNoLabel);

Open chat
1
Hi, how can I help you?