+91-0000000000

}

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

Guppy Chart

The Guppy Chart in Amibroker AFL showcases multiple exponential moving averages (EMAs) to depict market trends and potential reversals. Using Amibroker data feed, this AFL calculates EMAs of varying periods, providing a visual representation of trend strength and direction. Traders analyze the interplay of these EMAs, seeking crossover points that indicate potential entry or exit signals. Through careful observation and interpretation, traders leverage the Guppy Chart to make informed trading decisions.

/_SECTION_BEGIN("Price");
Col_1 = IIf(MACD(9,34) > Ref(MACD(9,34),-1),colorGreen,colorRed);

 

Plot( C, "", col_1, styleCandle+styleThick ); 
_SECTION_END();

_SECTION_BEGIN("guppy");
e3 = EMA(Close,3);
e5 = EMA(Close,5);
e8 = EMA(Close,8);
e10 = EMA(Close,10);
e12 = EMA(Close,12); 
e15 = EMA(Close,15);

e30 = EMA(Close,30);
e35 = EMA(Close,35);
e40 = EMA(Close,40);
e45 = EMA(Close,45);
e50 = EMA(Close,50);
e55 = EMA(Close,55);
e60 = EMA(Close,60);
Buy_guppy = e3>e60;
Sell_guppy = e60 > e3;
Buy_guppy = ExRem (Buy_guppy,Sell_guppy);
Sell_guppy = ExRem(Sell_guppy,Buy_guppy);
PlotShapes(Buy_guppy*shapeHollowSmallUpTriangle, colorYellow);
PlotShapes(Sell_guppy*shapeHollowSmallDownTriangle,colorYellow);

Plot (e3,"",IIf(C > e3,colorAqua,colorBlue),styleThick);
Plot (e5,"",IIf(C > e5,colorAqua,colorBlue),styleThick);
Plot (e8,"",IIf(C > e8,colorAqua,colorBlue),styleThick);
Plot (e10,"",IIf(C > e10,colorAqua,colorBlue),styleThick);
//Plot (e12,"",colorBlue,styleNoLabel);
//Plot (e15,"",colorBlue,styleNoLabel);

Plot (e30,"",colorYellow,styleThick);
Plot (e35,"",colorRed,styleNoLabel+styleThick);
Plot (e40,"",colorRed,styleNoLabel+styleThick);
Plot (e45,"",colorRed,styleNoLabel+styleThick);
Plot (e50,"",colorRed,styleNoLabel+styleThick);
Plot (e55,"",colorRed,styleNoLabel+styleThick);
Plot (e60,"",colorRed,styleNoLabel+styleThick);

_SECTION_END();

_SECTION_BEGIN("rsi de ema");

Buy_rsi = EMA(RSI(21),3)> EMA(RSI(21),34);
Sell_rsi= EMA(RSI(21),34) >EMA(RSI(21),3); 

Buy = Buy_rsi  AND Buy_guppy; //AND Buy_stochk;
Sell = sell_rsi AND sell_guppy; //AND SELL_stochk;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
//PlotShapes(Buy*shapeSmallUpTriangle,colorRed);
//PlotShapes(Sell*shapeSmallDownTriangle,colorRed);



_SECTION_END();

_SECTION_BEGIN("Tops and bottom");

pd = Param("Periods",13,5,144,1); 
pds = 2*pd-1;//     (Adjustment for Wilders MA) 
aa = Close-Ref(Close,-1); 
uu = EMA(Max(0,aa),pds); 
dd=  EMA((Max(0,0-aa)),pds); 

rf = IIf(C>2,1000,10000); 

c1 = Param("Upper Level",70,50,90,1); 
qq1 =100/(100-c1)-1; 
ff1 = qq1*dd-uu; 
ff2 = ff1/qq1; 
f1 = Max(ff1,ff2); 
UL = Close + f1*(pds-1)/2; 
UL = IIf(UL>C,floor(UL*rf),ceil(UL*rf))/rf; 

c2 = Param("Equilibrium",50,50,50,0);  
qq2 =100/(100-c2)-1;// [=1] 
ff = dd-uu; 
MM = Close + ff*(pds-1)/2; 
MM = IIf(MM>C,floor(MM*rf),ceil(MM*rf))/rf; 

