PLS anybady have PIN Bar AFL

niftyoption

Well-Known Member
#1
Please , anybady give PIN BAR recognition AFL
In amibroker chart After formation of PIN BAR display star at the bottom of the candle

thank you verymuch
 
Last edited:
#2
hi
have a look
Think
Code supplied by Ceurami
HTML:
_SECTION_BEGIN("_ChartTemplat_GD-B_dark");

//-------------------------------------------------------------------------
//----Anweisungen abhängig vom Charttyp------------------------------------



cs = GetPriceStyle();   // CS == ChartStyle
choose = ParamToggle("Charttypabhängigkeit?", "Yes|No"); 


if(choose == 0){ 
   if(cs == styleBar){
		chartArt = "bar";
	} 
	else if (cs == styleCandle){
		chartArt = "candle";
	}else{
		chartArt = "line";	
	}

} else {
	chartArt = "";
};


//-------------------------------------------------------------------------
//---- ChartFarben --ChartStyle--------------------------------------------

if(!choose )
	SetChartBkColor( ParamColor("HintergrundFarbe", ColorRGB( 0, 50, 50 ) ) );  // Hintergrund >> nur wenn ChartTemplet greift 

line_color_up =  ParamColor("Line_Color_UP", ColorRGB( 46, 139 , 87 ) );   //- UP - DOWN - 
line_color_down = ParamColor("Line_Color_DOWN", ColorRGB(  220, 20, 60 ) );  //- UP - DOWN - 

bar_color_up =  ColorRGB( 44, 138 , 84);
bar_color_down  = ColorRGB( 220, 22, 60); 

candle_color_up =  ColorRGB( 0, 0, 255);
candle_color_down  = ColorRGB( 255, 0, 0); 
candle_rahmen = ColorRGB( 128, 128 , 128);

spezial_color = ParamColor( "PinBar-Color", ColorRGB( 255, 255 , 0) );


//-------------------------------------------------------------------------
//---- Bedingungen --------------------------------------------------------

// PinBars werden anders coloriert
// Bars/Lines/Candles bei denen open und close dicht beieiander liegen werden anders farbieg dargestellt
// zur Vereinfachung, ist der Abstand Hoch - Tief um Faktor "pinbar_faktor" größer als der Abstand Open-Close, gilt die Bedingung             

pinbar_faktor = Param( "Pinbar-Faktor", 5, 1, 10, 0.1);
bedingungOpenNearClose = abs(H-L)/ pinbar_faktor > abs(O-C) ;
bedingungUp = O< C;


style =  styleNoTitle | ParamStyle("Style");


if(chartArt == "line"){
	Plot( C, "Price", IIf(bedingungOpenNearClose, spezial_color,   IIf( bedingungUp, line_color_up, line_color_down) ),style |styleThick | GetPriceStyle());  // |styleThick

}else if (chartArt == "bar"){
	Plot( C, "Price", IIf( bedingungOpenNearClose, spezial_color, IIf( bedingungUp, bar_color_up, bar_color_down) ),style | GetPriceStyle()); 

}else if (chartArt == "candle"){
	// bei CandleChart wird hiermit die FüllFarbe definiert
	SetBarFillColor( IIf( bedingungUp, candle_color_up, candle_color_down) );
	// Color definiert bei CandlChart den Rahmen
	Plot( C, "Price", IIf (bedingungOpenNearClose, spezial_color, candle_rahmen  ),  style | GetPriceStyle());

}else{
	// StandartChart
	_SECTION_BEGIN("Price");
	SetChartOptions(0,chartShowArrows|chartShowDates);
	_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
	Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
	_SECTION_END();
}



//-------------------------------------------------------------------------
//---- Indis --------------------------------------------------------------


_SECTION_BEGIN("Keltner Bands");
Periods = 15;
Width = 1.95;
Color = ParamColor( "Keltner", ColorRGB( 65, 65, 65 ) );
Style = styleNoLabel;

CenterLine = MA( C, Periods );
KTop   = CenterLine + Width * ATR( Periods );
KBot = CenterLine - Width * ATR( Periods );

Plot( KTop, "", Color,  Style); 
Plot( KBot, "", Color, Style ); 
_SECTION_END();


_SECTION_BEGIN("GD_Bänder");
GD1 = 10;
GD2 = 10;
GD3 = 50;
GD4 = 100;

gd_color_1a = ParamColor( "GD1", ColorRGB(  0, 66, 85  ) );
gd_color_1b = ParamColor( "GD2", ColorRGB( 44, 44, 88 ) );  

gd_color_2a = ParamColor( "GD3", ColorRGB( 0, 45, 45) ); 
gd_color_2b = ParamColor( "GD4", ColorRGB( 0, 45, 45) );  

