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

percentage expo for Amibroker (AFL)

Rating:
3 / 5 (Votes 7)
Tags:
trading system, amibroker, exploration

percentage explore as u wish plus and minus with
daily,privday,weekly,monthly,qurtly,halfyearly,yearly,towyear,3year and five year and daily 3 plus and minus fix and switchable and buy sell screener with pivot…hope u all enjoy trading….(daily parameter preferd)..

Similar Indicators / Formulas

20 Day High Breakout
Submitted by ashokram1 over 13 years ago
Range Constriction
Submitted by davidh over 13 years ago
BULLISH SCAN
Submitted by moon almost 12 years ago
Three Line Net Bar And Tendency
Submitted by moapereira over 14 years ago
2 Day RSI filter/buy
Submitted by davemmm almost 15 years ago
Hilbert study
Submitted by realkaka almost 15 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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
NormalCandle=ParamToggle("Plot Normal Candle", "No,Yes", 1 );
_SECTION_BEGIN("Linear Regression Channel");
//CyberMan's Linear Regression Channel.
font = ParamToggle("font","Show|Hide",1);
plus= Param("plus", 2,0,52,1);
Minus = Param("Minus", -2,-15,-1,-20);
//Linear Regression Line with 2 Standard Deviation Channels Plotted Above and Below
//The original was written by Patrick Hargus, with critical hints from Marcin Gorzynski, Amibroker Technical Support
//Wysiwyg coded the angle in degrees part
//I modified the original Linear Regression code so that the line will change color based on the degree of the Linear Regression slope.
//I combine this with my trading system.
//When my system gives an entry signal I look at the Linear Regression Line and I will only take long positions if the Linear Regression line is green and the entry price is below the LR line.
//When my system gives an entry signal I look at the Linear Regression Line and I will only take short positions if the Linear Regression line is red and the entry price is above the LR line.
//It is usefull for filtering out lower probability trades.
 
 
//================================================Start Chart Configuration============================================================================
 
SetChartOptions(0,chartShowArrows|chartShowDates);
//_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
//SetChartBkGradientFill(ParamColor("Top", colorTeal), ParamColor("Bottom", colorLightGrey), ParamColor("Title", colorTeal));
//SetChartBkColor(colorTeal);
 
 
//SetForeign(Vr);
 
p = Param("p",5,2,100,1);
 
_SECTION_BEGIN("Trend Lines");
p1 = Param("TL 1 Periods", 20, 5, 50, 1);
p2 = Param("TL 2 Periods", 5, 3, 25, 1);
TL1 = LinearReg(C, p1);
TL2 = EMA(TL1, p2);
Col1 = IIf(TL1 > TL2, ParamColor("TL Up Colour", colorGreen), ParamColor("TL Dn Colour", colorRed));
 
Plot(TL1, "TriggerLine 1", Col1, styleLine|styleThick|styleNoLabel);
Plot(TL2, "TriggerLine 2", Col1, styleLine|styleThick|styleNoLabel);
_SECTION_END();
 
Om=DEMA(O,p);
hm=DEMA(H,p);
lm=DEMA(L,p);
Cm=DEMA(C,p);
HAC=(Om+Hm+Lm+Cm)/4;
//HaC =(O+H+L+C)/4;
HaO = AMA( Ref( HaC, -1 ), 0.5 );
HaH = Max( H, Max( HaC, HaO) );
HaL = Min( L, Min( HaC, HaO) );
HAClose=(Om+Hm+Lm+Cm)/4;
//HaC =(O+H+L+C)/4;
HaOpen = AMA( Ref( HaC, -1 ), 0.5 );
HaHigh = Max( H, Max( HaC, HaO) );
HaLow = Min( L, Min( HaC, HaO) );
BG3=HHV(LLV(HaL,4)+ATR(4),8);
BR3=LLV(HHV(HaH ,4)-ATR(4),8);
 
