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

Rotasi Saham / Stock Rotation XY-Chart Exploration for Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker, exploration, rotasisaham, xychart, stockrotation, rrg
  • This formula only applies to Exploration/Scan, doesn’t show anything on the chart!

Explore Stocks based on their position in the XY-Chart quadrant.

  • Filter condition based on Transaction Value.

Screenshots

Indicator / Formula

Copy & Paste Friendly
/*
** Rotasi Saham / Stock Rotation XY-Chart Exploration
** Author: newbie123
** --------
** Explore Stocks based on their position in the XY-Chart quadrant.
*/

_N( base = ParamStr( "Base", "IHSG" ) );
Value = Param( "Trx Value (in Billion)", 50, 0, 1000, 1 );

function getrs ( sc, t )
{
    bc = Foreign( base, "C" );
    sbr = sc / bc;

    rs1 = MA( sbr, 12 );
    rs2 = MA( sbr, 26 );
    rs = 100 * ( ( rs1 - rs2 ) / rs2 + 1 );

    rm1 = MA( rs, 1 );
    rm2 = MA( rs, 9 );
    rm = 100 * ( ( rm1 - rm2 ) / rm2 + 1 );

    return IIf( t, rs , rm ) - 100;
}

rs = getrs( C, 1 );
rm = getrs( C, 0 );

Lagging = rs < 0 AND rm < 0;
Improving = rs < 0 AND rm > 0;
Leading = rs > 0 AND rm > 0;
Weakening = rs > 0 AND rm < 0;

pos = WriteIf( Lagging, "3. Lagging",
               WriteIf( Improving, "4. Improving",
                        WriteIf( Leading, "1. Leading",
                                 WriteIf( Weakening, "2. Weakening", "5." ) ) ) );

qcolor = IIf( Lagging, colorOrange,
              IIf( Improving, colorSkyblue,
                   IIf( Leading, colorBrightGreen,
                        IIf( Weakening, colorYellow, colorLightGrey ) ) ) );

VAL = V * C / ( 10 ^ 9 * 0.01 /*fraksi lot - Indonesian Market*/ ); // in billion
Chg = ROC( C, 1 );

Filter = LastValue( VAL ) > Value;

AddColumn( C, "Last", 1.0, colorDefault, colorDefault, 70 );
AddColumn( Chg, "%Chg", 1.2, IIf( Chg > 0, colorGreen, IIf( Chg < 0, colorRed, colorDefault ) ), IIf( Chg >= 5, colorPaleGreen, IIf( Chg <= -5, colorPink, colorDefault ) ), 70 );
AddTextColumn( pos, "Quadrant Pos", 1.0, IIf( qcolor == colorLightGrey, qcolor, colorDefault ), qcolor, 170 );
AddColumn( VAL, "Trx Value", 1.2, colorDefault, colorDefault, 100 );

SetSortColumns( 5, -6 );

6 comments

1. dmr28

Admin please approve this code.

2. baldiboi

please approve this..thx

3. iwan

Terimakasih @newbie123. Sangat bermanfaat, selanjutnya memberikan bobot pada masing masing saham sesuai posisi quadrantnya. Mantap.

4. iwan

Mohon bantuannya @newbie123 untuk menampilkan 1 kolom hasil exploration apakah sedang Akselerasi atau deselerasi guna melengkapi hasil afl explore ini. Terimakasih.

5. iwan

Hallo @newbie123,
saya bermaksud melakukan scan dg timeframe weekly sbb :

//Weekly
TimeFrameSet( inWeekly );
rso = getrs( C, 1 );
rmo = getrs( C, 0 );
TimeFrameRestore();
rso1 = TimeFrameExpand( rso, inWeekly );
rmo1 = TimeFrameExpand( rmo, inWeekly );

//Daily
rs = getrs( C, 1 );//trend
rm = getrs( C, 0 );//momentum

Ternyata hasil scan weeklynya ada yang benar dan salah. Mohon bantuan koreksi
code tsb. Terimakasih.

6. ngocvb

I can’t scan/explore with my Ami

Leave Comment

Please login here to leave a comment.

Back