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

NEERU KALA 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
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
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("xtl");
 
SetChartBkColor(ParamColor("Outer panel color ",colorLightGrey));
tgt = 37;
a = CCI(20) < -tgt;
b = CCI(20) > tgt;
state = IIf(a>b,-1,IIf(a==b,0,1));
Color = IIf(state == 0, colorBlue, IIf(state == 1, colorGreen, IIf(state == -1, colorRed, 0)));
 
//Plot(state, "", color, styleHistogram);
 
SetChartOptions( 0, chartShowDates | chartShowArrows | chartLogarithmic | chartWrapTitle );
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", color, styleNoTitle |styleBar|styleThick);
  
 
  
 
_SECTION_BEGIN("pivots mw");
SetChartBkColor(2) ;
k=IIf(ParamList("select type","daily|next day")=="daily",-1,0);
k1=-1;
TimeFrameSet(inDaily);
day_h= LastValue(Ref(H,K));
day_l= LastValue(Ref(L,K));
day_c= LastValue(Ref(C,K));
TimeFrameRestore();
  
TimeFrameSet(inWeekly);
Week_h= LastValue(Ref(H,K1));
Week_l= LastValue(Ref(L,K1));;
Week_c= LastValue(Ref(C,K1));;
TimeFrameRestore();
  
TimeFrameSet(inMonthly);
month_h= LastValue(Ref(H,K1));
month_l= LastValue(Ref(L,K1));
month_c= LastValue(Ref(C,K1));
TimeFrameRestore();
  
/*--------------------------------------*/
// day
DH=Day_h;
DL=Day_L;
DC=Day_C;
  
// DAY PIVOT Calculation
pd = ( DH+ DL + DC )/3;
sd1 = (2*pd)-DH;
sd2 = pd -(DH - DL);
sd3 = Sd1 - (DH-DL);
sd4 = Sd2 - (DH-DL);
sd5 = Sd3 - (DH-DL);
rd1 = (2*pd)-DL;
rd2 = pd +(DH -DL);
rd3 = rd1 +(DH-DL);
rd4 = rd2 +(DH-DL);
rd5 = rd3 +(DH-DL);
dp=pd;
// week
WH=Week_h;
WL=Week_l;
WC=Week_c;
  
// WEEK PIVOT Calculation
pw = ( WH+ WL + WC )/3;
sw1 = (2*pw)-WH;
sw2 = pw -(WH - WL);
sw3 = Sw1 - (WH-WL);
sw4 = Sw2 - (WH-WL);
rw1 = (2*pw)-WL;
rw2 = pw +(WH -WL);
rw3 = rw1 +(WH-WL);
rw4 = rw2 +(WH-WL);
  
  
// month
MH=month_h;
ML=month_l;
MC=month_c;
  
// MONTH PIVOT Calculation
pm = ( MH+ ML + MC )/3;
sm1 = (2*pm)-MH;
sm2 = pm -(MH - ML);
sm3 = Sm1 - (MH-ML);
rm1 = (2*pm)-ML;
rm2 = pm +(MH -ML);
rm3 = rm1 +(MH-ML);
  
