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

visualisation sector rotation for Amibroker (AFL)

Copy & Paste Friendly
_SECTION_BEGIN("1_visualisation sector rotation");
/*
Visualisation Of rotational 
180 starting goingup/ the most of down AND 360 starting going down/ the most of up 
clock needle (brown,lime and blue) this is islamic clock
yellow needle is direction (change lastvalue to selectedvalue to play the rotaion
adjust the radius to fit with your screen
*/
RequestTimedRefresh(1);
GfxSetBkMode(1);
par=Param("radius",190,0,470,1); 
xx=Status("pxwidth")/2;
yy= Status("pxchartheight")/2;
phi=3.1415926535897932384626433832795;
derajad=360;
RAD=phi/180;//derajad = radian phi/180
FULLPUTARAN=2*PHI;
//.............................................MAIN FRAME..........................................................................................................................
GfxSelectPen( colorGreen, 2 ); 
GfxCircle( xx, yy, par) ;//GfxCircle( xx, yy, par ) ;
//...............................................SECTOR........................................................................................................................
symbol0="^JKSE";
K0 = (Foreign( symbol0, "C" ) - LLV(Foreign(symbol0, "L" ),15))/(HHV(Foreign( symbol0, "H" ),15) - LLV(Foreign(symbol0, "L" ),15)) * (derajad);
symbol1="^JKBIND";
K1 = (Foreign( symbol1, "C" ) - LLV(Foreign(symbol1, "L" ),15))/(HHV(Foreign( symbol1, "H" ),15) - LLV(Foreign(symbol1, "L" ),15)) * (derajad);
symbol2="^JKFINA";
K2 = (Foreign( symbol2, "C" ) - LLV(Foreign(symbol2, "L" ),15))/(HHV(Foreign( symbol2, "H" ),15) - LLV(Foreign(symbol2, "L" ),15)) * (derajad);
symbol3="^JKINFA";
K3 = (Foreign( symbol3, "C" ) - LLV(Foreign(symbol3, "L" ),15))/(HHV(Foreign( symbol3, "H" ),15) - LLV(Foreign(symbol3, "L" ),15)) * (derajad);
symbol4="^JKPROP";
K4 = (Foreign( symbol4, "C" ) - LLV(Foreign(symbol4, "L" ),15))/(HHV(Foreign( symbol4, "H" ),15) - LLV(Foreign(symbol4, "L" ),15)) * (derajad);
symbol5="^JKTRAD";
K5 = (Foreign( symbol5, "C" ) - LLV(Foreign(symbol5, "L" ),15))/(HHV(Foreign( symbol5, "H" ),15) - LLV(Foreign(symbol5, "L" ),15)) * (derajad);
symbol6="^JKAGRI";
K6 = (Foreign( symbol6, "C" ) - LLV(Foreign(symbol6, "L" ),15))/(HHV(Foreign( symbol6, "H" ),15) - LLV(Foreign(symbol6, "L" ),15)) * (derajad);
symbol7="^JKCONS";
K7 = (Foreign( symbol7, "C" ) - LLV(Foreign(symbol7, "L" ),15))/(HHV(Foreign( symbol7, "H" ),15) - LLV(Foreign(symbol7, "L" ),15)) * (derajad);
symbol8="^JKMING";
K8 = (Foreign( symbol8, "C" ) - LLV(Foreign(symbol8, "L" ),15))/(HHV(Foreign( symbol8, "H" ),15) - LLV(Foreign(symbol8, "L" ),15)) * (derajad);
symbol9="^JKMISC";
K9 = (Foreign( symbol9, "C" ) - LLV(Foreign(symbol9, "L" ),15))/(HHV(Foreign( symbol9, "H" ),15) - LLV(Foreign(symbol9, "L" ),15)) * (derajad);
symbol10="^JKMNFG";
K10 = (Foreign( symbol10, "C" ) - LLV(Foreign(symbol10, "L" ),15))/(HHV(Foreign( symbol10, "H" ),15) - LLV(Foreign(symbol10, "L" ),15)) * (derajad);