// Farbe am Rand des GD-Bandes
Plot(  MA( C, GD1 ), "", ColorRGB( 50, 70, 70 ), styleLine|styleNoLabel ); 
Plot( EMA( C, GD4 ), "", ColorRGB( 0, 70, 70 ), styleLine|styleNoLabel ); 

Cloud_color_1 = IIf( MA( C, GD1 ) < EMA( C, GD2 ), gd_color_1a, gd_color_1b);
Cloud_color_2 = IIf( EMA( C, GD3 ) > EMA( C, GD4 ), gd_color_2a, gd_color_2b);

PlotOHLC( MA( C, GD1 ), MA( C, GD1 ), EMA( C, GD2 ), EMA( C, GD2 ), "", Cloud_color_1, styleCloud|styleNoLabel, Null, Null, Null, -8);
PlotOHLC( EMA( C, GD3 ), EMA( C, GD3 ),EMA( C, GD4 ), EMA( C, GD4 ), "", Cloud_color_2, styleCloud|styleNoLabel, Null, Null, Null, -9);
_SECTION_END();


//---ChartTypAbhängiges

if(chartArt == "line"){ 
	// wenn LinienChart
	_SECTION_BEGIN("High_Low_Line");
	HighLine = H;
	LowLine = L;
	farbe_HL = ColorRGB( 65, 65, 65 );
	Plot(HighLine, "", farbe_HL,styleLine|styleDashed|styleNoLabel); //  styleStaircase
	Plot(LowLine, "", farbe_HL,styleLine|styleDashed|styleNoLabel);  // styleLine
	_SECTION_END();

}
_SECTION_END();
 
Last edited:

niftyoption

Well-Known Member
#3
Dear FORD SIR

I want only display star bottom of the PIN BAR CANDILE
AUTOMATICALLY after candile closing



thank you verymuch sir
 

amitrandive

Well-Known Member
#4
Please , anybady give PIN BAR recognition AFL
In amibroker chart After formation of PIN BAR display star at the bottom of the candle

thank you verymuch
Try This
Code:
_SECTION_BEGIN("Chart Settings");
	SetChartOptions(0,chartShowArrows|chartShowDates); 
	SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
	SetChartBkGradientFill(ParamColor("Upper Chart",colorBlack),ParamColor("Lower Chart",colorBlack));
	GraphXSpace=Param("GraphXSpace",20,0,100,1);
	dec = (Param("Decimals",2,0,7,1)/10)+1;
	bi = BarIndex();
	Lbi = LastValue(BarIndex());
	sbi = SelectedValue(bi);
	x1= BarCount-1;
Title = EncodeColor(55)+  Title = Name() + "     " + EncodeColor(32) + Date() +
"      " + EncodeColor(5) + "{{INTERVAL}}  " +
	EncodeColor(55)+ "     Open = "+ EncodeColor(52)+ WriteVal(O,dec) + 
	EncodeColor(55)+ "     High = "+ EncodeColor(5) + WriteVal(H,dec) +
	EncodeColor(55)+ "      Low = "+ EncodeColor(32)+ WriteVal(L,dec) + 
	EncodeColor(55)+ "    Close = "+ EncodeColor(52)+ WriteVal(C,dec)+
	EncodeColor(55)+ "    Volume = "+ EncodeColor(52)+ WriteVal(V,1);
_SECTION_END();
//========================================================================

SetChartOptions(0,chartShowArrows|chartShowDates);
blpin = (((H-L)>6*(O-C)) AND ((C-L)/(.001+H-L)>0.6) AND ((O-L)/(.001+H-L)>0.6));
brpin = (((H-L)>6*(O-C)) AND ((H-C)/(.001+H-L)>0.7) AND ((H-O)/(.001+H-L)>0.7));
Cc= IIf(blpin,colorGreen,IIf(brpin,colorRed,Null));
SetBarFillColor(Cc);
Plot(C,"",Cc,128+4);
for( i = 0; i < BarCount; i++ )
{
if(blpin[i] ) PlotText( "bl.pin " , i, L[ i ]-2.5, colorLime );
if(brpin[i] ) PlotText( " br pin" , i, H[ i ]+2.5, colorOrange );
}
PlotShapes(shapeHollowSmallSquare*brpin,4,0,H ,5);
PlotShapes(shapeHollowSmallSquare*blpin,5,0,L ,-5);
Filter=brpin OR blpin;
AddColumn(brpin,"Barish Pin",1.2);
AddColumn(blpin,"Bullish Pin",1.2);
 

niftyoption

Well-Known Member
#6
Thank you verymuch Amitradndive Sir
 

niftyoption

Well-Known Member
#8
Dear Sir
Pin bar is a good Reversal or firing indication
so i am useing one of the parameter in my trading stratagy

thank you sir