Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Foreign Flow IDX for Amibroker (AFL)

Rating:
0 / 5 (Votes 0)
Tags:
amibroker, Foreign

This is the information of foreign flow on IDX/COMPOSITE markets which requires the NBSS and NBSF data. You need to have both data from your datafeed provider and adjust the field.

Screenshots

Indicator / Formula

Copy & Paste Friendly
NBSS = OI;
NBSA = Aux1;

TimeFrame = Interval(0);

//_SECTION_BEGIN("NBS Lokal");
//NBSLokalUp = OI-Aux1 > 0;
//NBSLokalDown = OI-Aux1 < 0 ;

//BarColor = IIf(NBSLokalUp, colorGreen, colorRed);
//SMA5 = MA(NBSLokal, 5);

//Plot(SMA5, "NBS Local MA", colorYellow, styleThick|styleDashed, Null ,Null , 0, 0, 4);
//Plot(NBSLokal, "NBS local", BarColor, styleHistogram|styleThick, Null, Null, 0, 0, 12); 

//_N(Title = EncodeColor(colorTurquoise) + Name() + EncodeColor(colorYellow) + "\nNBS Local = " + EncodeColor(colorWhite) + WriteVal(NBSLokal, 1.0, True, True) + " M"
//+ EncodeColor(colorYellow) + "\nSMA5 = " + EncodeColor(colorWhite) + WriteVal(SMA5/1000, 1.2) + " M"
//);
//_SECTION_END();

SMAPeriod = Param("SMA Period", 5, 0, 100, 1, 0);
_SECTION_BEGIN("NBSA");
NBSAUp = Aux1 > 0;
NBSADown = Aux1 < 0;

BarColorNBSA = IIf(NBSAUp, colorBlue, colorPink);
SMA5F = MA(abs(NBSA), SMAPeriod);

PlotSMA5F = ParamToggle("Plot SMA5 Foreign","No|Yes",0);
if(PlotSMA5F) {
	Plot(SMA5F, "NBS Foreign MA", colorYellow, styleThick|styleDashed, Null, Null, 0, 4, 8);
}
PlotOHLC(0, NBSA, 0, NBSA, "NBSA", BarColorNBSA, styleCandle, 0, Null, 0, 1, 12);
_SECTION_END();

_SECTION_BEGIN("NBSS");
NBSSUp = NBSS > 0;
NBSSDown = NBSS < 0 ;

BarColorNBSS = IIf(NBSSUp, colorGreen, colorRed);
SMA5S = MA(abs(NBSS), SMAPeriod);

PlotSMA5S = ParamToggle("Plot SMA5 Total","No|Yes",0);
if(PlotSMA5S) {
	Plot(SMA5S, "NBSS MA", colorOrange, styleThick|styleDashed, Null, Null, 0, 5, 8);
}
PlotOHLC(0, NBSS, 0, NBSS, "NBSA", BarColorNBSS, styleCandle, 0, Null, 0, 0, 12);
_SECTION_END();


_N(Title = EncodeColor(colorTurquoise) + Name() + EncodeColor(colorPink) + "\nNBS Foreign = " + EncodeColor(colorWhite) 
+ WriteIf(NBSAUp, EncodeColor(colorAqua) + WriteVal(NBSA/1000000, 1.2, True, True), EncodeColor(colorPink) + WriteVal(NBSA/1000000, 1.2, True, True)) + " M"
+ EncodeColor(colorYellow) + "\nNBS Haka/Haki = " + EncodeColor(colorWhite) 
+ WriteIf(NBSSUp, EncodeColor(colorGreen) + WriteVal(NBSS/1000000, 1.2, True, True), EncodeColor(colorRed) + WriteVal(NBSS/1000000, 1.2, True, True)) + " M"
+ EncodeColor(colorYellow) + "\nSMA-" + SMAPeriod + " Foreign = " + EncodeColor(colorWhite) + WriteVal(SMA5F/1000000000, 1.2, True, True) + " M"
+ EncodeColor(colorOrange) + "\nSMA-" + SMAPeriod + " Total = " + EncodeColor(colorWhite) + WriteVal(SMA5S/1000000000, 1.2, True, True) + " M");

_SECTION_BEGIN("Symbol Info");
{
Gfxcl = ColorHSB( 32, 122, 150 );
GfxSetOverlayMode(1);
GfxSelectFont("Verdana",40,1000,False,False );
GfxSetTextAlign( 6 );// right alignment
GfxSetTextColor( Gfxcl );
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/14 );
GfxSelectFont("Verdana",20,100,False,False);
GfxTextOut("Foreign Flow", Status("pxwidth")/2, Status("pxheight")/3 );
GfxSelectFont("Verdana",10,100,1,False );

_SECTION_END();
}

2 comments

1. ARIES77

Thank you for nice afl but i need more infornation …how i can get nbsf and nbss data ?…from mr povider i cant get it …thanks,,, i really need this afl plis help

2. melgwyn

Hi
I also have the same question with the other Q&A
Your help would be much appreciate.
Thanks

Leave Comment

Please login here to leave a comment.

Back