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

bharathy adx,sup and res for Amibroker (AFL)

Copy & Paste Friendly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
_SECTION_BEGIN("Price");
 
SetBarsRequired(100000,0);
 
GraphXSpace = 15;
 
SetChartOptions(0,chartShowArrows|chartShowDates);
 
SetChartBkColor(ParamColor("bkcolor",ColorRGB(0,0, 0)));
 
GfxSetBkMode(0);
 
GfxSetOverlayMode(1);
 
 
 
 
//SetTradeDelays(1,1,1,1);
 
SetPositionSize(100,spsShares);
 
 
 
 
 
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
 
 
 
_SECTION_END();
 
DayH = TimeFrameGetPrice("H", inDaily, -1);  DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1);  DayLI = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1);   // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily);   // current day open
DayH2= TimeFrameGetPrice("H", inDaily, -2);  DayH2I = LastValue (DayH2,1); // Two days before high
DayL2= TimeFrameGetPrice("L", inDaily, -2);  DayL2I = LastValue (DayL2,1);  // Two days before low
DayH3= TimeFrameGetPrice("H", inDaily, -3);  DayH3I = LastValue (DayH3,1);  // Three days before high
DayL3= TimeFrameGetPrice("L", inDaily, -3);  DayL3I = LastValue (DayL3,1);  // Three days before low
DayH4= TimeFrameGetPrice("H", inDaily, -4);  DayH4I = LastValue (DayH4,1); // Four days before high
DayL4= TimeFrameGetPrice("L", inDaily, -4);  DayL4I = LastValue (DayL4,1);  // Four days before low
DayH5= TimeFrameGetPrice("H", inDaily, -5);  DayH5I = LastValue (DayH5,1);  // Five days before high
DayL5= TimeFrameGetPrice("L", inDaily, -5);  DayL5I = LastValue (DayL5,1);  // Five days before low
DayH6= TimeFrameGetPrice("H", inDaily, -6);  DayH6I = LastValue (DayH6,1); // Six days before high
DayL6= TimeFrameGetPrice("L", inDaily, -6);  DayL6I = LastValue (DayL6,1);  // Six days before low
DayH7= TimeFrameGetPrice("H", inDaily, -7);  DayH7I = LastValue (DayH7,1);  // Seven days before high
DayL7= TimeFrameGetPrice("L", inDaily, -7);  DayL7I = LastValue (DayL7,1);  // Seven days before low
DayH8= TimeFrameGetPrice("H", inDaily, -8);  DayH8I = LastValue (DayH8,1); // Eight days before high
DayL8= TimeFrameGetPrice("L", inDaily, -8);  DayL8I = LastValue (DayL8,1);  // Eight days before low
DayH9= TimeFrameGetPrice("H", inDaily, -9);  DayH9I = LastValue (DayH9,1);  // Nine days before high
DayL9= TimeFrameGetPrice("L", inDaily, -9);  DayL9I = LastValue (DayL9,1);  // Nine days before low
DayH10= TimeFrameGetPrice("H", inDaily, -10);  DayH10I = LastValue (DayH10,1); // Ten days before high
DayL10= TimeFrameGetPrice("L", inDaily, -10);  DayL10I = LastValue (DayL10,1);  // Ten days before low
 
 
TenDHLAvg= ( (DayH - DayL)+ (DayH2 -DayL2)+ (DayH3 - DayL3)+ (DayH4 - DayL4)+ (DayH5 - DayL5)+ (DayH6 -DayL6)+ (DayH7 - DayL7)+ (DayH8 - DayL8)+ (DayH9 - DayL9)+ (DayH10 -DayL10) )/10;
 
Buy= C>((DayC)+((.382)*(TenDHLAvg)));
Sell= C<((DayC)-((.382)*(TenDHLAvg)));
 
 
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);
 
 
SetPositionSize(300,spsShares);
ApplyStop(0,1,10,1);
//-----------end--------------
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy);
 
BuyPrice=ValueWhen(Buy,C);
SellPrice=ValueWhen(Sell,C);
 
 
Edc=(
WriteIf (Buy AND Ref(shrt,-1), " BUY at "+C+"  ","")+
WriteIf (Sell AND Ref(Long,-1), " SEll at "+C+"  ","")
);
_SECTION_END();
 
