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

Relative performance IDX SECTORAL INDONESIA for Amibroker (AFL)

Rating:
3 / 5 (Votes 5)
Tags:
amibroker

Another way to see the sectoral index performance on the Indonesian stock exchange by creating your own database which can be downloaded at BEI/IDX website (Ringkasan index/historical), processed and import wizard, hopefully it will be useful…
(NOTE) First time you must make watchlist and fill in parameter.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Relative PERFORMANCE IDX SECTORAL");
NamaWatchlist = ParamStr("MASUKKAN NAMA WatchList ", "List 0");
jumlahWatchlist = CategoryFind(NamaWatchlist, cat = categoryWatchlist); 
Daftarticker = Name() + "," + CategoryGetSymbols(cat, jumlahWatchlist);
fontsize = Param("Label font size", 10, 4, 30, 1 );
bi = BarIndex();
fbr = Status("firstbarinrange");
Filter = Status("barinrange");
explore = Status("action") == actionExplore;
fvb = IIf(explore, LastValue(ValueWhen(fbr,bi)), Status("firstvisiblebar"));
mat = Matrix(StrCount(Daftarticker, ",")+1, 2);
jumlahrow = MxGetSize(mat, 0);
for ( i = 0; ( symbol = StrExtract(Daftarticker, i ) ) != ""; i++ ) {
 fc = Foreign( symbol, "C" ); 
 idx = Max(NullCount(fc), fvb);
 if (! IsNull(fc[ idx ])) {
  idxsectoral = 100 * (fc - fc[ idx ]) / fc[ idx ];   
  mat[i][0] = SelectedValue(idxsectoral); 
  mat[i][1] = i;   
  x = LastValue(bi) + 1;
  y = LastValue(idxsectoral);
  VarSet("color"+i, colorLightOrange + ((2*i)%15));      
  AddColumn(idxsectoral, "RS-"+symbol, 1.2, color = Varget("color"+i));     
  Plot(idxsectoral, "\n"+symbol, color, styleNoLabel | styleNoTitle);        
  PlotTextSetFont(symbol, "Arial", fontsize, x, y, GetChartBkColor(), color, -fontsize/2);
 }
}

PlotGrid( 0, colorYellow );
Param_dt = FirstVisibleValue(DateTime());
_N(Title = StrFormat( "WATCHLIST(%g): %s, {{NAME}} - Tanggal di mulai: %s, Relative Idx Sectoral [%%]: {{VALUES}}", 
      jumlahWatchlist, NamaWatchlist, DateTimeToStr(Param_dt, 1))); 
SetChartOptions(0, chartWrapTitle);

mat = MxSortRows(mat, False, 0);

for ( i = 0; i < jumlahrow; i++ ) {
 val = mat[i][0]; n = mat[i][1];
 if (! IsNull(val)) {  
  sym = StrExtract(Daftarticker, n);
  color = EncodeColor(Nz(Varget("color"+n)));
  Title += StrFormat("\n%s %s: %g", color,sym,val);  
 }
}
_SECTION_END();

5 comments

1. Nanda57

Good Job

2. iwan

error pak. Tidak jalan di amibroker versi 5.30
mat = Matrix(StrCount(Daftarticker, “,”)+1, 2);
please help. Terimakasih.

3. toilaga2000

Please help me!
I want to show the price after value relative performance corresponding.

4. toilaga2000

Please help me!
I want to show the price after value relative performance corresponding.

5. toilaga2000

Please help me!
I want to show the price after value relative performance corresponding.

Leave Comment

Please login here to leave a comment.

Back