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

dr1111 for Amibroker (AFL)

Copy & Paste Friendly



_SECTION_BEGIN("ema");
Lk = EMA(Close,22);
Plot (lk," ",colorBrightGreen,styleLine);


GfxSelectFont("Georgia", Status("pxheight")/76);
GfxSetTextAlign( 6 );
GfxSetTextColor(colorGold);
GfxSetBkMode(0);
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/10 );

cx=Param("cxposn",885,0,500,1);
cy=Param("cyposn",16,0,500,1);
GfxSetBkColor(ColorRGB(200,50,100));
GfxSelectFont( "tohomabold",24,50, False);
GfxSetTextColor( colorYellow);
GfxSetTextColor( ColorHSB( 100, 10, 400) );
GfxTextOut("LTP. "+C+" ", cx, cy );

_SECTION_END();

_SECTION_BEGIN("Title");

DDayO = TimeFrameGetPrice("O", inDaily);
DHiDay = TimeFrameGetPrice("H", inDaily);
DLoDay = TimeFrameGetPrice("L", inDaily);
gfr = TimeFrameGetPrice("C", inDaily, -1);//close


Title = EncodeColor(colorYellow)+" * WayToWin Trading System * "+EncodeColor(ColorRGB(220,10,150)) +" "+ Interval(2) + " " + Date() +
EncodeColor(ColorRGB(200,150,120)) + " \n Open " + O +
", High : " + H +
", Low : " + L+ EncodeColor(colorGreen) +
" * Prevvious Day Close : " + EncodeColor(colorGreen) + gfr +EncodeColor(colorYellow)+
"\n ToDay Open : " +DDayO + " High : " +DHiDay + " Low : "+ DLoDay;
_SECTION_END();



Col_cci = IIf(CCI(8) > 5, colorBrightGreen,IIf(CCI(8) <-5,colorRed,IIf(CCI(8) > Ref(CCI(8),-1),colorBrightGreen,colorDarkRed)));
HaClose =EMA((O+H+L+L+C)/5,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose,"" , Col_cci, styleCandle| styleNoLabel );

_SECTION_END();





_SECTION_BEGIN("");




SetBarsRequired(100000,0);
GraphXSpace = 5;

ea = EMA (C,10);
eb = EMA (C,20);
SetBarFillColor( IIf( ea > eb, colorGreen, colorRed ) );

Buy = ea > eb AND TimeNum() > 092000 AND TimeNum() < 150000;
Sell = eb > ea OR TimeNum() > 150000;
Short = 0;
Cover = 0;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);


SetTradeDelays(1,1,1,1);

Factor=Param("Factor",4,1,10,1);
Pd=Param("ATR Periods",10,1,100,1);
Up=(H+L)/2+(Factor*ATR(Pd));
Dn=(H+L)/2-(Factor*ATR(Pd));
iATR=ATR(Pd);
TrendUp=TrendDown=Null;
trend[0]=1;
changeOfTrend=0;
flag=flagh=0;

for (i = 1; i <BarCount; i++) {
TrendUp[i] = Null;
TrendDown[i] = Null;

trend[i]=1;


if (Close[i]>Up[i-1]) {
trend[i]=1;
if (trend[i-1] == -1) changeOfTrend = 1;

}
else if (Close[i]<Dn[i-1]) {
trend[i]=-1;
if (trend[i-1] == 1) changeOfTrend = 1;
}
else if (trend[i-1]==1) {
trend[i]=1;
changeOfTrend = 0;
}
else if (trend[i-1]==-1) {
trend[i]=-1;
changeOfTrend = 0;
}

if (trend[i]<0 && trend[i-1]>0) {
flag=1;
}
else {
flag=0;
}

if (trend[i]>0 && trend[i-1]<0) {
flagh=1;
}
else {
flagh=0;
}

if (trend[i]>0 && Dn[i]<Dn[i-1]){
Dn[i]=Dn[i-1];
}

if (trend[i]<0 && Up[i]>Up[i-1])
{ Up[i]=Up[i-1];
}

if (flag==1)
{ Up[i]=(H[i]+L[i])/2+(Factor*iATR[i]);;
}
if (flagh==1)
{ Dn[i]=(H[i]+L[i])/2-(Factor*iATR[i]);;
}
if (trend[i]==1) {
TrendUp[i]=Dn[i];
if (changeOfTrend == 1) {
TrendUp[i-1] = TrendDown[i-1];
changeOfTrend = 0;
}
}
else if (trend[i]==-1) {
TrendDown[i]=Up[i];
if (changeOfTrend == 1) {
TrendDown[i-1] = TrendUp[i-1];
changeOfTrend = 0;
}
}
}



Buy = trend==1;
Sell=trend==-1;

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=Sell;
Cover=Buy;


BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);
ShortPrice=ValueWhen(Short,C);
CoverPrice=ValueWhen(Cover,C);




PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);