ppl = ParamToggle("Plot Pivot Levels","Off|On",1);
numbars = LastValue(Cum(Status("barvisible")));
fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
hts = Param("slide all",33,-1000,1000,1);
  
  
{
if(ppl==1) {
Plot(pd,"",colorPink,styleLine|styleDots|styleThick|styleNoRescale);
Plot(sd1,"",colorPink,styleDashed|styleNoRescale);
Plot(sd2,"",colorPink, styleDashed|styleNoRescale);
Plot(sd3,"",colorPink, styleDashed|styleNoRescale);
Plot(sd4,"",colorPink, styleDashed|styleNoRescale);
Plot(sd5,"",colorPink, styleDashed|styleNoRescale);
Plot(rd1,"",colorPink, styleDashed|styleNoRescale);
Plot(rd2,"",colorPink, styleDashed|styleNoRescale);
Plot(rd3,"",colorPink, styleDashed|styleNoRescale);
Plot(rd4,"",colorPink, styleDashed|styleNoRescale);
Plot(rd5,"",colorPink, styleDashed|styleNoRescale);
  
Plot(pw,"",colorGreen,styleLine|styleDots|styleThick|styleNoRescale);
Plot(sw1,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(sw2,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(sw3,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(sw4,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(rw1,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(rw2,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(rw3,"",colorDarkGreen, styleDashed|styleNoRescale);
Plot(rw4,"",colorDarkGreen, styleDashed|styleNoRescale);
  
  
Plot(pm,"",colorViolet,styleLine|styleDots|styleThick|styleNoRescale);
Plot(sm1,"",colorViolet, styleDashed|styleNoRescale);
Plot(sm2,"",colorViolet, styleDashed|styleNoRescale);
Plot(sm3,"",colorViolet, styleDashed|styleNoRescale);
Plot(rm1,"",colorViolet, styleDashed|styleNoRescale);
Plot(rm2,"",colorViolet, styleDashed|styleNoRescale);
Plot(rm3,"",colorViolet, styleDashed|styleNoRescale);
  
i=1;
  
PlotText(" D-PVT = " + WriteVal(pd,fraction), LastValue(BarIndex())-(numbars/Hts), dp, colorPink);
PlotText(" DR1 = " + WriteVal(rd1,fraction), LastValue(BarIndex())-(numbars/Hts), rd1 , colorPink);
PlotText(" DS1 = " + WriteVal(sd1,fraction), LastValue(BarIndex())-(numbars/Hts), sd1 , colorPink);
PlotText(" DR2 = " + WriteVal(rd2,fraction), LastValue(BarIndex())-(numbars/Hts), rd2 , colorPink);
PlotText(" DS2 = " + WriteVal(sd2,fraction), LastValue(BarIndex())-(numbars/Hts), sd2 , colorPink);
PlotText(" DR3 = " + WriteVal(rd3,fraction), LastValue(BarIndex())-(numbars/Hts), rd3 , colorPink);
PlotText(" DS3 = " + WriteVal(sd3,fraction), LastValue(BarIndex())-(numbars/Hts), sd3 , colorPink);
PlotText(" DR4 = " + WriteVal(rd4,fraction), LastValue(BarIndex())-(numbars/Hts), rd4 , colorPink);
PlotText(" DS4 = " + WriteVal(sd4,fraction), LastValue(BarIndex())-(numbars/Hts), sd4 , colorPink);
PlotText(" DR5 = " + WriteVal(rd4,fraction), LastValue(BarIndex())-(numbars/Hts), rd5 , colorPink);
PlotText(" DS5 = " + WriteVal(sd4,fraction), LastValue(BarIndex())-(numbars/Hts), sd5 , colorPink);
  
PlotText(" W-PVT = " + WriteVal(pw,fraction), LastValue(BarIndex())-(numbars/Hts), pw , colorGreen);
  
PlotText(" WR1 = " + WriteVal(rw1,fraction), LastValue(BarIndex())-(numbars/Hts), rw1 , colorGreen);
PlotText(" WS1 = " + WriteVal(sw1,fraction), LastValue(BarIndex())-(numbars/Hts), sw1 , colorGreen);
PlotText(" WR2 = " + WriteVal(rw2,fraction), LastValue(BarIndex())-(numbars/Hts), rw2 , colorGreen);
PlotText(" WS2 = " + WriteVal(sw2,fraction), LastValue(BarIndex())-(numbars/Hts), sw2 , colorGreen);
PlotText(" WR3 = " + WriteVal(rw3,fraction), LastValue(BarIndex())-(numbars/Hts), rw3 , colorGreen);
PlotText(" WS3 = " + WriteVal(sw3,fraction), LastValue(BarIndex())-(numbars/Hts), sw3 , colorGreen);
PlotText(" WR4 = " + WriteVal(rw4,fraction), LastValue(BarIndex())-(numbars/Hts), rw4 , colorGreen);
PlotText(" WS4 = " + WriteVal(sw4,fraction), LastValue(BarIndex())-(numbars/Hts), sw4 , colorGreen);
  
PlotText(" M-PVT = " + WriteVal(pm,fraction), LastValue(BarIndex())-(numbars/Hts), pm , colorViolet);
  
PlotText(" MR1 = " + WriteVal(rm1,fraction), LastValue(BarIndex())-(numbars/Hts), rm1 ,colorViolet );
PlotText(" MS1 = " + WriteVal(sm1,fraction), LastValue(BarIndex())-(numbars/Hts), sm1 ,colorViolet );
PlotText(" MR2 = " + WriteVal(rm2,fraction), LastValue(BarIndex())-(numbars/Hts), rm2 ,colorViolet);
PlotText(" MS2 = " + WriteVal(sm2,fraction), LastValue(BarIndex())-(numbars/Hts), sm2 , colorViolet);
PlotText(" MR3 = " + WriteVal(rm3,fraction), LastValue(BarIndex())-(numbars/Hts), rm3 , colorViolet);
PlotText(" MS3 = " + WriteVal(sm3,fraction), LastValue(BarIndex())-(numbars/Hts), sm3 , colorViolet);
  
}}
  
//--end----------------------------------------------------------------------------
_SECTION_END();
  
/*--------------------------------------*/
  
// TEXT
"high  = "+H;
"low   =  "+L;
"close = "+C;
  
_SECTION_BEGIN("ATP");
Atp=ParamToggle("ATP","Off|On",1);
if(Atp==1)
{
  
  
DayChange = Day() != Ref(Day(), -1);
AvgTradePrice = Null;
CurDayBars = 0;
CurDayCloseSum = 0;
  
for (i = 0; i < BarCount; i++)
{
if (DayChange[i])
{
CurDayCloseSum = C[i];
CurDayBars = 1;
}
else
{
CurDayCloseSum = CurDayCloseSum + C[i];
CurDayBars++;
}
AvgTradePrice[i] = CurDayCloseSum / CurDayBars;
}
Plot(AvgTradePrice, "AvgTradePrice",colorDarkGrey,styleThick);
ATP=AvgTradePrice;
  
_SECTION_END();}
  
  
  
  
_SECTION_BEGIN("Title");
if( Status("action") == actionIndicator )
(
Title = EncodeColor(colorWhite)+ "Natraj Pivot Chart" + " - " Name() + " - " + EncodeColor(colorBrightGreen)+ Interval(2) + EncodeColor(colorWhite) +
 "  - " + Date() +" - "+"  "+EncodeColor(colorWhite) +"Op-"+O+"  "+"Hi-"+H+"  "+"Lo-"+L+" "+
"Cl-"+C+"  "+ "Vol= "+ WriteVal(V)+ " :: "+EncodeColor(ColorRGB(140,140,140)) + "ATP: "+ATP+"\n" + EncodeColor(ColorRGB(175,90,59)) + "DR1="+rd1+"   "+"DR2="+rd2+"   "+"DR3="+rd3+"   "+"DR4="+rd4+"   "+"DR5="+rd5+"  "+EncodeColor(colorGold) +  "D-Pivot ="+pd+"\n"+
EncodeColor(ColorRGB(73,123,201)) + "DS1="+sd1+"   "+"DS2="+sd2+"   "+"DS3="+sd3+"   "+"DS4="+sd4+"   "+"DS5="+sd5+"\n"+
EncodeColor(colorOrange) + "WR1="+rw1+"   "+"WR2="+rw2+"   "+"WR3="+rw3+"   "+"WR4="+rw4+"   "+EncodeColor(colorYellow) + "W-Pivot = "+pw+"\n"+
EncodeColor(ColorRGB(9,128,250)) + "WS1="+sw1+"   "+"WS2="+sw2+"   "+"WS3="+sw3+"   "+"WS4="+sw4+"\n"+
EncodeColor(ColorRGB(175,96,175)) + "MR1="+rm1+"   "+"MR2="+rm2+"   "+"MR3="+rm3+"  "+EncodeColor(colorYellow) +   "M-Pivot = "+pm+"\n"+
EncodeColor(ColorRGB(25,25,255))  + "MS1="+sm1+"  "+"MS2="+sm2+"   "+"MS3="+sm3);
  
_SECTION_END();
  
  
fsma=ParamToggle("Moving Avg","Off|On",0);
  
if(fsma==1)
{
_SECTION_BEGIN("FAST");
Periods = Param("periods", 15, 2, 300, 1, 10 );
Plot( EMA( C, Periods ),_DEFAULT_NAME(), ParamColor("colorfast",ColorRGB(5,69,140)), styleNoLabel,styleDashed);
_SECTION_END();
  
_SECTION_BEGIN("SLOW");
Periods = Param("periods",30, 2, 300, 1, 10 );
Plot( EMA( C, Periods ), _DEFAULT_NAME(),ParamColor("colorslow", ColorRGB(145,60,55)),styleNoLabel,styleDashed);
  
_SECTION_END();
  
_SECTION_BEGIN("50");
Periods = Param("periods",50, 1, 300, 1);
Plot( EMA( C, Periods ), _DEFAULT_NAME(),ParamColor("colors50", ColorRGB(150,100,50)),styleNoLabel,styleDashed);
  
_SECTION_END();
  
_SECTION_BEGIN("90");
Periods = Param("periods",90, 1, 300, 1);
Plot(MA( C, Periods ), _DEFAULT_NAME(),ParamColor("colors50", ColorRGB(240,190,140)),styleNoLabel,styleDashed);
  
_SECTION_END();}
  
segretribbon= ParamToggle("Ribbon","Off|On",1);
if(segretribbon==1)
{
_SECTION_BEGIN("MID");
  
Periods =Param("periods",34,2,300,1,10);
Plot(EMA(C,Periods),_DEFAULT_NAME(),  ColorRGB(25,25,25),styleNoLabel,styleLine);
_SECTION_END();
  
_SECTION_BEGIN("UL");
Periods = Param("periods", 34, 2, 300, 1, 10 );
Plot( EMA(High, Periods ),_DEFAULT_NAME(), ColorRGB(25,50,25), styleNoLabel,styleLine);
  
_SECTION_END();
  
_SECTION_BEGIN("LL");
  
Periods = Param("periods", 34, 2, 300, 1, 10 );
Plot( EMA( Low, Periods ),_DEFAULT_NAME(), ColorRGB(50,25,25), styleNoLabel,styleLine);
_SECTION_END();}
  
_SECTION_BEGIN("Cloud Setting");
//Cloud
  
CloudResColor=ParamColor("CloudResColor",ColorRGB(25,33,25));
CR=EMA(H,34);
CS=EMA(L,34);
  
if(segretribbon == 1)
{
    PlotOHLC( CS, CS, CR,CR, "Band", CloudResColor, styleCloud | styleNoLabel|styleNoTitle);
}
  
_SECTION_END();
  
  
_SECTION_BEGIN("Display");
Display= ParamToggle("Display","Off|On",1);
if(Display==1)
{
x=Param("xposn",0,0,1000,1);
y=Param("yposn",569,0,1000,1);
  
GfxSetBkColor(ColorRGB(23,25,23));
GfxSelectFont( "Times New Roman",9,500, True);
GfxSetTextColor( colorGrey40); 
GfxTextOut("RSI: "+WriteVal(RSI(14),1.0)+" | MACD:  "+WriteVal(MACD(),1.2)+" | F(Ema): "+NumToStr(EMA(C,5),1.2)+" |9(Ema): "+NumToStr(EMA(C,9),1.2)+"
|15(EMA): "+NumToStr(EMA(C,15),1.2)+" |30(EMA): "+NumToStr(EMA(C,30),1.2)+" |50(EMA): "+NumToStr (EMA(C,50),1.2), x, y );
  
cx=Param("cxposn",537,0,1000,1);
cy=Param("cyposn",12,0,1000,1);
  
GfxSetBkColor(ColorRGB(23,25,23));
GfxSelectFont( "Bodoni MT",14,50, False);
GfxSetTextColor( colorWhite); 
GfxTextOut("LTP: "+C+" ", cx, cy );
 _SECTION_END();}
  
 
 
  
_SECTION_BEGIN("Background Color");
BKswitch = ParamToggle("Background Color","On,Off");
  
OUTcolor = ParamColor("Outer Panel Color",ColorRGB(25,25,25));
INUPcolor = ParamColor("Inner Panel Upper",ColorRGB(23,25,23));
INDNcolor = ParamColor("Inner Panel Lower",ColorRGB(23,25,23));
TitleColor = ParamColor("Title Color ",ColorRGB(23,25,23));
  
if (NOT BKswitch)
{
SetChartBkColor(OUTcolor); // color of outer border
SetChartBkGradientFill(INUPcolor,INDNcolor,TitleColor); // color of inner panel
 
 
 
 
 
 
 
 
 
 
 
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
 
 
 
PctVlt=(ATR(10)/C)*100;//
 
PK=IIf(PctVlt<0.5,Peak(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Peak(Close,0.70,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Peak(Close,0.90,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Peak(Close,1.10,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Peak(Close,1.30,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Peak(Close,1.50,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Peak(Close,1.70,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Peak(Close,2.00,1),
Peak(Close,2.20,1) ))))))));
 
TGH=IIf(PctVlt<0.5,Trough(Close,0.5,1),
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,Trough(Close,0.75,1),
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,Trough(Close,1.00,1),
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,Trough(Close,1.25,1),
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,Trough(Close,1.50,1),
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,Trough(Close,1.75,1),
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,Trough(Close,2.00,1),
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,Trough(Close,2.25,1),
Trough(Close,2.50,1) ))))))));
 
Sens=IIf(PctVlt<0.5,0.5,
IIf( PctVlt>=0.5 AND PctVlt< 1.0 ,0.75,
IIf( PctVlt>=1.0 AND PctVlt< 1.5 ,1.00,
IIf( PctVlt>=1.5 AND PctVlt< 2.0 ,1.25,
IIf( PctVlt>=2.0 AND PctVlt< 2.5 ,1.50,
IIf( PctVlt>=2.5 AND PctVlt< 3.0 ,1.75,
IIf( PctVlt>=3.0 AND PctVlt< 3.5 ,2.00,
IIf( PctVlt>=3.5 AND PctVlt< 4.0 ,2.25,
2.50 ))))))));
 
 
Color=IIf(BarsSince(Cross(C,Ref(PK,-1)))<BarsSince(Cross(Ref(TGH,-1),C)),colorBrightGreen,colorRed);
Plot(C,"",Color,styleCandle);
 
 
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
 
numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;
 
 
  
 
 
////////////////////////////////////////////////////////////////////////////////////////////////
 
 
 
 
////////////////////////////////////////////////////////////////////////////////////////////
 
 
////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
 
messageboard = ParamToggle("Message Board","Show|Offset",0);
showsl = ParamToggle("Stop Loss Line", "Show|Offset", 0);
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);
 