c3 = Param("Lower Level",30,10,50,1); 
qq3 =100/(100-c3)-1; 
ff1 = qq3*dd-uu; 
ff2 = ff1/qq3; 
f3 = Min(ff1,ff2); 
LL = Close + f3*(pds-1)/2; 
LL = IIf(LL>C,floor(LL*rf),ceil(LL*rf))/rf; 

band = Param("band width",4,0,15,0.25);
mmu = MM+band;
mmd = MM-band;


X=Cross( C,LL);
Y=Cross(UL,C);

Buy1= X ;
Sell1= Y ;

PlotShapes(shapeCircle*Buy1,colorRed,0,L,-15);
PlotShapes(shapeCircle*Sell1,colorGreen,0,H,-15);

/*
dist = 1.5*ATR(10); 

for( i = 0; i < BarCount; i++ ) 
{ 

if( Buy_guppy[i] ) PlotText( "Buy @ \n"+C[i] , i, L[ i ]-dist[i], colorBlack,colorGreen ); 
if( Sell_guppy[i] ) PlotText( "Sell@ \n"+C[i], i, H[ i ]+dist[i], colorBlack, colorRed ); 
//if( Buy[i] ) PlotText( "B" , i, L[ i ]-dist[i], colorBlack,colorGreen ); 
//if( Sell[i] ) PlotText( "S" , i, H[ i ]+dist[i], colorBlack, colorRed ); 
if( Sell1[i] ) PlotText( "Top" , i, H[ i ]+dist[i], colorGreen, colorBlack ); 
if( Buy1[i] ) PlotText( "Bottom", i, L[ i ]-dist[i], colorRed, colorBlack ); 
 

} 
*/ 
//PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorYellow, colorYellow ) );
//PlotShapes( Buy * shapeSmallUpTriangle + Sell * shapeSmallDownTriangle, IIf( Buy, colorGreen, colorRed ) );

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);

_SECTION_END();
SellPrice=ValueWhen(Sell_guppy,C,1);
BuyPrice=ValueWhen(Buy_guppy,C,1);
Long=Flip(Buy_guppy,Sell_guppy);
Shrt=Flip(Sell_guppy,Buy_guppy );

_SECTION_BEGIN("Pivot calc");

TimeFrameSet( in15Minute*2 ); 
DH=Ref(H,-1); 
DL=Ref(L,-1);
DC=Ref(C,-1);


pd = ( DH+ DL + DC )/3;
sd1 = (2*pd)-DH;
sd2 = pd -(DH - DL);
sd3 = Sd1 - (DH-DL); 
rd1 = (2*pd)-DL;
rd2 = pd +(DH -DL);
rd3 = rd1 +(DH-DL);

TimeFrameRestore();

_SECTION_END();


Title = 
EncodeColor(colorWhite)+ "Linkon's Silver" + " - " +  Name() + " - " + EncodeColor(colorRed)+ Interval(2) 
+ EncodeColor(colorWhite) +  "  - " + Date() +" - "
+"\n" 

+EncodeColor(colorYellow) +"Op-"+O+"  "+"Hi-"+H+"  "+"Lo-"+L+"  "+ "Cl-"+C+"  "+ "Vol= "+ WriteVal(V)
//+ WriteIf ((e3>e45) ,EncodeColor(colorLime)+ "      Direction : LONG",EncodeColor(colorRed)+"      Direction : SHORT")
+"\n" 
//+ WriteIf (Sell_guppy , " EXIT LONG / Reverse Signal at "+C+"\n","")
//+ WriteIf (Buy_guppy , " EXIT SHORT / Reverse Signal at "+C+"\n","")

