Vous êtes sur la page 1sur 2

/*

Bill William's Alligator System II Acceleration/Decceleration Oscillator, mod


ified from williamalligator2
Reference Website:
==================
http://www.alpari-idc.com/en/market-analysis-guide/chaos-theory/alligator-and
-gator.html
Modified from http://www.amibroker.com/library/detail.php?id=100, by Steve Wi
ser - slwiserr@erols.com
Modified by TohMz on June 9th, 2008
*/
SetChartOptions( 0, chartShowArrows|chartShowDates );
/* _SECTION_BEGIN("Price Chart");
_N(Title = StrFormat("{{NAME}}- {{INTERVAL}} {{DATE}} O= %g, H= %g, L= %g, C= %g
(%.1f%%) V= " +WriteVal( V, 1.0 ) +"\n{{VALUES}}", O, H, L, C, SelectedValue( R
OC( C, 1 )) ));
PriceStyle = GetPriceStyle();
PriceStyleOpt = ParamStyle("Price Style")|PriceStyle;
if (PriceStyle==styleCandle)
Plot( C, "", colorBlack, PriceStyleOpt);
else
Plot( C, "", IIf( Close >= Ref(C, -1), colorBlue, colorRed ), PriceStyleOpt);
_SECTION_END();*/
_SECTION_BEGIN("BW Alligator");
/*** The trend indicators ***/
P= ParamList("Price", "Close|(H+L)/2|(H+C+L)/3",1);
if (P=="Close")
A = C;
else
if (P=="(H+C+L)/3")
A = (H+C+L)/3;
else
A = (H+L)/2;
AlligatorJaw = Ref(Wilders(A,13),-8);
AlligatorTeeth = Ref(Wilders(A,8), -5);
AlligatorLips = Ref(Wilders(A,5), -3);
AO=MA(A,5)-MA(A,34);
AC=AO-MA(AO,5);
ACcolor=IIf(AC>Ref(AC,-1),colorGreen,colorRed);
Plot(AC,"AC",ACcolor,styleHistogram|styleThick);
_SECTION_END();
_SECTION_BEGIN("BW Fractal");
UpFractal= ValueWhen(
(Ref(H,-2) > Ref(H, -4)) AND

(Ref(H,-2) > Ref(H, -3)) AND


(Ref(H,-2) > Ref(H, -1)) AND
(Ref(H,-2) > H), Ref(H,-2));
DownFractal=
(Ref(L,-2)
(Ref(L,-2)
(Ref(L,-2)
(Ref(L,-2)

ValueWhen(
<= Ref(L, -4)) AND
<= Ref(L, -3)) AND
<= Ref(L, -1)) AND
<= L), Ref(L,-2));

_SECTION_END();

_SECTION_BEGIN("Exploration");
/*
Buy: Scan stocks only breakout..maxbreakout (1~30%, default) and Trend is bu
llish
Sell: Scan stocks only breakout..maxbreakout (1~30%, default) and Trend is be
arish
*/
//== Price Increment Value - depend on different country
Inc = 0.1;
//== Set the Price Range for stock to scan
PriceFrom = Param("Price From:", 50, 1, 200000, Inc);
PriceTo = Param("Price To:", 100, 1, 200000, Inc);
MaxBreakOut = Param("Max Breakout (%)", 5, 1, 30);
MaxBreakOut = MaxBreakOut/100;
Buy = C>UpFractal AND C<=(1+MaxBreakOut)*UpFractal AND AlligatorTeeth>Alligator
Jaw; /* AND AlligatorLips>AlligatorTeeth; */
Sell = C<DownFractal AND C>=(1-MaxBreakOut)*DownFractal AND AlligatorTeeth<Allig
atorJaw; /* AND AlligatorLips<AlligatorTeeth; */

Filter = (Buy OR Sell) AND ( MA(V,3)/EMA(V,17))>1;


AddTextColumn(FullName(), "Security", 1.0, colorDefault, colorDefault, 200);
AddTextColumn( WriteIf(Buy,"Buy", WriteIf(Sell, "Sell", "")), "Trade", 1.0);
AddColumn( UpFractal, "Up Fratal");
AddColumn( DownFractal, "Down Fratal");
AddColumn( MA(V,3)/EMA(V,17), "MAV(3/17)");
AddColumn( C, "Today's Close");
_SECTION_END();

Vous aimerez peut-être aussi