co = IIf(Hac>BG3 ,colorBrightGreen,IIf(Hac < BR3,colorRed,colorGrey50));
Plot(4, "", Co,styleArea+styleOwnScale | styleNoLabel, -1, 100);
RestorePriceArrays();
if(NormalCandle==1  )
{
  PlotOHLC( Hac, Hao, Hah, Hal, " " , co, styleCandle | styleThick );
}
else
{
PlotOHLC( Open, High, Low, Close, " " ,co, styleCandle | styleThick );
 
}
 
//p1 = Param("TL 1 Periods", 20, 5, 50, 1);
//p2 = Param("TL 2 Periods", 5, 3, 25, 1);
//TL1 = LinearReg(C, p1);
//TL2 = EMA(TL1, p2);
//Plot( C, "Close", colorWhite, styleCandle, Zorder = 1);
//SetChartOptions(0,chartShowArrows | chartShowDates);
 
//================================================End Chart Configuration===============================================================================
 
 
//====================================Start of Linear Regression Code==================================================================================
 
P = ParamField("Price field",-1);
 
Length = 150;
 
Daysback = Param("Period for Liner Regression Line",Length,1,240,1);
shift = Param("Look back period",0,0,240,1);
 
//=============================== Math Formula ========================================================================================================
 
x = Cum(1);
lastx = LastValue( x ) - shift;
aa = LastValue( Ref(LinRegIntercept( p, Daysback), -shift) );
bb = LastValue( Ref(LinRegSlope( p, Daysback ), -shift) );
y = Aa + bb * ( x - (Lastx - DaysBack +1 ) );
 
//==================Plot the Linear Regression Line ====================================================================================================
 
LRColor = ParamColor("LR Color", colorCycle );
LRStyle = ParamStyle("LR Style");
 
LRLine =  IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
 
LRStyle = ParamStyle("LR Style");
Angle = Param("Angle", 0.05, 0, 1.5, 0.01);// A slope higher than 0.05 radians will turn green, less than -0.05 will turn red and anything in between will be white.
 
LRLine = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
 
Pi = 3.14159265 * atan(1); // Pi
SlopeAngle = atan(bb)*(180/Pi);
 
LineUp = SlopeAngle > Angle;
LineDn = SlopeAngle < - Angle;
 
if(LineUp)
{
Plot(LRLine, "Lin. Reg. Line Up", IIf(LineUp, colorBrightGreen, colorWhite), LRStyle);
}
else
{
Plot(LRLine, "Lin. Reg. Line Down", IIf(LineDn, colorDarkRed, colorWhite), LRStyle);
}
 
//==========================  Plot 1st SD Channel ======================================================================================================
 
SDP = Param("Standard Deviation", 1.5, 0, 6, 0.1);
SD = SDP/2;
 
width = LastValue( Ref(SD*StDev(p, Daysback),-shift) ); //Set width of inside chanels here.
SDU = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width , Null ) ;
SDL = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width , Null ) ;
 
SDColor = ParamColor("SD Color", colorCycle );
SDStyle = ParamStyle("SD Style");
 
Plot( SDU , "Upper Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
Plot( SDL , "Lower Lin Reg", colorWhite,SDStyle ); //Inside Regression Lines
 
//==========================  Plot 2d SD Channel ========================================================================================================
 
SDP2 = Param("2d Standard Deviation", 2.0, 0, 6, 0.1);
SD2 = SDP2/2;
 
width2 = LastValue( Ref(SD2*StDev(p, Daysback),-shift) ); //Set width of outside chanels here.
SDU2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width2 , Null ) ;
SDL2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width2 , Null ) ;
 
SDColor2 = ParamColor("2 SD Color", colorCycle );
SDStyle2 = ParamStyle("2 SD Style");
 
