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 ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
abhi for Amibroker (AFL)
Copy & Paste Friendly
Back
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 _SECTION_BEGIN("Mlightf"); // ACD Plot // LSMA is Linreg // ACD.afl // v 1.2 9/13/2004 // plots ACD levels and pivot range from daily SetChartBkColor(16); Per = Param("Periods",13); Per2 = Param("Periods 2",34); LSMAPer = Param("LMSA Period",25); Offset = Param("A Level",1); ACDFlag = 0; IntervalFlag = IIf(Interval(format=0)==300,1,0); strInterval = Interval(format=2); strWeekday = StrMid("SunMonTueWedThuFriSat", SelectedValue(DayOfWeek())*3,3); if( StrFind( Name(), "YM" ) ) { ACDOffset = 10; ACDFlag = 1; ACDTime = 94500; } if( StrFind( Name(), "ER" ) ) { ACDOffset = 0.5; ACDFlag = 1; ACDTime = 93500; } if( StrFind( Name(), "ES" ) ) { ACDOffset = 2; ACDFlag = 1; ACDTime = 94500; } if( StrFind( Name(), "NQ" ) ) { ACDOffset = 3; ACDFlag = 1; ACDTime = 94500; } if( StrFind( Name(), "ZB" ) ) { ACDOffset = 0.15; ACDFlag = 1; ACDTime = 83000; } if( StrFind( Name(), "ZN" ) ) { ACDOffset = 0.15; ACDFlag = 1; ACDTime = 83000; } GraphXSpace = 1; Shift = 2; // calculate the pivot range PDH = TimeFrameGetPrice( "H", inDaily, -1 ); // gives previous Day High when working on intraday data PDL = TimeFrameGetPrice( "L", inDaily, -1 ); PDC = TimeFrameGetPrice( "C", inDaily, -1 ); PP = (PDH+PDL+PDC)/3; DIFF = abs((PDH+PDL)/2 - PP); PRHi = PP + DIFF; PRLo = PP - DIFF; EMA1 = EMA(Avg,Per); EMA2 = EMA(Avg,Per2); LSMA = LinearReg(Avg, LSMAPer); Plot(C, "Close",colorWhite,styleCandle); if ((ACDFlag) AND (IntervalFlag)) { ORHigh= ValueWhen(TimeNum()<ACDTime,HighestSince(DateNum()>Ref(DateNum(),-1),High)); ORLow = ValueWhen(TimeNum()<ACDTime,LowestSince(DateNum()>Ref(DateNum(),-1), Low)); Plot(PRHi,"PRHigh",colorWhite,styleDots+styleNoLine+styleNoLabel); Plot(PRLo,"PRLow",colorWhite,styleDots+styleNoLine+styleNoLabel); Plot(ORHigh,"ORHigh",colorBlue,style=styleStaircase+styleDots+styleNoLine+styleNoLabel); Plot(ORLow,"ORLow",colorBlue,style=styleStaircase+styleDots+styleNoLine+styleNoLabel); Plot(ORHigh+ACDOffset,"AUp",colorYellow,style=styleStaircase+styleDots+styleNoLine); Plot(ORLow-ACDOffset,"ADn",colorYellow,style=styleStaircase+styleDots+styleNoLine); // Plot(LSMA, "LSMA", colorYellow,style=styleThick); } Title=Name()+" ["+strInterval+"] "+ strWeekday + " " +Date()+ " Close: "+WriteVal(C,format=1.2) +" "+WriteVal(per,format=1.0)+"-Per MA: " +WriteVal(EMA1,format=1.2)+" " + WriteVal(per2,format=1.0)+"-Per MA: " +WriteVal(EMA2,format=1.2) + " PR High: "+WriteVal(PRHi,format=1.2) + " PR Low: "+WriteVal(PRLo,format=1.2) ; _SECTION_END(); _SECTION_BEGIN("Show Values at H&L"); n=Param("Values back",20,1,200,1); p=Param("zig %",5,1,100,1); dist = 0.8*ATR(15); for( i = 1; i < n; i++ ) { PlotText(""+LastValue(Peak(H,p,i),True),BarCount-3-LastValue(PeakBars(H,p,i)),LastValue(dist,True)+LastValue(Peak(H,p,i),False),colorBlack,ColorRGB(225,225,225)); PlotText(""+LastValue(Trough(L,p,i),True),BarCount-3-LastValue(TroughBars(L,p,i)),LastValue(Trough(L,p,i),False)-LastValue(dist,True),colorBlack,ColorRGB(225,225,225)); } _SECTION_BEGIN("Sup / Res Lines"); SRswitch = ParamToggle("Sup / Res Lines","On,Off"); CHLswitch = ParamToggle("Hi Low / Close","Hi Low,Close"); NoLines = Param("No of Lines",3,1,10,1); Sen = Param("Sensitivity",5,1,100,1); Rcolor=ParamColor( "Res Color", colorGreen ); Rstyle=ParamStyle( "Res Style", styleLine ); Scolor=ParamColor( "Sup Color", colorBrown ); Sstyle=ParamStyle( "Sup Style", styleLine ); y=0; x=0; for( i = 1; i < NoLines+1 ; i++ ) { Y[i]=LastValue(Peak(IIf(CHLswitch,C,H),Sen,i)); x[i]=BarCount - 1 - LastValue(PeakBars(IIf(CHLswitch,C,H),Sen,i)); Line = LineArray( x[i], y[i], Null, y[i], 1 ); Plot( IIf(SRswitch,Null,Line), "", Rcolor, Rstyle ); Y[i]=LastValue(Trough(IIf(CHLswitch,C,L),Sen,i)); x[i]=BarCount - 1 - LastValue(TroughBars(IIf(CHLswitch,C,L),Sen,i)); Line = LineArray( x[i], y[i], Null, y[i], 1 ); Plot( IIf(SRswitch,Null,Line), "", Scolor, Sstyle ); } _SECTION_END(); _SECTION_BEGIN("VAP"); segments = IIf( Interval() < inDaily, Day(), inQuarterly); segments = segments != Ref( segments , -1 ); PlotVAPOverlayA( segments , Param("Lines", 323, 100, 1000, 1 ), Param("Width", 100, 1, 100, 1 ), ParamColor("Color", colorBlue ), ParamToggle("Side", "Left|Right" ) | 2 * ParamToggle("Style", "Fill|Lines", 1) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) ); Plot(segments, "", colorLightGrey, styleHistogram | styleOwnScale ); _SECTION_END(); _SECTION_BEGIN("Vol-Trend"); uptrend=PDI(20)>MDI(10)AND Signal(29)<MACD(13); downtrend=MDI(10)>PDI(20)AND Signal(29)>MACD(13); Plot( 2, /* defines the height of the ribbon in percent of pane width */"", IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); Plot(V,"",IIf(C>O,colorGreen,IIf(C<O,4,7)),2|4|32768,5); //Plot(MA(V,45),"",colorBlue,0|4|32768,40); //,styleLine|styleThick|styleOwnScale); GfxSetOverlayMode(0); GfxSelectFont("Tahoma", Status("pxheight")/36); GfxSetTextAlign( 6 );// center alignment GfxSetTextColor( colorWhite ); GfxSetBkMode(0); // transparent GfxTextOut(Name(), Status("pxwidth")/2, Status("pxheight")/15 ); GfxTextOut( "Chart By Mlightf", Status("pxwidth")/2, Status("pxheight")/9 ); GfxSelectFont("Tahoma", Status("pxheight")/40 );