Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
True ZigZag with Valid Peaks & Troughs for Amibroker (AFL)
ZigZag’s Peaks and Troughs are validated via Buy-Sell Signals
Indicator / Formula
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 | SetChartBkColor ( ColorRGB ( 0, 0, 0 ) ); SetChartOptions ( 0, chartShowArrows | chartShowDates ); Plot ( C , "C" , colorWhite , styleCandle , Null , Null , 0, 0, 1 ); pr = Param ( "ZigZag change amount" , 5, 0.05, 20, 0.05 ); bi = BarIndex (); fvb = FirstVisibleValue( bi ); lvb = LastVisibleValue( bi ); x = C ; pk = PeakBars ( x, pr ) == 0; tr = TroughBars ( x, pr ) == 0; for ( i = 0; i < 2; i++ ) { VarSet ( "px" + i, ValueWhen ( pk, bi, i ) ); VarSet ( "tx" + i, ValueWhen ( tr, bi, i ) ); VarSet ( "ph" + i, ValueWhen ( pk, x, i ) ); VarSet ( "tl" + i, ValueWhen ( tr, x, i ) ); } zzHiLo = Zig ( x, pr ); PeakVal = Peak ( x, pr ); TroughVal = Trough ( x, pr ); validUp = Troughval + ( TroughVal / 100 ) * pr; validDn = Peakval - ( PeakVal / 100 ) * pr; Buy = ( ( Cross ( C , validUp ) || C > validUp ) && tx1 > px1 ) || ( ( Cross ( C , validUp ) || C > validUp ) && tx1 < px1 && pk ); BuyPrice = C ; Short = ( ( Cross ( validDn, C ) || C < validDn ) && px1 > tx1 ) || ( ( Cross ( validDn, C ) || C < validDn ) && px1 < tx1 && tr ); ShortPrice = C ; Buy = ExRem ( Buy , Short ); Short = ExRem ( Short , Buy ); Sell = Short ; SellPrice = ShortPrice ; Cover = Buy ; CoverPrice = BuyPrice ; PlotShapes ( IIf ( Buy , shapeUpArrow , shapeNone ), ColorRGB ( 0, 250, 250 ), 0, L , -15 ); PlotShapes ( IIf ( Buy , shapeSmallSquare, shapeNone ), colorLightBlue , 0, BuyPrice , 0 ); PlotShapes ( IIf ( Short , shapeDownArrow , shapeNone ), ColorRGB ( 250, 250, 0 ) , 0, H , -15 ); PlotShapes ( IIf ( Short , shapeSmallSquare, shapeNone ), colorOrange , 0, SellPrice , 0 ); Plot ( zzHiLo, "" , colorBlue , styleNoLabel ); Plot ( validUp, "" , colorBrightGreen , styleDashed | styleNoRescale , Null , Null , 0, 0, 1 ); Plot ( validDn, "" , colorRed , styleDashed | styleNoRescale , Null , Null , 0, 0, 1 ); ft = "Tahoma" ; sz = 10; clr1 = ColorRGB ( 0, 0, 0 ); clr2 = ColorRGB ( 250, 250, 250 ); for ( i = fvb; i < lvb; i++ ) { if ( pk[i] ) { str = "Top" ; PlotTextSetFont( str, ft, sz, i, H [i], clr1, clr2, 20 - sz ); } if ( tr[i] ) { str = "Bot" ; PlotTextSetFont( str, ft, sz, i, L [i], clr1, clr2, -20 ); } } |
1 comments
Leave Comment
Please login here to leave a comment.
Back
Unfortunately, by mistake uploaded the file without mentioning the name of this formula’s author. I thought that I uploaded the file where I had mentioned the name of the author. A humble apology to Empotch. All credit is to Empotch.