Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Bill Wiliams (Alligator) for Amibroker (AFL) for Amibroker (AFL)
This is the same by " TimOn76", but the Russian text translated to English, to save time translating.
→ http://wisestocktrader.com/indicators/2846-bill-wiliams-alligator
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 | /* Bill Wiliams (Alligator).afl Submitted by TimOn76, Russian comments translated to English. Strategy buggy, but a good map (Chart) of Bill (Williams Alligator) .... My trading strategy is "TREND" Editor: I wanted to keep the Russian text side by side, but my ASCII editor did not work. Sorry. */ Title= "" ; GraphXSpace =10; _SECTION_BEGIN ( "Price" ); _N (Title = StrFormat ( "{{INTERVAL}} {{DATE}} (%.2f%%) O = %g, H = %g, L = %g, C = %g V = " + WriteVal ( V , 1.0 ) + " {{VALUES}}" , SelectedValue ( ROC ( C , 1 )), O , H , L , C )); _SECTION_END (); /* ------------------------------------------- Data optimization and constant --------------------*/ //The new data /* -------------------------------------------- Indicators by Bill Williams ----------------------*/ A=( H + L )/2; var1= Wilders (A,34); var2= Wilders (A,5); var3=var2-var1; var4=var3- Wilders (var3,5); Var5=( H - L )/ V ; AO=Var3; AC=Var4; AlligatorBlue= Ref ( Wilders (A,13),-8); AlligatorRed= Ref ( Wilders (A,8),-5); AlligatorGreen= Ref ( Wilders (A,5),-3); /* ------------------------------------------ Graphs ---------------------------------------------*/ /* Coloring bars */ barcolor= IIf (AO> Ref (AO,-1) AND AC> Ref (AC,-1), colorGreen , IIf (AO< Ref (AO,-1) AND AC< Ref (AC,-1), colorRed , IIf ( V >0 AND Var5< Ref (Var5,-1) AND V > Ref ( V ,-1), colorBlue , colorBlack ))); Plot ( C , "Close" ,barcolor,64+ styleNoTitle ); Plot (AlligatorBlue, "Jaw" , colorBlue ,1+4+ styleNoTitle ); Plot (AlligatorRed, "Language (Teeth)" , colorRed ,1+4+ styleNoTitle ); Plot (AlligatorGreen, "Lips" , colorLime ,1+4+ styleNoTitle ); /* -------------------------------------------- fractals ----------------------------------------*/ // Fractal "UP" FrUp1= ( Ref ( H ,-3)> Ref ( H , -2) AND Ref ( H ,-3)> Ref ( H ,-1) AND Ref ( H ,-3)> Ref ( H , -4) AND Ref ( H ,-3)> Ref ( H ,-5)); FrUp2= ( Ref ( H ,-4)> Ref ( H ,-5) AND Ref ( H ,-4)> Ref ( H ,-6) AND Ref ( H ,-4)== Ref ( H ,-3) AND Ref ( H ,-4)> Ref ( H ,-2) AND Ref ( H ,-4)> Ref ( H ,-1)) OR ( Ref ( H ,-4)> Ref ( H ,-5) AND Ref ( H ,-4)> Ref ( H ,-6) AND Ref ( H ,-4)> Ref ( H ,-3) AND Ref ( H ,-4)== Ref ( H ,-2) AND Ref ( H ,-3)> Ref ( H ,-1)); FrUp3= ( Ref ( H ,-5)> Ref ( H ,-6) AND Ref ( H ,-5)> Ref ( H ,-7) AND Ref ( H ,-5)== Ref ( H ,-4) AND Ref ( H ,-5)== Ref ( H ,-3) AND Ref ( H ,-5)> Ref ( H ,-2) AND Ref ( H ,-5)> Ref ( H ,-1)) OR ( Ref ( H ,-5)> Ref ( H ,-6) AND Ref ( H ,-5)> Ref ( H ,-7) AND Ref ( H ,-5)== Ref ( H ,-4) AND Ref ( H ,-5)> Ref ( H ,-3) AND Ref ( H ,-5)== Ref ( H ,-2) AND Ref ( H ,-5)> Ref ( H ,-1)) OR ( Ref ( H ,-5)> Ref ( H ,-6) AND Ref ( H ,-5)> Ref ( H ,-7) AND Ref ( H ,-5)> Ref ( H ,-4) AND Ref ( H ,-5)== Ref ( H ,-3) AND Ref ( H ,-5)== Ref ( H ,-2) AND Ref ( H ,-5)> Ref ( H ,-1)); ttt= IIf (FrUp1,3, IIf (FrUp2,4,5)); FrUp_Val= ValueWhen (FrUp1 OR FrUp2 OR FrUp3, Ref ( H ,-ttt),1); Plot (FrUp_Val, "FrUp" , colorDarkGreen ,512+8); // Fractal "DOWN" FrDw1= ( Ref ( L ,-3)< Ref ( L , -2) AND Ref ( L ,-3)< Ref ( L , -1) AND Ref ( L ,-3)< Ref ( L ,-4) AND Ref ( L ,-3)< Ref ( L ,-5)); FrDw2= ( Ref ( L ,-4)< Ref ( L ,-5) AND Ref ( L ,-4)< Ref ( L ,-6) AND Ref ( L ,-4)== Ref ( L ,-3) AND Ref ( L ,-4)< Ref ( L ,-2) AND Ref ( L ,-4)< Ref ( L ,-1)) OR ( Ref ( L ,-4)< Ref ( L ,-5) AND Ref ( L ,-4)< Ref ( L ,-6) AND Ref ( L ,-4)< Ref ( L ,-3) AND Ref ( L ,-4)== Ref ( L ,-2) AND Ref ( L ,-4)< Ref ( L ,-1)); FrDw3= ( Ref ( L ,-5)< Ref ( L ,-6) AND Ref ( L ,-5)< Ref ( L ,-7) AND Ref ( L ,-5)== Ref ( L ,-4) AND Ref ( L ,-5)== Ref ( L ,-3) AND Ref ( L ,-5)< Ref ( L ,-2) AND Ref ( L ,-5)< Ref ( L ,-1)) OR ( Ref ( L ,-5)< Ref ( L ,-6) AND Ref ( L ,-5)< Ref ( L ,-7) AND Ref ( L ,-5)== Ref ( L ,-4) AND Ref ( L ,-5)< Ref ( L ,-3) AND Ref ( L ,-5)== Ref ( L ,-2) AND Ref ( L ,-5)< Ref ( L ,-1)) OR ( Ref ( L ,-5)< Ref ( L ,-6) AND Ref ( L ,-5)< Ref ( L ,-7) AND Ref ( L ,-5)< Ref ( L ,-4) AND Ref ( L ,-5)== Ref ( L ,-3) AND Ref ( L ,-5)== Ref ( L ,-2) AND Ref ( L ,-5)< Ref ( L ,-1)); ggg= IIf (FrDw1,3, IIf (FrDw2,4,5)); FrDw_Val= ValueWhen (FrDw1 OR FrDw2 OR FrDw3, Ref ( L ,-ggg),1); Plot (FrDw_Val, "FrDw" , colorDarkRed ,512+8); /* --------------------------------------- Trading Strategy --------------------------------------*/ // Define the play area green_zone=( C >AlligatorBlue AND C >AlligatorRed AND C >AlligatorGreen); red_zone=( C <AlligatorBlue AND C <AlligatorRed AND C <AlligatorGreen); gray_zone=(green_zone== False ) AND (red_zone== False ); TWR_GREEN=AO> Ref (AO,-1) AND AC> Ref (AC,-1) AND Ref (AC,-1)> Ref (AC,-2); TWR_RED=AO< Ref (AO,-1) AND AC< Ref (AC,-1) AND Ref (AC,-1)< Ref (AC,-2); TWR_GRAY_BUY=AO>0 AND AO< Ref (AO,-1) AND AC> Ref (AC,-1); TWR_GRAY_SELL=AO<0 AND AO> Ref (AO,-1) AND AC< Ref (AC,-1); // Determine the area of the entrance to the LONG GOOD_LONG_ZONE=((green_zone OR gray_zone) AND (TWR_GREEN OR TWR_GRAY_BUY)); GOOD_SHORT_ZONE=((red_zone OR gray_zone) AND (TWR_RED OR TWR_GRAY_SELL)); // Signals for entry in LONG Sg_Buy_Cross_FrUp= Ref ( H ,-1)<=FrUp_Val AND H >FrUp_Val AND FrUp_Val> Ref (AlligatorRed,-ttt); Sg_Buy=Sg_Buy_Cross_FrUp AND GOOD_LONG_ZONE; Buy =( C >FrUp_Val AND C >AlligatorRed) AND AC>0; Sell = C <FrDw_Val OR C <AlligatorRed; Buy = ExRem ( Buy , Sell ); Sell = ExRem ( Sell , Buy ); Short =( C <FrDw_Val AND C <AlligatorRed) AND AC<0; Cover = C >FrUp_Val OR C >AlligatorRed; Short = ExRem ( Short , Cover ); Cover = ExRem ( Cover , Short ); PlotShapes ( shapeUpArrow * Buy + shapeHollowDownArrow * Short , IIf ( Buy , colorGreen , colorRed ),0, IIf ( Buy , Low , High )); PlotShapes ( shapeDownArrow * Sell + shapeHollowUpArrow * Cover , IIf ( Cover , colorGreen , colorRed ),0, IIf ( Cover , Low - C /2000, High + C /2000)); /* End of Exploration Code. */ /* My trading strategy is "TREND" */ |
1 comments
Leave Comment
Please login here to leave a comment.
Back
plz show the screen shot