//+WriteIf(Sell_guppy , "Total Profit / Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
//WriteIf(Buy_guppy  , "Total Profit / Loss for the Last trade Rs."+(SellPrice-C)+"","")+
//WriteIf(Long AND NOT Buy_guppy,EncodeColor(colorLime)+  "Trade : Long - Entry price Rs."+(BuyPrice)+" Tgt : "+UL,"")+
//WriteIf(shrt AND NOT Sell_guppy,EncodeColor(colorRed)+ "Trade : Short - Entry price Rs."+(SellPrice)+" Tgt : "+LL,"")+"\n"+ 
//WriteIf(Long AND NOT Buy_guppy, "Current Profit / Loss Rs."+(C-BuyPrice)+"","")+
//WriteIf(shrt AND NOT Sell_guppy, "Current Profit / Loss Rs."+(SellPrice-C)+"","")
+ EncodeColor(colorGreen)+   "\n R3 : "+ EncodeColor(colorWhite)+RD3
+ EncodeColor(colorGreen)+   "\n R2 : "+ EncodeColor(colorWhite)+RD2
+ EncodeColor(colorGreen)+   "\n R1 : "+ EncodeColor(colorWhite)+RD1 + EncodeColor(colorGreen)+  "     UP TGT   : "+ EncodeColor(colorWhite)+UL
+ EncodeColor(colorBlue)+   "\n Pivot : "+ EncodeColor(colorWhite)+pd+ EncodeColor(colorBlue)+   "     MIDPOINT : "+ EncodeColor(colorWhite)+MM
+ EncodeColor(colorRed)+   "\n S1 : "+ EncodeColor(colorWhite)+SD1   + EncodeColor(colorRed)+    "     BOT TGT  : "+ EncodeColor(colorWhite)+LL
+ EncodeColor(colorRed)+   "\n S2 : "+ EncodeColor(colorWhite)+SD2
+ EncodeColor(colorRed)+   "\n S3 : "+ EncodeColor(colorWhite)+SD3
;

_SECTION_BEGIN("AA - Fibonacci Retracements and Goals");
///////////////////////////////////////////////////
// **************** Parameters ********************
//
Period = Param("Period", 1, 1, 50);
ShowExt = ParamToggle("Show Extension ?", "No|Yes"); 
///////////////////////////////////////////////////
// **************** Calculations *****************
//
Period = Period*(13*.618);

Hhb = LastValue(Ref(HHVBars(H, Period), -1))+1;
Llb = LastValue(Ref(LLVBars(L, Period), -1))+1;
Hv = LastValue(Ref(HHV(H, Period), -1));
Lv = LastValue(Ref(LLV(L, Period), -1));

Range = (Hv - Lv);
LText = "0 %, 21.4 %, 38.2 %, 50 %, 61.8 %, 78.6 %, 100 %, 1.618 %, 1.72 %, 200 %";
if(Hhb > Llb)
{
	Levels[0] = Lv;
	Levels[1]= (Range *.214)+Levels[0];
	Levels[2]= (Range *.382)+Levels[0];
	Levels[3]= (Range *.5)+Levels[0];
	Levels[4]= (Range *.618)+Levels[0];
	Levels[5]= (Range *.786)+Levels[0];
	Levels[6]= Hv;
	Levels[7]= (Range *.618)+Levels[6];
	Levels[8]= (Range *.72)+Levels[6];
	Levels[9]= (Range )+Levels[6];
	x0 = BarCount - 1 - Llb;
	x1 = BarCount - 1 - Hhb;
}
else
{
	Levels[0]= Hv;
	Levels[1]= Levels[0]- (Range *.214);
	Levels[2]= Levels[0]- (Range *.382);
	Levels[3]= Levels[0]- (Range *.5);
	Levels[4]= Levels[0]- (Range *.618);
	Levels[5]= Levels[0]- (Range *.786);
	Levels[6]= Lv;
	Levels[7]= Levels[6]- (Range *.618);
	Levels[8]= Levels[6]- (Range *.72);
	Levels[9]= Levels[6]- (Range );
	x0 = BarCount - 1 - Hhb;
	x1 = BarCount - 1 - Llb;
}

//////////////////////////////////////////////////////////////////////////////////////
/// **************************** Plotting Area ********************************
//
//Plot(C, "", IIf(MACD(9,34) > Ref(MACD(9,34),-1), colorBrightGreen, colorRed), ParamStyle("Price Style", styleBar, maskPrice));
for(i=0; i<10; i++)
{
	if(i!=6)
		x = x0;
	else
		x = x1;
	if(i<7 OR ShowExt)
	{
		Plot(LineArray(x, Levels[i], BarCount, Levels[i]), "", i+2, styleDots+styleNoLabel);
		PlotText(StrExtract(LText, i), BarCount, Levels[i], i+2);
	}
}
//Title = FullName()+" - "+Name()+"\nO:"+O+", H:"+H+", L:"+L+", C:"+C;
_SECTION_END();

Open chat
1
Hi, how can I help you?