//..................................DIRECTION ARROW....................................................................................................................................

GfxSelectPen( 3, 5 ); 
set2=1.57*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,2200);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1800,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-700);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,200,1000);
set2=1.555*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1600,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-500);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,200,1400);
set2=1.54*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,1800);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1400,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-300);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,300,1600);
set2=1.525*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,1600);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1200,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-100);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,300,1600);
set2=1.51*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,1200);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1000,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,100);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,400,1800);
set2=1.495*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,800);//////////////////////////////////////////////////////////
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,800,-2000);///////////////////////////////////////////////////////////
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,300);/////////////////////////////////////////////////////////////////////
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,500,2500);///////////////////////////////////////////////////////////////
set2=1.48*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,1200);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1000,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,100);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,500,2000);
set2=1.465*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,1600);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1200,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-100);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,400,1800);
set2=1.45*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,1800);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1400,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-300);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,300,1600);
set2=1.435*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1600,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-500);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,200,1400);
set2=1.42*par;
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,1000,1200,6000,2200);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,4000,300,1800,-2000);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,500,-500,-2000,-700);
GfxArc(xx-set2,yy-set2,xx+set2,yy+set2,-1000,600,200,1000);
//.........................................AREA DIVISOR..............................................................................................................................
GfxSelectPen( colorYellow, 1 ); 
GfxMoveTo( xx, yy);
GfxLineTo( xx, xx*2 );//////// down
GfxMoveTo( xx, yy);
GfxLineTo( xx, 0 );//////// up
GfxMoveTo( xx, yy);
GfxLineTo( 0, yy );//////// left
GfxMoveTo( xx, yy);
GfxLineTo( xx*2, yy ); //////// right
//....................................................BORDER...................................................................................................................
bataskiri=((xx)-par);
bataskanan= ((xx)+par);
batasatas= ((yy)-par);
batasbawah= ((yy)+par);
//................................................ANALOG CLOCK.......................................................................................................................
dett= (2*phi)/60;
jam=Now(4)/1000000;

GfxSelectPen( colorBlue, 2);
GfxMoveTo(  xx, yy );
detik=StrToNum(StrRight(NumToStr(jam,1.6),2));
dd=(detik*dett);
GfxLineTo(xx+(par*-sin(dd)),yy+(par*-cos(dd)) );

GfxSelectPen( colorLime, 5);
GfxMoveTo(  xx, yy );
menit=StrToNum(StrLeft(StrRight(NumToStr(jam,1.6),4),2));
menit=menit+detik/60;
mm=menit*dett;
GfxLineTo(xx+((par-40)*-sin(mm)),yy+((par-40)*-cos(mm)) );

GfxSelectPen( colorBrown, 10);
GfxMoveTo(  xx, yy );
jam1=StrToNum(StrLeft(StrRight(NumToStr(jam,1.6),6),2));
jamm=jam1+(menit/60);
jj=jamm*((2*phi)/12);
GfxLineTo(xx+((par-15)*-sin(jj)),yy+((par-15)*-cos(jj)) );///////bergerak pelan sampai tujuan dengan memperhitungkan menit dan detiknya 
if	(menit==00 AND detik==00)
	{PlaySound("C:\\Windows\\Media\\Speech Disambiguation.wav");}