trendup = IIf(C>((DayC)+((.382)*(TenDHLAvg))), colorBlue, colorWhite);
trendcolor = IIf(C<((DayC)-((.382)*(TenDHLAvg))), colorRed, trendup);
Plot( C, "Close", trendcolor, styleCandle | styleThick );
 
 
numbars = LastValue(Cum(Status("barvisible")));
hts  = -33.5;
 
// Volatility Levels //
DC =    DayC;                               DCI = LastValue (DC,1);     // Yesterday Close
BY  =  ((DayC)+((.382)*(TenDHLAvg)));       BYI = LastValue (BY,1);     // Buy Entry Line
BT1  =  ((DayC)+((.618)*(TenDHLAvg)));      BT1I = LastValue (BT1,1);   // Buy Target Line 1
BT2  =  ((DayC)+((.786)*(TenDHLAvg)));      BT2I = LastValue (BT2,1);   // Buy Target Line 2
BT3  =  ((DayC)+(TenDHLAvg));               BT3I = LastValue (BT3,1);   // Buy Target Line 3
SH  =  ((DayC)-((.382)*(TenDHLAvg)));       SHI = LastValue (SH,1);   // Sell Entry Line
ST1  =  ((DayC)-((.618)*(TenDHLAvg)));      ST1I = LastValue (ST1,1);   // Sell Target Line 1
ST2  =  ((DayC)-((.786)*(TenDHLAvg)));      ST2I = LastValue (ST2,1);   // Sell Target Line 2
ST3 =  ((DayC)-(TenDHLAvg));                ST3I = LastValue (ST3,1);   // Sell Target Line 3
 
vvl = ParamToggle("Trend Levels","Hide|Show",1);
if(vvl==1)  {
  Plot(DC, "DC",colorWhite,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(BY, "BY",colorLime,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(BT1, "BT1",colorGreen,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(BT2, "BT2",colorGreen,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(BT3, "BT3",colorGreen,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(SH, "SH",colorRed,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(ST1, "ST1",colorBrown,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(ST2, "ST2",colorBrown,styleDots|styleLine|styleNoRescale|styleNoTitle);
  Plot(ST3, "ST3",colorBrown,styleDots|styleLine|styleNoRescale|styleNoTitle);
 
  PlotText(" DC "LastValue(BarIndex())-(numbars/Hts), DCI, colorDarkGrey);
  PlotText(" Buy " ,    LastValue(BarIndex())-(numbars/Hts), BYI, colorLime);
  PlotText(" Target1 " ,    LastValue(BarIndex())-(numbars/Hts), BT1I, colorGreen);
  PlotText(" Target2 " ,    LastValue(BarIndex())-(numbars/Hts), BT2I, colorGreen);
  PlotText(" Target3 " ,    LastValue(BarIndex())-(numbars/Hts), BT3I, colorGreen);
  PlotText(" Sell " ,    LastValue(BarIndex())-(numbars/Hts), SHI, colorRed);
  PlotText(" Target1 " ,    LastValue(BarIndex())-(numbars/Hts), ST1I, colorBrown);
  PlotText(" Target2 " ,    LastValue(BarIndex())-(numbars/Hts), ST2I, colorBrown);
  PlotText(" Target3 " ,    LastValue(BarIndex())-(numbars/Hts), ST3I, colorBrown);
}
 
_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",12,1,20,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode( 0 );
GfxSetOverlayMode(1);
GfxGradientRect(0,0,pxwidth, pxheight, C11, C12 );
GfxSelectFont("Tahoma", Status("pxheight")/C13 );
GfxSetTextColor(colorBrown);
GfxSetTextAlign( 6 );
GfxTextOut( "LTP "+WriteVal(C,1.2), Status("pxwidth")/C14, Status("pxheight")/C15);
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxSetTextColor(colorBrown);
GfxTextOut( " Murali Krishna", Status("pxwidth")/C14, Status("pxheight")/C15*4 );
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
GfxSetTextColor(colorYellow);
GfxTextOut(""+edc+"", Status("pxwidth")/1.15, Status("pxheight")/C15*0.3 );range = 100;//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