Plot( SDU2 , "Upper Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
Plot( SDL2 , "Lower Lin Reg", colorWhite,SDStyle2 ); //OutSide Regression Lines
 
Trend = IIf(LRLine > Ref(LRLine,-1),colorGreen,colorRed);//Changes LR line to green if sloping up and red if sloping down.
 
Plot( LRLine , "LinReg", Trend, LRSTYLE );
 
//============================ End Indicator Code =========
_SECTION_BEGIN("Unnamed 1");
 
 
threshold = 5;
uptrend = StochK(39,3) > StochD(39,3,3);
downtrend =StochK(39,3) < StochD(39,3,3);
 
Buy = uptrend AND H >= Ref(H,-1) + threshold; BuyPrice = Max(O,Ref(H,-1) + threshold);
Sell = downtrend AND L <= Ref(L,-1) - threshold; SellPrice = Min(O,Ref(L,-1) - threshold);
 
 
 
 
Short=Sell;
Cover=Buy;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
//Buy=Cross(Avg,MA(C,30));
//Sell=Cross(MA(C,30),Avg);
prch = (C- TimeFrameGetPrice( "C", inDaily, -1 ))/ TimeFrameGetPrice( "C", inDaily, -1 )*100 ;
prcha= (C-Ref(C,-6))/Ref(C,-6)*100;
prche= (C-Ref(C,-2))/Ref(C,-1)*100;
prch5=(prche-prch);
prch6= (C-Ref(C,-5))/Ref(C,-5)*100;
prch7= (C-Ref(C,-29))/Ref(C,-29)*100;
prch8= (C-Ref(C,-87))/Ref(C,-87)*100;
prch9= (C-Ref(C,-150))/Ref(C,-150)*100;
prch10= (C-Ref(C,-245))/Ref(C,-245)*100;
prch11= (C-Ref(C,-490))/Ref(C,-490)*100;
prch12= (C-Ref(C,-735))/Ref(C,-735)*100;
prch13= (C-Ref(C,-1225))/Ref(C,-1225)*100;
 
col=IIf ((Volume > 1.25 * EMA( Volume, 34 )),colorRed,colorLime);
 
Filter = prch > plus OR prch  < Minus  ;
//Filter = prch6 <3 OR prch6  <-3 ;
AddColumn(Close,"Close",1.2,colorDefault, Col);
AddColumn(prch5,"prviday", 1.2,colorDefault, Col); 
AddColumn(prch,"daily", 1.2,colorDefault, Col);
AddColumn(Volume,"Volume",1.0, colorDefault, IIf ((Volume > 1.25 * EMA( Volume, 34 )),colorLightBlue,colorLime));
AddColumn( IIf( Buy, 66 , 83 ), "Signal", formatChar, colorDefault, IIf( Buy , colorGreen, colorRed ) );
 
AddColumn(prch6,"weekly", 1.2,colorDefault, Col);
AddColumn(prch7,"monthly", 1.2,colorDefault, Col);
AddColumn(prch8,"qutrly", 1.2,colorDefault, Col);
AddColumn(prch9,"halfyly", 1.2,colorDefault, Col);
AddColumn(prch10,"yearly", 1.2,colorDefault, Col);
AddColumn(prch11,"twoyrly", 1.2,colorDefault, Col);
AddColumn(prch12,"thirdyrly", 1.2,colorDefault, Col);
AddColumn(prch13,"fiveyrly", 1.2,colorDefault, Col);
 
 
PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorWhite, colorYellow ) );
 
for( i = 0; i < BarCount; i++ )
{
 if( Buy[i] )
 {
 
OUTcolor = ParamColor("Outer Panel Color",colorTeal);
INUPcolor = ParamColor("Inner Panel Upper",colorDarkGrey);
INDNcolor = ParamColor("Inner Panel Lower",colorDarkOliveGreen);
TitleColor = ParamColor("Title Color ",colorBlack);
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
}
if( Sell[i] )
{
OUTcolor = ParamColor("Outer Panel Color",colorTeal);
INUPcolor = ParamColor("Inner Panel Upper2",colorDarkTeal);
INDNcolor = ParamColor("Inner Panel Lower2",colorPlum);
TitleColor = ParamColor("Title Color ",colorBlack);
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
}
}
 