if (showsl == 0)
//{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+1,entry,Null,colorBlack);
PlotText("T1 BOOK PROFIT@"+tar1,BarCount+3,tar1,Null,Clr);PlotText("T2@"+tar2,BarCount+3,tar2,Null,Clr);PlotText ("T3@"+tar3,BarCount+3,tar3,Null,Clr);
 
}
 
 
printf("Last " + sig + " CALL COME " + (BarCount-bars) + " bars ago");
printf("\n" + sig + " @ : " + entry + "\nStop Loss : " + sl + " (" + WriteVal(IIf(sig == "SELL",entry-sl,sl-entry), 2.2) + ")"+ "\nTarget_1 : " + tar1 + "\nTarget_2 : " + tar2 + "\nTarget_3 : " + tar3);
printf("\nCurrent  YOURPROFIT \YOURLOSS PER UNIT/Loss : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2));
 
if (messageboard == 0 )
{
GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
 
if ( sig =="BUY")
{
GfxSelectSolidBrush( colorBlack ); // this is the box background color
}
else
{
GfxSelectSolidBrush( colorDarkRed); // this is the box background color
}
pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");
Left = 1800;
width = 610;
x = 10;
x2 = 390;
 
y = pxHeight;
 
GfxSelectPen( colorBlack, 1); // broader color
GfxRoundRect( x, y - 163, x2, y , 7, 7 ) ;
GfxTextOut( (" NEERUKALA'S TRADING SYSTEM "),88,y-165);
GfxTextOut( (" "),27,y-160);
GfxTextOut( ("Last " + sig + " CALL COME " + (BarCount-bars-1) * Interval()/60 + " MINUTE AGO"), 13, y-140) ; // The text format location
GfxTextOut( ("" + WriteIf(sig =="BUY",sig + " @ ",sig + " @") + " : " + entry), 13, y-120);
GfxTextOut( ("TRAILING STOPLOSS : " + sl + " (" + WriteVal(IIf(sig == " sell",entry-sl,sl-entry), 2.2) + ")"), 13, y-100);
GfxTextOut( ("TGT:1 BOOK PROFIT : " + tar1), 13, y -80);
GfxTextOut( ("TGT:2 : " + tar2), 13,y-60);
GfxTextOut( ("TGT:3 : " + tar3), 13,y-40);
GfxTextOut( ("Current YourProfit/YourLoss : " + WriteVal(IIf(sig == "BUY",(C-entry),(entry-C)),2.2)), 88, y-22);;
 
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
 
  
 
//////////////////////////////////////////////////////////////////////////////////////////////////////////
}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
_SECTION_BEGIN("Support-Resistance");
SupRes=ParamToggle("Sup-Res","No|Yes",1);
SupResA = Param("Sup-Res A Period",20,0,100,1);
SupResB = Param("Sup-Res B Period",25,0,100,1);
 
Res1 = ParamColor("Resistance High", colorRed );
Res2 = ParamColor("Resistance Low", colorDarkRed );
Sup1 = ParamColor("Support High", colorDarkGreen );
Sup2 = ParamColor("Support Low", colorBrightGreen );
if(SupRes)
{
MaxGraph = 12;
BuyOffSet = SupResA;//Optimize("BuyOffSet",18,15,20,1);
SellOffset = BuyOffSet;//Optimize("SellOffset",2,2,14,2);
RegLength = 5;//Optimize("RegLength",5, 2,11,2);
BuyATRPeriod = 2;//Optimize("BuyATRPeriod",2,2,5,1);
SellATRPeriod = BuyATRPeriod;//Optimize("SellATRPeriod",4,2,11,2);
ATRMultiplier = 0.5;//Optimize("ATRMultiplier",1,0.7,1.25,.05);
SuppA = HHV(H-ATRMultiplier*ATR(BuyATRPeriod),BuyOffset); /* RED */
RessB = LLV(L+ATRMultiplier*ATR(SellATRPeriod),SellOffset); /* GREEN */
Plot(SuppA,"",sup1,ParamStyle("Sup-Res A Style", styleDashed|styleNoTitle) );
Plot(RessB,"",res2,ParamStyle("Sup-Res A Style", styleDashed|styleNoTitle) );
 
nn=SupResB;
mmm=100;
TYP=(High + Low + 2*Close)/4;
CI=(TYP-MA(TYP,14))/(0.015*StDev(TYP,14));
CCCI=EMA(CI,5)+mmm;
Hh=HHV(H,nn);
Ll=LLV(L,nn);
MM=(Hh+Ll)/2;
CCCC=EMA(CCCI*(Hh-Ll)/(2*mmm)+Ll,5);
Plot(Hh,"",Res1, ParamStyle("Sup-Res B Style", styleThick|styleNoTitle) );
Plot(Ll,"",Sup2, ParamStyle("Sup-Res B Style", styleThick|styleNoTitle) ) ;
}
_SECTION_END();
 
_SECTION_BEGIN("SAR");
acc = Param("Acceleration", 0.02, 0, 1, 0.001 );
accm = Param("Max. acceleration", 0.2, 0, 1, 0.001 );
Plot( SAR( acc, accm ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style", styleDots | styleNoLine, maskDefault | styleDots | styleNoLine ) );
_SECTION_END();
 
_SECTION_BEGIN("MA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
Back