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

Trend Magic Modified-DR BHOIR GB for Amibroker (AFL)

Rating:
2 / 5 (Votes 4)
Tags:
amibroker

Non repainting Modified trend magic .
Buy when price above 3 and 13 ema crossover sl is oprating point .(Pink Line )

Similar Indicators / Formulas

Kavach Of Karna v2
Submitted by hbkwarez over 10 years ago
Advanced Elliott Waves
Submitted by MarcosEn over 13 years ago
3_6Day GuaiLiLv
Submitted by motorfly over 13 years ago
Williams Alligator System
Submitted by durgesh1712 over 13 years ago
*Level Breakout system*
Submitted by Tinych over 13 years ago
Horizontal Live Priceline Tool
Submitted by northstar over 13 years ago

Indicator / Formula

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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
_SECTION_BEGIN("MA Cross");
 
e1=EMA(C,3);
e2=EMA(C,13);
 
Plot(e1,"",6,1);
Plot(e2,"",4,1);
 
b1=Cross(e1,e2);
s1=Cross(e2,e1);
Buysetup=Flip(b1,s1);
Shortsetup=Flip(s1,b1);
trend=IIf(BarsSince(Buysetup)<BarsSince(Shortsetup ),1,0);
Col=IIf(trend==1,5,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);
TimeFrameSet( inDaily );
a=(Ref(C,-1)+Ref(C,-2))/2;
b=(Ref(C,-1)+Ref(C,-2)+Ref(C,-3))/3;
q=(a+b)/2;
TimeFrameRestore();
Plot(TimeFrameExpand(q,inDaily),"OP",colorCustom12,styleThick|styleDashed);
 
_SECTION_END();
_SECTION_BEGIN("Signal Panel");
no=10;
res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
s5d=IIf(avn==1,sup,res);
 
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
if (showsl == 1)
{Plot(s5d,"Stop Loss",colorCustom14,styleDots);}
 
exitlong = Cross(s5d, H);
PlotShapes(exitlong * shapeNone, colorBlack,0,H,-10);
exitshort = Cross(L, s5d);
PlotShapes(exitshort * shapeNone, colorBlack,0,L,-15);
 
Buy = exitshort;
Sell = exitlong;
//Short = Sell;
//Cover = Buy;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
//Short = ExRem(Short, Cover);
//Cover = ExRem(Cover, Short);
AlertIf( Buy, "", "Buy @ " + C, 1 );
AlertIf( Sell, "", "Sell @ " + C, 2 );
 