TrendSL=IIf(trend==1,TrendUp,TrendDown);

for(i=BarCount-1;i>1;i--)
{
if(Buy[i] == 1)
{
entry = C[i];
sig = "BUY";
sl = TrendSL[i];
tar1 = entry + (entry * .0050);
tar2 = entry + (entry * .0092);
tar3 = entry + (entry * .0179);

bars = i;
i = 0;
}
if(Sell[i] == 1)
{
sig = "SELL";
entry = C[i];
sl = TrendSL[i];
tar1 = entry - (entry * .0050);
tar2 = entry - (entry * .0112);
tar3 = entry - (entry * .0212);


bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, TrendSL[BarCount-1], Ref(TrendSL, -1));
sl = ssl[BarCount-1];

Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine|styleDots, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine|styleDots, Null, Null, Offset);

Plot(LineArray(bars-Offset, sl, BarCount, sl,1), "", colorDarkRed, styleLine|styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, entry, BarCount, entry,1), "", colorGreen, styleLine|styleLine, Null, Null, Offset);



messageboard = ParamToggle("Message Board","Show|Hide",1);
if (messageboard == 1 )
{
GfxSelectFont( "Georgia", 14, 400 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );

if ( sig =="BUY")
{
GfxSelectSolidBrush( colorGreen ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 330;
x = 2;
x2 = 350;

y = pxHeight;

GfxSelectPen( colorBlue, 4); // broader color
GfxRoundRect( x, y - 165, x2, y , 7, 7 ) ;
GfxTextOut( ( "* WaytoWin Trading  * "),141,y-160);
GfxSelectFont( "Georgia", 11, 300 );
GfxTextOut( (" "),130,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 148, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 130, y-120);
GfxTextOut( ("STOP LOSS : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"), 130, y-100);
GfxTextOut( ("TGT:1 : " + tar1), 130, y -80);
GfxTextOut( ("TGT:2 : " + tar2), 130,y-60);
GfxTextOut( ("TGT:3 : " + tar3), 130,y-40);
GfxTextOut( ("Current P/L * : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 130, y-22);;

}
_SECTION_END();




Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow ;

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
//PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );
//dist = 2.5*ATR(5);
//for( i = 0; i < BarCount; i++ ) {
//if( Buy[i] ) PlotText( "Buy\n@" + Close[i], i, Low[i] - dist[i], colorWhite );
//if( Sell[i] ) PlotText( "sell\n@" + Close[i], i, Low[i] + dist[i], colorWhite );
//}
dist = 3*ATR(20);
dist1 = 3*ATR(20);
for( i = 0; i < BarCount; i++ ) 
{ 
 if( Buy[i] ) 
 {
  PlotText( "\nBuy:" + H[ i ] +  "\nSL= " + (H[i]*0.9975), i, L[ i ]-dist[i], colorWhite, colorBlue );
 }
 if( Sell[i] )
 {
  PlotText( "Sell:" + L[ i ] + "\nSL= " + (L[i]*1.0025), i, H[ i ]+dist1[i], colorWhite, colorRed ); 
 }
}



_SECTION_BEGIN("day");
TimeFrameSet( inDaily ); // switch now to dayily

Oo=EMA(C,3);

TimeFrameRestore(); // restore time frame to original

tb=EMA(gfr,3);



Plot( TimeFrameExpand( Oo, inDaily),"", colorYellow,10+30+4| styleNoLabel);


_SECTION_END();
_SECTION_BEGIN("Ribbon");
uptrend=PDI()>MDI()AND Signal()<MACD();
downtrend=MDI()>PDI()AND Signal()>MACD();
Plot( 1, /*efines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorLime, IIf( downtrend, colorRed,IIf(Signal()<MACD(), colorLightGrey, colorLightGrey ))), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -.05,50 );
_SECTION_END();







_SECTION_BEGIN("Background text");
C11=ParamColor("up panel",colorBlack );
C12=ParamColor("dn panel",colorBlack );
C13=Param("fonts",20,10,30,1 );
C14=Param("left-right",2.1,1.0,5.0,0.1 );
C15=Param("up-down",8,1,30,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode( 0 ); 
GfxSelectFont("Tahoma", 12, 500, False, False, 0);
GfxSetTextColor(colorCustom12); 
GfxSetTextAlign( 6 );
GfxSelectFont("Tahoma", 15, 600, False, False, 0);
GfxSetTextColor(colorWhite); 
GfxSetTextAlign( 6 );
GfxTextOut( "LTP "+WriteVal(C,1.2), Status("pxwidth")/C14, Status("pxheight")/C15);



pricechange=(C-Ref(C,-1))*100/Ref(C,-1);
changeponit=C-Ref(C,-1);
Vlp=Param("Volume lookback period",15,10,300,10);
Vrg=MA(V,Vlp);
St = StDev(Vrg,Vlp); 
Vp3 = Vrg + 3*st; 
Vp2 = Vrg + 2*st;;
Vp1 = Vrg + 1*st;;
Vn1 = Vrg -1*st; 
Vn2 = Vrg -2*st; 

x=Param("xposn",1,0,1000,1);
y=Param("yposn",1,0,1000,1);

GfxGradientRect( 1, 1, 1400, 40, colorGreen, colorDarkGreen);
GfxSetBkMode(0);
GfxSelectFont( "Georgia", 18, 800, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "WayToWin Trading System ", x+600, y+10 );
GfxSelectFont( "Tahoma", 16, 800, False );
GfxSetTextColor( colorGold );
GfxTextOut( Name(), x+100, y+10 );
GfxSelectFont( "Century Gothic", 15, 100, False );
GfxSetTextColor( colorWhite );
GfxTextOut( Date(), x+1000, y+10 );
GfxSelectFont( "Comic Sans MS", 15, 500, False );
GfxSetTextColor( colorYellow );
GfxTextOut( Interval(2), x+275, y+10 );
//------------------------------------------------------------ H, L, O, C----------------------
GfxGradientRect( 1, 40, 1400, 65, colorGreen, colorDarkGreen );
GfxSetBkMode(0);
GfxSelectFont( "Areal", 8, 400, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "High:"+WriteVal(H,1.2), x+100, y+40 );
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Low:"+WriteVal(L,1.2), x+200, y+40 );
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Open:"+WriteVal(O,1.2), x+300, y+40 );
GfxSelectFont( "Areal", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Close:"+WriteVal(C,1.2), x+400, y+40 );
GfxSelectFont( "georgia", 12, 700, False );
GfxSetTextColor( colorGold );
GfxTextOut( "Mobile 9791010421 ", x+1000, y+39 );
//-----------------------------------------------------------Valume-------------------------------
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorWhite );
GfxTextOut( "Volume="+WriteVal(V,1.2), x+500, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorLime );
GfxTextOut( WriteIf(V>Vp2,"Very High",""), x+650, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorLime );
GfxTextOut( WriteIf(V>Vp1," High",""), x+700, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorLime );
GfxTextOut( WriteIf(V>Vrg,"Above Average",""), x+800, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorRed );
GfxTextOut( WriteIf(V<Vrg AND V>Vn1,"Less than Average",""), x+600, y+40 );
GfxSelectFont( "Tahoma", 9, 200, False );
GfxSetTextColor( colorRed );
GfxTextOut( WriteIf(V<Vn1,"Low",""), x+600, y+40 );
//----------------------------------------------------------------Leveles----------------------------
//_SECTION_BEGIN("Pivot")
	YH = TimeFrameGetPrice("H", inDaily, -1);		// yesterdays high
	YL = TimeFrameGetPrice("L", inDaily, -1);		//				low
	YC = TimeFrameGetPrice("C", inDaily, -1);		//				close
	YO = TimeFrameGetPrice("O", inDaily);			// current day open

	//Normal Pivot
	PP = (YH + YL + YC) / 3;
	R1 = (2 * PP) - YL;
	R2 = PP + (YH - YL);
	R3 = YH + 2*(PP-YL);
	S1 = (2 * PP) - YH;
	S2 = PP - (YH - YL);
	S3 = YL - 2*(YH - PP) ;

x=Param("xposn",400,700,600,640);
y=Param("yposn",400,700,600,640);
GfxGradientRect(400, 700, 1400, 640, colorPink, colorRed );
GfxSetBkMode(0);
GfxSelectFont( "Tohama", 8, 700, False );
GfxSetTextColor( colorWhite );
GfxTextOut( WriteIf(YH, "DailyPivot.: "+(PP),""), 650, 720);
GfxSetTextColor( 11  ); 
GfxTextOut( WriteIf(R1, "R1: "+(R1),""), 623, 700); 
GfxTextOut( WriteIf(R2, "R2: "+(R2),""), 723, 700); 
GfxTextOut( WriteIf(R3, "R3: "+(R3),""), 823, 700); 
GfxSetTextColor( colorCustom11   );  
GfxTextOut( WriteIf(S1, "S1: "+(S1),""), 623, 740); 
GfxTextOut( WriteIf(S2, "S2: "+(S2),""), 723, 740); 
GfxTextOut( WriteIf(S3, "S3: "+(S3),""), 823, 740); 
range = 30;//Param("Periods", 14, 2, 200, 1 );

ADXi=ADX(range);

PDIi=PDI(range);

MDIi=MDI(range);

//Plot( ADXi=ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );

//Plot( PDIi=PDI(range), "", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );

//Plot( MDIi=MDI(range), "", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );

uptrend=PDIi>MDIi;//+di greater than -di

downtrend=MDIi>PDIi;//-di greater than +di

Ribboncol=IIf(upTrend,colorGreen, IIf(downtrend,colorRed, colorBlack));

Plot(6, "", Ribboncol, styleOwnScale|styleArea|styleNoLabel, -7.5,100);
Back