Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Filter Explorer Resume for Amibroker (AFL)
This filter has Explorer tool for the various indicators and averages, allowing the end of the day for example, have an idea about the performance of each stock.
Similar Indicators / Formulas
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 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 | _SECTION_BEGIN ( "All in One Explorer" ); i=0; //52 Week High Low High52 = HHV ( High ,250); Low52 = LLV ( Low ,250); Fech = Close ; //Volatilidade Historica HVPeriod = Param ( "HV Period" ,21,5,252,1); HV = StDev ( log ( C / Ref ( C ,-1)),HVPeriod)* sqrt (252)*100; //Bollinger Band BB1= C > BBandTop ( C ,20,2) AND Ref ( C ,-1)< Ref ( BBandTop ( C ,20,2),-1); BB2= C < BBandBot ( C ,20,2) AND Ref ( C ,-1)> Ref ( BBandBot ( C ,20,2),-1); BBStatus= WriteIf (BB1, "Acima Upper" , WriteIf (BB2, "Abaixo Bottom" , WriteIf ( IsNull ( MA ( C ,20)), "N/A" , "Neutro" ))); BBColor= IIf (BB1, colorRed , IIf (BB2, colorGreen , colorLightGrey )); IIf (BB2,i+1,i); //SAR SARCalc = C > SAR (); IIf (SARCalc,i+1,i); SARStatus = WriteIf (SARcalc, "Bullish" , WriteIf ( IsNull ( SAR ()) , "N/A" , "Bearish" )); SARColor = IIf (SARcalc, colorGreen , colorRed ); //"Hilo" _SECTION_BEGIN ( "Hilo" ); //Parâmetros Period = Param ( "Período" ,6,1,50,1); Style = ParamStyle ( "Estilo" , styleStaircase , maskAll ); Hld = IIf ( C > Ref ( MA ( H , Period), -1), 1, IIf ( C < Ref ( MA ( L , Period), -1), -1, 0)); Hlv = ValueWhen (Hld != 0, Hld, 1); Hilo = IIf (Hlv == -1, MA ( H , Period), MA ( L , Period)); HiloColor = IIf (Hlv == 1, colorGreen , colorRed ); //Plot(Hilo,"HiLo"+_PARAM_VALUES(),HiloColor,Style); _SECTION_END (); HiloCalc = C > Hilo; Hilocal2 = C < Hilo; IIf (Hilocalc,i+1,i); HiloStatus = WriteIf (Hilocalc, "Bullish" , "Bearish" ); HiloColor = IIf (Hilocalc , colorGreen , colorRed ); //Moving Average EMACurta = C >= EMA ( C ,5) AND EMA ( C ,5) > Ref ( EMA ( C ,5), -1); IIf (EMACurta,i+1,i); EMAShort = C >= EMA ( C ,21) AND EMA ( C ,21) > Ref ( EMA ( C ,21), -1); IIf (EMAshort,i+1,i); EMATrim = C >= EMA ( C ,55) AND EMA ( C ,55) > Ref ( EMA ( C ,55), -1); IIf (EMATrim,i+1,i); EMAMid = C >= EMA ( C ,120) AND EMA ( C ,120) > Ref ( EMA ( C ,120), -1); IIf (EMAMid,i+1,i); eMALong = C >= EMA ( C ,200) AND EMA ( C ,200) > Ref ( EMA ( C ,200), -1); IIf (EMALong,i+1,i); PrecoxEmas = C > EMA ( C ,5) AND C > EMA ( C ,21) AND C > EMA ( C ,55) AND C > EMA ( C ,120) AND C > EMA ( C ,200); IIf (PrecoxEMAs,i+1,i); EMA5x21 = C > EMA ( C ,5) AND C > EMA ( C ,21) AND EMA ( C , 5) > EMA ( C ,21); IIf (Ema5x21,i+1,i); EMA5x55 = C > EMA ( C ,5) AND C > EMA ( C ,55) AND EMA ( C , 5) > EMA ( C ,55); IIf (Ema5x55,i+1,i); EMA21x55 = C > EMA ( C ,21) AND C > EMA ( C ,55) AND EMA ( C , 21) > EMA ( C ,55); IIf (Ema21x55,i+1,i); CurtaStatus = WriteIf (EMACurta, "Bullish" , WriteIf ( IsNull ( EMA ( C ,5)) , "N/A" , "Bearish" )); CurtaColor = IIf (EMACurta, colorGreen , colorRed ); ShortStatus = WriteIf (EMAShort, "Bullish" , WriteIf ( IsNull ( EMA ( C ,21)) , "N/A" , "Bearish" )); ShortColor = IIf (EMAShort, colorGreen , colorRed ); TrimStatus = WriteIf (EMATrim, "Bullish" , WriteIf ( IsNull ( EMA ( C ,55)) , "N/A" , "Bearish" )); TrimColor = IIf (EMATrim, colorGreen , colorRed ); MidStatus = WriteIf (EMAMid, "Bullish" , WriteIf ( IsNull ( EMA ( C ,120)), "N/A" , "Bearish" )); MidColor = IIf (EMAMid, colorGreen , colorRed ); LongStatus = WriteIf (EMALong, "Bullish" , WriteIf ( IsNull ( EMA ( C , 200)), "N/A" , "Bearish" )); LongColor = IIf (EMALong, colorGreen , colorRed ); PrecoxEmasStatus = WriteIf (PrecoxEmas, "Bullish" , WriteIf ( IsNull (Precoxemas), "N/A" , "Bearish" )); PrecoxEmasColor = IIf (PrecoxEmas, colorGreen , colorRed ); Ema5x21Status = WriteIf (Ema5x21, "Bullish" , WriteIf ( IsNull (Ema5x21), "N/A" , "Bearish" )); Ema5x21Color = IIf (Ema5x21, colorGreen , colorRed ); Ema5x55Status = WriteIf (Ema5x55, "Bullish" , WriteIf ( IsNull (Ema5x55), "N/A" , "Bearish" )); Ema5x55Color = IIf (Ema5x55, colorGreen , colorRed ); Ema21x55Status = WriteIf (Ema21x55, "Bullish" , WriteIf ( IsNull (Ema21x55), "N/A" , "Bearish" )); Ema21x55Color = IIf (Ema21x55, colorGreen , colorRed ); //MACD MACDBull= MACD (12,26)> Signal (12,26,9); IIf (MACDBull,i+1,i); MACDStatus= WriteIf (MACDBull, "Bullish" , WriteIf ( IsNull ( MACD (12,26)), "N/A" , "Bearish" )); MACDColor= IIf (MACDBull, colorGreen , colorRed ); //Aroon Period=14; LLVBarsSince= LLVBars ( L ,Period)+1; HHVBarsSince= HHVBars ( H ,Period)+1; AroonDown=100*(Period-LLVBarsSince)/(Period-1); AroonUp=100*(Period-HHVBarsSince)/(Period-1); AroonOsc=AroonUp-AroonDown; Aroon=AroonOsc>0; IIf (Aroon,i+1,i); AroonStatus= WriteIf (Aroon, "Bullish" , WriteIf ( IsNull ( RSI (14)), "N/A" , "Bearish" )); AroonColor= IIf (Aroon, colorGreen , IIf ( IsNull ( RSI (14) ), colorLightGrey , colorRed )); //Stochastic StochKBull= StochK (14,3)> StochD (14,3,3); IIf (StochKBull,i+1,i); StochKStatus= WriteIf (StochKBull, "Bullish" , WriteIf ( IsNull ( StochK (14,3)), "N/A" , "Bearish" )); StochKColor= IIf (StochKBull, colorGreen , colorRed ); //RSI R1= RSI (14)>30 AND Ref ( RSI (14),-1)<30 AND Ref ( RSI (14),-2)<30; R2= RSI (14)<70 AND Ref ( RSI (14),-1)>70 AND Ref ( RSI (14),-2)>70; IIf (R1,i+1,i); RSIStatus= WriteIf (R1, "Subindo" , WriteIf (R2, "Caindo" , WriteIf ( IsNull ( RSI (14)), "N/A" , "Neutro" ))); RSIColor= IIf (R1, colorGreen , IIf (R2, colorRed , colorLightGrey )); //MFI M1= MFI (14)>80; M2= MFI (14)<20; IIf (M2,i+1,i); MFIStatus= WriteIf (M1, "Overbought" , WriteIf (M2, "Oversold" , WriteIf ( IsNull ( MFI (14)), "N/A" , "Neutro" ))); MFIColor= IIf (M1, colorRed , IIf (M2, colorGreen , colorLightGrey )); TrendScore = IIf (EMACurta,1,0)+ IIf (EMAShort,1,0)+ IIf (EMATrim,1,0)+ IIf (EMAMid,1,0) + IIf (EMALong,1,0)+ IIf (MACDBull,1,0) + IIf (SARcalc, 1, 0) + IIf (Hilocalc, 1, 0) + IIf (Aroon,1,0) + IIf (PrecoxEmas,1,0) + IIf (Ema5x21,1,0) + IIf (Ema5x55,1,0) + IIf (Ema21x55,1,0) + IIf (StochKBull,1,0); prdscore = Param ( "Gatilho" ,7,0,50,1,0); Buy = Cross (TRENDSCORE, prdscore) AND C > 2 AND V > 500000; Sell = Cross (prdscore, trendscore) OR trendscore < Ref (trendscore, -1); //Sell = Cross(7, trendscore) OR trendscore < Ref(trendscore, -1) AND trendscore < Ref(trendscore, -2); // trade size: 100% of current portfolio equity SetPositionSize ( 5, spsPercentOfEquity ); /* TrendScore = IIf(C>=Ref(C,-11),1,-1)+ IIf(C>=Ref(C,-12),1,-1)+ IIf(C>=Ref(C,-13),1,-1)+ IIf(C>=Ref(C,-14),1,-1)+ IIf(C>=Ref(C,-15),1,-1)+ IIf(C>=Ref(C,-16),1,-1)+ IIf(C>=Ref(C,-17),1,-1)+ IIf(C>=Ref(C,-18),1,-1)+ IIf(C>=Ref(C,-19),1,-1)+ IIf(C>=Ref(C,-20),1,-1); */ Filter = 1; Filter = Close > 2 AND Filter = Volume >500000; AddColumn (High52, "Max01Ano" ); AddColumn (Low52, "Mín01Ano" ); AddColumn (Fech, "Close" ,1.2, IIf ( Close > Ref ( Close ,-1), colorGreen , colorRed )); AddColumn ( V , "Volume" ,1, IIf ( V > Ref ( V ,-1), colorGreen , colorRed )); AddColumn ( EMA ( Volume , 21), "Ema21Volume" ,1, IIf ( EMA ( Volume , 21)> Ref ( EMA ( Volume , 21), -1), colorGreen , colorRed )); AddColumn (HV, "V.Hist(21)" ,1.2, IIf (Hv> Ref (Hv, -1), colorGreen , colorRed )); AddTextColumn (PrecoxEmasstatus, "C > EMAs" ,1, colorWhite ,PrecoxEmasColor); AddTextColumn (CurtaStatus, "EMA(5)" ,1, colorWhite ,CurtaColor); AddTextColumn (ShortStatus, "EMA(21)" ,1, colorWhite ,ShortColor); AddTextColumn (Ema5x21status, "EMA5>EMA21" ,1, colorWhite ,Ema5x21Color); AddTextColumn (TrimStatus, "EMA(55)" ,1, colorWhite ,TrimColor); AddTextColumn (Ema5x55status, "EMA5>EMA55" ,1, colorWhite ,Ema5x55Color); AddTextColumn (Ema21x55status, "EMA21>EMA55" ,1, colorWhite ,Ema21x55Color); AddTextColumn (MidStatus, "EMA(120)" ,1, colorWhite ,MidColor); AddTextColumn (LongStatus, "EMA(200)" ,1, colorWhite ,LongColor); AddTextColumn (MACDStatus, "MACD(26,12,9)" ,1, colorWhite ,MACDColor); AddTextColumn (AroonStatus, "Aroon(14)" ,1, colorWhite ,AroonColor); AddTextColumn (StochKStatus, "Sto(14,3,3" ,1, colorWhite ,StochKColor); AddTextColumn (SARStatus, "SAR" , 1, colorWhite , SARcolor); AddTextColumn (HiloStatus, "Hilo(6)" , 1, colorWhite , hilocolor); AddColumn (TrendScore, "Score" , 1, IIf (trendscore> Ref (trendscore, -1), colorGreen , colorRed )); AddColumn ( RSI (2), "RSI(2)" ,1.2, IIf ( RSI (2)> Ref ( RSI (2), -1), colorGreen , colorRed )); AddColumn ( RSI (5), "RSI(5)" ,1.2, IIf ( RSI (5)> Ref ( RSI (5), -1), colorGreen , colorRed )); AddColumn ( RSI (14), "RSI(14)" ,1.2, IIf ( RSI (14)> Ref ( RSI (14), -1), colorGreen , colorRed )); AddColumn ( StochK (8,3), "Sto(8,3)" ,1.2, IIf ( StochK (8,3)> Ref ( StochK (8,3), -1), colorGreen , colorRed )); AddColumn (Hilo, "Hilo(6)" ,1.2, IIf (Hilo> Ref (Hilo, -1), colorGreen , colorRed )); AddColumn ( ATR (10), "ATR(10)" ,1.2, IIf ( ATR (10)> Ref ( ATR (10), -1), colorGreen , colorRed )); _SECTION_END (); Buy = trendscore > 7; Sell = trendscore < 10; Buy = ExRem ( Buy , Sell ); Sell = ExRem ( Sell , Buy ); // trade size: 100% of current portfolio equity SetPositionSize ( 5, spsPercentOfEquity ); |
2 comments
Leave Comment
Please login here to leave a comment.
Back
hi,
this generates too many signals.i tested for nse data for 2011 year this generated 50870 signals which is just too high….
do modifications to reduce signals and add new column to show all indicators score at end
Good efforts.
Thank you .