for(i=BarCount-1;i>1;i--)
{
if(Buy[i] == 1)
{
entry = C[i];
sig = "Buy";
sl = s5d[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 = s5d[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, s5d[BarCount-1], Ref(s5d, -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);
 
for (i=bars; i <BarCount;i++)
{
PlotText(""+sig+"@"+entry, BarCount-3,entry,Null,colorBlue);
PlotText("TGT-1@"+tar1,BarCount-4,tar1,Null,Clr);PlotText("TGT-2@"+tar2,BarCount-4,tar2,Null,Clr);PlotText ("TGT-3@"+tar3,BarCount-4,tar3,Null,Clr);
 
}
 
messageboard = ParamToggle("Message Board","Show|Hide",1);
if (messageboard == 1 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
 
if ( sig =="Buy")
{
GfxSelectSolidBrush( colorBlue ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorRed ); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1100;
width = 310;
x = 5;
x2 = 310;
 
y = pxHeight;
 
GfxSelectPen( colorGreen, 5); // broader color
GfxRoundRect( x, y - 142, x2, y , 7, 7 ) ;
GfxTextOut( Name(),12,y-140);
GfxTextOut( " Last Traded Price = "+ C , 08,y- 120 );
GfxTextOut( ( "Signal Panel"),160,y-140);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " Signal came " + (BarCount-bars-1) * Interval()/60 + " mins ago"), 13, y-100) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="Buy",sig + " @ ",sig + " @") + " : " + entry), 13, y-80);
GfxTextOut( ("Trailing Stop Loss : " + sl + " (P/L:" + WriteVal(IIf(sig == "Sell",entry-sl,sl-entry), 2.2) + ")"), 13, y-60);
GfxTextOut( ("TGT:1 : " + tar1), 13, y -40);
GfxTextOut( ("Current Profit/Loss : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 40, y-22);;
 
}
_SECTION_END();
 
_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, vkunisetty@yahoo.com//
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite ); 
GfxSetTextColor( ParamColor("Color",colorGreen) );
Hor=Param("Horizontal Position",350,1,1200,1);
Ver=Param("Vertical Position",1,1,830,1);
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Times New Roman", 11, 700, True );
GfxSetBkMode( colorWhite ); 
GfxSetTextColor(ParamColor("Color",colorGreen) );
GfxTextOut(""+DD+"  ("+xx+"%)", Hor , Ver+45 );
_SECTION_END();
_SECTION_BEGIN("Background text");
SetChartBkColor(colorWhite);
strWeekday = StrMid("---sunday---Monday--TuesdayWednesday-Thursday--Friday--Saturday", SelectedValue(DayOfWeek())*9,9);
GraphXSpace=Param("GraphXSpace",0,-55,200,1);
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(transparent=1);
GfxSetOverlayMode(1);
GfxSelectFont("Candara", Status("pxheight")/C13 );
GfxSetTextAlign( 6 );
GfxSetTextColor( ColorRGB (217,217,213));
GfxTextOut( Name(), Status("pxwidth")/C14, Status("pxheight")/C15 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxSetTextColor( ColorRGB (103,103,103));
GfxTextOut( "By", Status("pxwidth")/C14, Status("pxheight")/C15*2.5 );
GfxSelectFont("Candara", Status("pxheight")/C13*0.5 );
GfxSetTextColor( ColorRGB (103,103,103));
GfxTextOut( "DR BHOIR G B", Status("pxwidth")/C14, Status("pxheight")/C15*4 );
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
_SECTION_END();
/* Done      by    Rajandran R */
 
/* Author of www.marketcalls.in  */
 
 
 
_SECTION_BEGIN("Trend Magic");
 
SetBarsRequired(100000,0);
 
GraphXSpace = 15;
 
SetChartOptions(0,chartShowArrows|chartShowDates);
 
SetChartBkColor(ParamColor("bkcolor",ColorRGB(0,0, 0)));
 
GfxSetBkMode(0);
 
GfxSetOverlayMode(1);
 
SetBarFillColor(IIf(C>O,ParamColor("Candle UP Color", colorGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
 
Plot(C,"\nPrice",IIf(C>O,ParamColor("Wick UP Color", colorDarkGreen),IIf(C<=O,ParamColor("Wick Down Color", colorDarkRed),colorLightGrey)),64,0,0,0,0);
 
 
 
//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 ) ) ));
 
 
 
iCCI=Param("CCI Period",50,1,100,1);
Multiplier = Param("Multiplier",2,1,10,1);
 
 
Pd=Param("ATR Periods",5,1,10,1);
 
price = (O+H+L)/3;
 
iATR = ATR(Pd);
CCIvalue = CCIa(price,iCCI);
 
for (i = 0; i <iCCI+1; i++) {
 
      TrendUp[i] = Null;
 
      TrendDown[i] = Null;
}
 
TrendUp[BarCount-1]=Null;
TrendDown[BarCount-1]=Null;
 
for (i = iCCI+1; i <BarCount-1; i++) {
 
      TrendUp[i] = Null;
 
      TrendDown[i] = Null;
 
      
 
//       if (CCIvalue[i]>=0 && CCIvalue[i-1]<0) {
//      TrendUp[i-1]=TrendDown[i-1];
//      }
 
//       if (CCIvalue[i]<=0 && CCIvalue[i-1]>0) {
//      TrendDown[i-1]=TrendUp[i-1];
//      }  
 
       if (CCIvalue[i] >= 0)
      {
         TrendUp[i] = (High[i]+Low[i])/2 - Multiplier*iATR[i];
         if (TrendUp[i] < TrendUp[i- 1])
            TrendUp[i] = TrendUp[i- 1];
      }
      else
      {
         if (CCIvalue[i] <= 0)
         {
            TrendDown[i] = (High[i]+Low[i])/2 + Multiplier*iATR[i];
            if (TrendDown[i] > TrendDown[i-1])
               TrendDown[i] = TrendDown[i-1];
         }
      }
     
} //end for loop
 
 
 
Plot(TrendUp,"Trend",colorGreen);
 
Plot(TrendDown,"Down",colorRed);
 
 
Buy = IsNull(TrendDown) AND !IsNull(TrendUP);
Sell = IsNull(TrendUp) AND !IsNull(TrendDown);
 
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);
 
 
Title = EncodeColor(colorWhite)+ "DR BHOIR G B Modified Trend Magic " + " - " Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) +
 "  - " + Date() +" - "+"\n" +EncodeColor(colorRed) +"Op-"+O+"  "+"Hi-"+H+"  "+"Lo-"+L+"  "+
"Cl-"+C+"  "+ "Vol= "+ WriteVal(V)+"\n"+
EncodeColor(colorLime)+
WriteIf (Buy , " GO LONG / Reverse Signal at "+C+"  ","")+
WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+"  ","")+"\n"+EncodeColor(colorYellow)+
WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy  , "Total Profit/Loss for the Last trade Rs."+(SellPrice-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);
 
 
 
_SECTION_END();
 
 
 
_SECTION_BEGIN("Time Left");
 
function GetSecondNum()
 
{
 
Time = Now( 4 );
 
Seconds = int( Time % 100 );
 
Minutes = int( Time / 100 % 100 );
 
Hours = int( Time / 10000 % 100 );
 
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
 
return SecondNum;
 
}
 
RequestTimedRefresh( 1 );
 
TimeFrame = Interval();
 
SecNumber = GetSecondNum();
 
Newperiod = SecNumber % TimeFrame == 0;
 
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
 
SecsToGo = TimeFrame - SecsLeft;
 
 
 
x=Param("xposn",50,0,1000,1);
 
y=Param("yposn",380,0,1000,1);
 
 
 
GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
 
GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );
 
if ( NewPeriod )
 
{
 
GfxSelectSolidBrush( colorYellow );
 
GfxSelectPen( colorYellow, 2 );
 
Say( "New period" );
 
}
 
//GfxRoundRect( x+45, y+40, x-3, y-2, 0, 0 );
 
//GfxSetBkMode(1);
 
GfxSelectFont( "Arial", 14, 700, False );
 
GfxSetTextColor( colorRed );
 
GfxTextOut( "Time Left :"+SecsToGo+"", x, y );
 
_SECTION_END();

1 comments

1. pareshJ

Hello

for Sell parameters?

at charts buy n sell arrows and Message board are difference!
so trade as per message?

i m new at ami.. pls help

thx
pareshJ

Leave Comment

Please login here to leave a comment.

Back