//.......................................................................................................................................................................
PAREM=Param("DERAJAD",0,0,360,1);
GfxSetTextColor(ColorHSB(20,256,256));
GfxSelectFont("Tahoma", Status("pxheight")/40) ;
GfxTextOut( "270", bataskanan+5, yy-9 );
GfxTextOut( "180", xx-15, batasbawah+3 );
GfxTextOut( "90", bataskiri-25, yy-9 );
GfxTextOut( "0", XX-5, batasatas-25 );
GfxSetTextColor(11);
GfxTextOut("DOWN",XX/8,YY-YY/2-210);
GfxTextOut("CONTINUE DOWN",XX/8,YY+YY/2-210);
GfxTextOut("IMPROVING",XX+XX/2,YY+YY/2-210);
GfxTextOut("CONTINUE UP",XX+XX/2,YY-YY/2-210);
GfxSetTextColor(6);
//GfxTextOut("DOWN",XX/2,YY-YY/2);
GfxTextOut("- "+WriteIf(k0<91,symbol0+" = "+k0,""),XX/8,YY-YY/2-180);
GfxTextOut("- "+WriteIf(k1<91,symbol1+" = "+k1,""),XX/8,YY-YY/2-150);
GfxTextOut("- "+WriteIf(k2<91,symbol2+" = "+k2,""),XX/8,YY-YY/2-120);
GfxTextOut("- "+WriteIf(k3<91,symbol3+" = "+k3,""),XX/8,YY-YY/2-90);
GfxTextOut("- "+WriteIf(k4<91,symbol4+" = "+k4,""),XX/8,YY-YY/2-60);
GfxTextOut("- "+WriteIf(k5<91,symbol5+" = "+k5,""),XX/8,YY-YY/2-30);
GfxTextOut("- "+WriteIf(k6<91,symbol6+" = "+k6,""),XX/8,YY-YY/2);
GfxTextOut("- "+WriteIf(k7<91,symbol7+" = "+k7,""),XX/8,YY-YY/2+30);
GfxTextOut("- "+WriteIf(k8<91,symbol8+" = "+k8,""),XX/8,YY-YY/2+60);
GfxTextOut("- "+WriteIf(k9<91,symbol9+" = "+k9,""),XX/8,YY-YY/2+90);
GfxTextOut("- "+WriteIf(k10<91,symbol10+" = "+k10,""),XX/8,YY-YY/2+120);
//GfxTextOut("CONTINUE DOWN",XX/2,YY+YY/2);
GfxTextOut("- "+WriteIf(k0>90 AND k0<181,symbol0+" = "+k0,""),XX/8,YY+YY/2-180);
GfxTextOut("- "+WriteIf(k1>90 AND k0<181,symbol1+" = "+k1,""),XX/8,YY+YY/2-150);
GfxTextOut("- "+WriteIf(k2>90 AND k0<181,symbol2+" = "+k2,""),XX/8,YY+YY/2-120);
GfxTextOut("- "+WriteIf(k3>90 AND k0<181,symbol3+" = "+k3,""),XX/8,YY+YY/2-90);
GfxTextOut("- "+WriteIf(k4>90 AND k0<181,symbol4+" = "+k4,""),XX/8,YY+YY/2-60);
GfxTextOut("- "+WriteIf(k5>90 AND k0<181,symbol5+" = "+k5,""),XX/8,YY+YY/2-30);
GfxTextOut("- "+WriteIf(k6>90 AND k0<181,symbol6+" = "+k6,""),XX/8,YY+YY/2);
GfxTextOut("- "+WriteIf(k7>90 AND k0<181,symbol7+" = "+k7,""),XX/8,YY+YY/2+30);
GfxTextOut("- "+WriteIf(k8>90 AND k0<181,symbol8+" = "+k8,""),XX/8,YY+YY/2+60);
GfxTextOut("- "+WriteIf(k9>90 AND k0<181,symbol9+" = "+k9,""),XX/8,YY+YY/2+90);
GfxTextOut("- "+WriteIf(k10>90 AND k0<181,symbol10+" = "+k10,""),XX/8,YY+YY/2+120);
//GfxTextOut("IMPROVING",XX+XX/2+200,YY+YY/2);
GfxTextOut("- "+WriteIf(k0>180 AND k0<271,symbol0+" = "+k0,""),XX+XX/2,YY+YY/2-180);
GfxTextOut("- "+WriteIf(k1>180 AND k1<271,symbol1+" = "+k1,""),XX+XX/2,YY+YY/2-150);
GfxTextOut("- "+WriteIf(k2>180 AND k2<271,symbol2+" = "+k2,""),XX+XX/2,YY+YY/2-120);
GfxTextOut("- "+WriteIf(k3>180 AND k3<271,symbol3+" = "+k3,""),XX+XX/2,YY+YY/2-90);
GfxTextOut("- "+WriteIf(k4>180 AND k4<271,symbol4+" = "+k4,""),XX+XX/2,YY+YY/2-60);
GfxTextOut("- "+WriteIf(k5>180 AND k5<271,symbol5+" = "+k5,""),XX+XX/2,YY+YY/2-30);
GfxTextOut("- "+WriteIf(k6>180 AND k6<271,symbol6+" = "+k6,""),XX+XX/2,YY+YY/2);
GfxTextOut("- "+WriteIf(k7>180 AND k7<271,symbol7+" = "+k7,""),XX+XX/2,YY+YY/2+30);
GfxTextOut("- "+WriteIf(k8>180 AND k8<271,symbol8+" = "+k8,""),XX+XX/2,YY+YY/2+60);
GfxTextOut("- "+WriteIf(k9>180 AND k9<271,symbol9+" = "+k9,""),XX+XX/2,YY+YY/2+90);
GfxTextOut("- "+WriteIf(k10>180 AND k10<271,symbol10+" = "+k10,""),XX+XX/2,YY+YY/2+120);
//GfxTextOut("CONTINUE UP",XX+XX/2+200,YY-YY/2);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol0+" = "+k0,""),XX+XX/2,YY-YY/2-180);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol1+" = "+k1,""),XX+XX/2,YY-YY/2-150);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol2+" = "+k2,""),XX+XX/2,YY-YY/2-120);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol3+" = "+k3,""),XX+XX/2,YY-YY/2-90);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol4+" = "+k4,""),XX+XX/2,YY-YY/2-60);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol5+" = "+k5,""),XX+XX/2,YY-YY/2-30);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol6+" = "+k6,""),XX+XX/2,YY-YY/2);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol7+" = "+k7,""),XX+XX/2,YY-YY/2+30);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol8+" = "+k8,""),XX+XX/2,YY-YY/2+60);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol9+" = "+k9,""),XX+XX/2,YY-YY/2+90);
GfxTextOut("- "+WriteIf(k0>270 AND k0<360,symbol10+" = "+k10,""),XX+XX/2,YY-YY/2+120);
GfxSetTextColor(8);
tiggi=GfxSelectFont("Tahoma", Status("pxheight")/20) ;
GfxTextOut( "270",  Status("pxwidth")/1.1, YY-25 );
GfxTextOut( "180", XX-30, Status("pxheight")/1.08 );
GfxTextOut( "90     ", 0, YY-25 );
GfxTextOut( "0", XX-10, 0);
GfxSelectFont("Tahoma", 70 );
GfxSetTextColor(colorBlue); 
K = (MA(C,5) - MA(LLV(L,15),5))/(MA(HHV(H,15),5) - MA(LLV(L,15),5)) * (2*PHI);
KKK = (MA(C,5) - MA(LLV(L,15),5))/(MA(HHV(H,15),5) - MA(LLV(L,15),5)) * (360);
GfxSelectPen( colorYellow, 20);
GfxMoveTo(  xx, yy );

GfxLineTo(xx+(par*-sin((PAREM*(PHI/180)))),yy+(par*-cos((PAREM*(PHI/180)))) );
GfxTextOut(""+WriteVal(SelectedValue(PAREM),1.2),XX-80,YY-56);
//GfxTextOut("RADIAN:"+WriteVal(cos(PAREM*(PHI/180)),1.1),XX-80,YY-200);
//GfxTextOut(""+WriteVal(SelectedValue(kKK),1.2),XX-380,YY-156);
Title=EncodeColor(colorGrey40)+jamm+
"\n"
+menit+
"\n"+
detik+
"\n"+
"DERAJAD:"+PAREM+
"\n"+
"RADIAN:"+cos(PAREM*(PHI/180))+
"\n"+
"\n"
;




















_SECTION_END();
Back