if(font==0)
{
_SECTION_BEGIN("Name");
GfxSetOverlayMode(0);
GfxSelectFont("Tahoma", Status("pxheight")/8 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxTextOut("" , Status("pxwidth")/2, Status("pxheight")/4 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxSelectFont("Tahoma", Status("pxheight")/36 );
GfxTextOut( "", Status("pxwidth")/2, Status("pxheight")/3 );
_SECTION_END();
 
//Magfied Market Price
FS=Param("Font Size",72,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode(0); // transparent
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
Hor=Param("Horizonta Position",615,1,1200,1);
Ver=Param("Vertica Position",152,1,830,1);
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
FS2=Param("Font Size2",35,11,100,1);
GfxSelectFont("Times New Roman", FS2,11, 700, True );
GfxSetBkMode( colorBlack );
Hor1=Param("Horizontal Position",615,1,1200,1);
Ver1=Param("Vertical Position",188,1,830,1);  
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxTextOut(""+DD+"  ("+xx+"%)", Hor1 , Ver1+45 );
}
else
{{
//Magfied Market Price
fse=Param("Font Sizee",35,11,100,1);
GfxSelectFont("Times New Roman", fse, 700, True );
GfxSetBkMode( colorGold ); 
GfxSetTextColor( ParamColor("Color",colorGold) );
Hora=Param("Horizontal Positiona",525,1,1200,1);
Vera=Param("Vertical Positiona",17,1,830,1);
GfxTextOut(""+C, Hora , Vera );
YCa=TimeFrameGetPrice("C",inDaily,-1);
DDa=Prec(C-YCa,2);
xxa=Prec((DDa/YCa)*100,2);
FSb=Param("Font Sizeb",16,11,100,1);
GfxSelectFont("Times New Roman",fsb, 700, True );
GfxSetBkMode( colorBlack ); 
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DDa+"  ("+xxa+"%)", Hora , Vera+45 );
 _SECTION_END();
}}
 
 
 
SellPrice=ValueWhen(Sell,C,1);
BuyPrice=ValueWhen(Buy,C,1);
Long=Flip(Buy,Sell);
Shrt=Flip(Sell,Buy );
Edc=(
WriteIf (Buy AND Ref(shrt,-1), " BUY @ "+C+"  ","")+
WriteIf (Sell AND Ref(Long,-1), " SEll @ "+C+"  ","")+
WriteIf(Sell , "Last Trade Profit Rs."+(C-BuyPrice)+"","")+
WriteIf(Buy  , "Last Trade Profit Rs."+(SellPrice-C)+"",""));
 
//============== TITLE ==============
 
 
 
_SECTION_BEGIN("Tops and bottom");
 
pd = Param("Periods",13,5,144,1);
pds = 2*pd-1;//     (Adjustment for Wilders MA)
aa = Close-Ref(Close,-1);
uu = EMA(Max(0,aa),pds);
dd=  EMA((Max(0,0-aa)),pds);
 
rf = IIf(C>2,1000,10000);
 
c1 = Param("Upper Level",70,50,90,1);
qq1 =100/(100-c1)-1;
ff1 = qq1*dd-uu;
ff2 = ff1/qq1;
f1 = Max(ff1,ff2);
UL = Close + f1*(pds-1)/2;
UL = IIf(UL>C,floor(UL*rf),ceil(UL*rf))/rf;
 
c2 = Param("Equilibrium",50,50,50,0); 
qq2 =100/(100-c2)-1;// [=1]
ff = dd-uu;
MM = Close + ff*(pds-1)/2;
MM = IIf(MM>C,floor(MM*rf),ceil(MM*rf))/rf;
 
c3 = Param("Lower Level",30,10,50,1);
qq3 =100/(100-c3)-1;
ff1 = qq3*dd-uu;
ff2 = ff1/qq3;
f3 = Min(ff1,ff2);
LL = Close + f3*(pds-1)/2;
LL = IIf(LL>C,floor(LL*rf),ceil(LL*rf))/rf;
 
band = Param("band width",4,0,15,0.25);
mmu = MM+band;
mmd = MM-band;
 
_SECTION_BEGIN("Pivot calc");
 
TimeFrameSet( in15Minute*2 );
DH=Ref(H,-1);
DL=Ref(L,-1);
DC=Ref(C,-1);
 
 
pd = ( DH+ DL + DC )/3;
sd1 = (2*pd)-DH;
sd2 = pd -(DH - DL);
sd3 = Sd1 - (DH-DL);
rd1 = (2*pd)-DL;
rd2 = pd +(DH -DL);
rd3 = rd1 +(DH-DL);
 
 
 
_SECTION_BEGIN("Title");
no=Param( "Swing", 6, 1, 55 );
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);
tsl=IIf(avn==1,sup,res);
dec = (Param("Decimals",2,0,7,1)/10)+1;
if( Status("action") == actionIndicator )
(
Title = EncodeColor(55)+  Title = Name() + "     " + EncodeColor(32) + Date() +
"      " + EncodeColor(5) + "{{INTERVAL}}  " +
    EncodeColor(55)+ "     Open = "+ EncodeColor(52)+ WriteVal(O,dec) +
    EncodeColor(55)+ "     High = "+ EncodeColor(5) + WriteVal(H,dec) +
    EncodeColor(55)+ "      Low = "+ EncodeColor(32)+ WriteVal(L,dec) +
    EncodeColor(55)+ "    Close = "+ EncodeColor(52)+ WriteVal(C,dec)+
    EncodeColor(55)+ "    Volume = "+ EncodeColor(52)+ WriteVal (V ,1.25)
 
 
 
 
+"\n"+EncodeColor(colorBrightGreen)+
 
WriteIf (Buy , "Signal: Go Long - Entry Price: "+WriteVal(C)+" - Traget: "+WriteVal((BuyPrice-tsl)+BuyPrice)
 
+" - StopLoss:"+WriteVal(tsl)+"  "
 
,"")+
 
"\n"+EncodeColor(colorRed)+
WriteIf (Sell , "Signal: Go Short - Entry Price: "+WriteVal(C)+" - Target: "+WriteVal((tsl-SellPrice)-SellPrice)+" - StopLoss:"+WriteVal(tsl)+" ","")+
EncodeColor(colorTurquoise)+
WriteIf(Long AND NOT Buy, "Trade: Long - Entry Price: "+WriteVal((BuyPrice))+" - Profit: "+WriteVal((C-BuyPrice))+" "+EncodeColor(colorLime)+"Let your profit runs!","")+
EncodeColor(colorLightOrange)+
WriteIf(shrt AND NOT Sell, "Trade: Short - Entry Price: "+WriteVal((SellPrice))+" - Profit: "+WriteVal((SellPrice-C))+"  - "+EncodeColor(colorLime)+"Let your profit runs!","")+
 
EncodeColor(colorBrightGreen)+   "
 
 
\n R3 : "+
EncodeColor(colorWhite)+RD3+
EncodeColor(colorBrightGreen)+   "\n R2 : "+
EncodeColor(colorWhite)+RD2+
EncodeColor(colorBrightGreen)+   "\n R1 : " +
EncodeColor(colorWhite)+RD1 +
EncodeColor(colorBrightGreen)+  "     UP TGT   : "+
EncodeColor(colorWhite)+UL+
EncodeColor(colorBlue)+   "\n Pivot : "+
EncodeColor(colorWhite)+pd+
EncodeColor(colorBlue)+   "    MIDPOINT : "+
EncodeColor(colorWhite)+MM+
EncodeColor(colorRed)+   "\n S1 : "+
EncodeColor(colorWhite)+SD1   +
EncodeColor(colorRed)+    "     BOT TGT  : "+
EncodeColor(colorWhite)+LL+
EncodeColor(colorRed)+   "\n S2 : "+
EncodeColor(colorWhite)+SD2+
EncodeColor(colorRed)+   "\n S3 : "+
EncodeColor(colorWhite)+SD3
 
 
 
);
_SECTION_END();
 
 
PlotShapes(IIf(Sell, shapeStar, shapeNone),colorGold, 0, H, Offset=15);
PlotShapes(IIf(Buy, shapeStar, shapeNone),colorWhite, 0,L, Offset=-15);
/*
dist = 4.5*ATR(10);
 
for( i = 0; i < BarCount; i++ )
{
 
if( Buy[i] ) PlotText( "Buy @ \n"+C[i] , i, L[ i ]-dist[i], colorBlack,colorGreen );
if( Sell[i] ) PlotText( "Sell@ \n"+C[i], i, H[ i ]+dist[i], colorBlack, colorRed );
//if( Buy[i] ) PlotText( "B" , i, L[ i ]-dist[i], colorBlack,colorGreen );
//if( Sell[i] ) PlotText( "S" , i, H[ i ]+dist[i], colorBlack, colorRed );
if( Buy[i]  ) PlotText( "Top" , i, C[ i ]+dist[i], colorGreen, colorBlack );
if( Sell[i] ) PlotText( "Bottom", i, C[ i ]-dist[i], colorRed, colorBlack );
 }
*/
 
_SECTION_BEGIN("Multiple Ribbon ");
// You plot a Ribbon by calling the function as follows: MultiRibbon("Color", "Ribbon Number", "Name To Display");
// The "Ribbon Number" is simply the order of the ribbon, starting with 1 as the bottom Ribbon. You can add as many
// ribbons as you want, until you run out of chart space. Just keep track of the 'Serial Number' (Ribbon Number). :-)
 
 
RibbonThickness = Param("Ribbon Thickness", 4, 1, 15, 0.1);
Font                = ParamList("Font:","Arial|Calibri|Futura|Tahoma|Times New Roman");
"";
function GfxConvertBarToPixelX(Bar)
{
 lvb = Status("lastvisiblebar"); fvb = Status("firstvisiblebar");
 pxchartleft = Status("pxchartleft"); pxchartwidth = Status("pxchartwidth");
 return pxchartleft + Bar  * pxchartwidth / (Lvb - fvb + 1);
}
 
procedure MultiRibbon(RibbonColor, Position, Label)
{
 LineColor  = colorLightGrey;
 Position   = RibbonThickness * Position;
 x2 = Status("pxchartright");
 y2 = Status("pxchartbottom");
 
 RibbonColor = IIf(GfxConvertBarToPixelX(BarIndex()-Status("firstvisiblebarindex")) > y2/1.5 * (RibbonThickness/100) * 18 , RibbonColor, colorYellow);
 
 Plot(0, "", LineColor, styleOwnScale | styleNoLabel, 0, 100);
 Plot(Position, "", LineColor, styleOwnScale | styleNoLabel, 0, 100);
 Plot(Position, "", RibbonColor, styleArea | styleOwnScale | styleNoLabel, 0, 100);
 
 GfxSetTextColor(colorBlack);
 GfxSelectFont(Font, y2/1.5 * (RibbonThickness/100), 400);
 GfxDrawText(Label, 8, y2 * 1.001 -(y2 * Position/100) , y2/1.5 * (RibbonThickness/100) * 17, y2, 2 + 32 + 256);
  
}
 
//============================================pl color=======================
PL = (H + C+ L)/3;
r1 = IIf (MA(pl,3) >Ref(MA(pl,3),-1),colorGreen,colorRed);
//---------------------------------------------------------------------------
 
 
 
 
//==========================================RSI BB===========================
RSI21 = EMA(RSI(21),5);
 
r2 = IIf (RSI21 >BBandTop(RSI21,5,0.5),colorGreen,IIf (RSI21 <BBandBot(RSI21,5,0.5),colorRed,colorYellow));
//---------------------------------------------------------------------------
 
 
 
 
//========================================Macd BB ==============================
 
r3 = IIf (MACD(3,34) >BBandTop(MACD(3,34),5,0.5),colorGreen,IIf (MACD(3,34) <BBandBot(MACD(3,34),5,0.5),colorRed,colorYellow));
//---------------------------------------------------------------------------
 
 
 
 
//========================================ADX quick ==============================
r4 = IIf(Buy > Sell,colorGreen,colorRed);
 
/*
EMA21 = IIf (MACD(34,55) >Ref(MACD(34,55),-1),colorGreen,colorRed);
EMA34 = IIf (MACD(55,89) >Ref(MACD(55,89),-1),colorGreen,colorRed);
EMA55 = IIf (MACD(3,34) >Ref(MACD(3,34),-1),colorGreen,colorRed);
*/
EMA21 = IIf(PDI(5) > MDI(5),colorGreen,colorRed);
EMA34 = IIf(PDI(9) > MDI(9),colorGreen,colorRed);
 
//========================================ADX trend ==============================
 
r6 = IIf(Buy > Sell,colorGreen,colorRed);
 
//---------------------------------------------------------------------------
 
 
MultiRibbon(r6, 1, "adx")+ADX(7);
MultiRibbon(EMA34, 2, "ema-34")+EMA(pl,34);
MultiRibbon(EMA21, 3, "ema-21")+EMA(pl,21);
MultiRibbon(r4, 4, "PDI-MDI");
MultiRibbon(r3, 5, "Macd - BB");
MultiRibbon(r2, 6, "RSI-BB");
MultiRibbon(r1, 7, "PL color");
 
 
//==================interpretation============================
 
WriteIf(EMA( Close,13)>EMA( Close,39),"EMA says : UP TREND \n EMA -50 SL of "+ WriteVal(EMA(Close,50)),"EMA says : DOWN TREND \n  EMA "+ WriteVal(EMA(Close,50)));
WriteIf (Trix( 9 ) > Ref( Trix( 9 ) , -1 ),"\n TRIX =" + WriteVal(Trix( 9 ))+ " : UP","\n TRIX =" + WriteVal(Trix( 9 ))+"   : DOWN");
WriteIf (MACD( 12, 26 ) > Ref( MACD( 12, 26 ) , -1 ), "MACD ="+ WriteVal(MACD( 12, 26 ))+ " : UP","MACD ="+ WriteVal(MACD( 12, 26 ))+ " : DOWN");
WriteIf(ADX( 9 ) > Ref( ADX( 9 ) , -1 ),"ADX ="+WriteVal (ADX(9))+"   :TREND-ING","ADX ="+WriteVal (ADX(9))+"   : ----");
WriteIf (RSI( 7 ) > Ref( RSI(7) , -1 ), "RSI ="+ WriteVal(RSI( 7))+ " : UP","RSI ="+ WriteVal(RSI( 7))+ " : DOWN");
WriteIf (CCI( 10 ) > Ref( CCI(10) , -1 ), "CCI ="+ WriteVal(CCI( 10))+ " : UP","CCI ="+ WriteVal(CCI( 10))+ " : DOWN");
WriteIf(StochK( 14)< Ref (StochK( 14),1) ,"stochastic ="+WriteVal (StochK(14))+" : UP " ,"stochastic ="+WriteVal (StochK( 14))+" : DOWN ");
"";
WriteIf (Close > SAR( 0.02, 0.2 ),"SAR says : go LONG at "+Close+" \n with a Stop-Loss = " + WriteValSAR( 0.02, 0.2 )),"SAR says : go Short at "+Close+"\n with a Stop-Loss = " + WriteValSAR( 0.02, 0.2 )));

2 comments

1. satish1b

not working in amibroker 5.5

2. anandnst

Good Effort n thanx you

Leave Comment

Please login here to leave a comment.

Back