[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I just tested the download and it is bad so here it is in.



PureBytes Links

Trading Reference Links

message format.

If you want to have a screen that looks like the one that I placed on 
the board follow these directions:

Add custom indicators AO+, AC+, Williams Red, Blue and green
indicator and the Volume indicators to your custom indicators. Cut 
and paste these.

1. Delete all the chart windows that you can. You do this by placing 
your cursor in a window, right clicking and choosing delete. The
last window remaining will do delete. Add the first of the new 
windows (AC+) to the chart. Then you can delete the last window of 
the original chart. Now all you have left is the newly added AO+. 
Add to this AO+ then the Alligator indicator. Finally add the Volume 
indicator. Now you should have the four windows of the chart of my 
original screen. You will have to rearrange the windows sizing to
get the look I had. In rearranging the windows you have to be careful 
since if you more the windows down the lower windows tends to 
disappear. Start by resizing the top window to the size you want it 
to be. Then move down, moving the windows lower boundary toward the 
top of the screen. Once you get to resizing the main Alligator
window you can move the lower boundary down being careful not to kill 
the Volume window.

2. I have made several system buy and sell test available. There are 
individually contain within comment sections. What you have to do to 
test different systems is to comment out the active test and remove 
the comments brackets to the one you desire to test.

The following code allows you to built the Williams Alligator system 
as I have interpreted it. If there are any errors, it is my 
misunderstanding and not anyone else's. If anyone uses this system
in trading it is your own liability, I do not assume any. This system
is provided as an example only of how flexible Amibroker can be.

General indicator are shown below:

Call this indicator "Williams Alligator Red Blue and Green":
***********************************************
/* The first set of lines are to set up the color coding for
the price bars */

outsidebar = outside();
insidebar = H <= Ref(H,-1) and L >= Ref(L,-1);
upbar = H > ref(H,-1) and L >= ref(L, -1);
downbar = L < ref(L,-1) and H <= ref(H,-1);
barcolor=iif(outsidebar, 1, iif(downbar, 4, iif(upbar,5, 0) ) );

/*The following builds the alligator lines*/
maxGraph=9;
AlligatorBlue=Ref(Wilders(A,13),-8);
Graph0=AlligatorBlue;
AlligatorRed=Ref(Wilders(A,8),-5);
Graph1=AlligatorRed;
AlligatorGreen=Ref(Wilders(A,5),-3);
Graph2=AlligatorGreen;
Graph0Style=Graph1Style=Graph2Style=1+4;

Graph3=C; 
Graph3Style=64; 

/*
Graph3Color=22; 22 is the number for dark green
*/

Graph3barcolor=barcolor;

Graph2Color=27; /* 6 is green */
Graph1Color=5; /* 5 is red color */
Graph0color=7; /* 7 is dark blue */
/*The following builds Fractal Up*/
var1=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),1); 
FractalUp=HighestSince(var1>0,var1,1);
Graph4=FractalUp;
Graph4Color=3; /* 6 is green */
Graph4Style=9;
/*The following builds Fractal Down*/
var2= 
(Ref(L,-2) <= Ref(L, -1)) AND
(Ref(L,-2) <= Ref(L, 0)) AND
(Ref(L,-2) <= Ref(L, -3)) AND
(Ref(L,-2) <= Ref(L, -4));
FractalDown=ValueWhen( var2,Ref(L,-2),1);
Graph5=FractalDown;
Graph5Style=1;
Graph5Color=8; /* red is 5 blue is 7 */
Graph5Style=9;

/* the following code is for the consolidation periods or better know
as the sleeping Alligator */

var3= 5;
var4= 3;
var10=10; 
var0= Ref(Wilders(C,13),-8);
var1= Ref(Wilders(C,8),-5);
var2= Ref(Wilders(C,5),-3);
var5= Ma((var0+var1+var2),var4) ;
angle=Atan(var5-Ref(var5,-var3)/var3);
angle=iif( angle >90,angle-360,angle);
hope=iif( angle <20 AND angle>-20,1,0);
cry=((Stdev(C,var3*2) - Ref(Wilders(Stdev(C,var3*2),8),-5))/
(Ref(Wilders(Stdev(C,var3*2),8),-5)))<0;

/* End of consolidation code or sleeping alligator */


/* Below are the buy sell signals for testing */

/*
buy = cross( rsi(), 30 );
sell = cross( 70, rsi() );
*/

/*
buy = cross( ultimate(), 50 );
sell = cross( 50, ultimate() );
*/

buy = cross(H,FractalUp) and (C > AlligatorRed) and ref(O,1) > O 
and Hope == 0; 
Sell= C < AlligatorGreen or 
(ref(C,-1) < FractalUp and (C<ref(C,-1) ) );


/* Below is the dynamic MACD Buy and Sell Signals */

/*
var1=(PeakBars(H,5,1) );
var2=(PeakBars(H,5,2) );
var3=(var2-var1);
var4=(Ma(C,LastValue(var3))-
Ma(C,LastValue(Var2)) );
Var5=EMa(LastValue(var4),LastValue(var3));
var6=var4-var5;
Buy=LLV(var6,7)==ref(var6,-4);
Sell=HHV(var6,7)==ref(var6,-4);
*/

/*
Buy=Cross(Oscp(8,3),Ma(Oscp(8,3),3));
Sell=Cross(ma(Oscp(8,3),3),Oscp(8,3));
*/

/*
Buy=Sar(.02,.2)<C;
Sell=Sar(.02,.2)>C;
*/

/* The following is Guru commentary coding */

WriteIF(Buy==1,"You have a buy signal on the Fractal Up where Buy = " 
+ WriteVal(Buy), "No Buy Signal is present at this time. Where Buy =
" 
+ WriteVal(Buy) );

/* End of commentary code */


Call this one "Williams AO+"
*****************************************
outsidebar = outside();
insidebar = H <= Ref(H,-1) and L >= Ref(L,-1);
upbar = H > ref(H,-1) and L >= ref(L, -1);
downbar = L < ref(L,-1) and H <= ref(H,-1);
barcolor=iif(outsidebar, 1, 
iif(downbar, 4, 
iif(upbar, 5, 
iif(insidebar,6, 0 ) ) ) );

/*barcolor=
iif(outsidebar, 1, iif(downbar, 4, iif(upbar,5, 0) ) );*/


var1=ma( A , 34);
var2=ma( A,5);
graph0=var2-var1;
Graph0Style=2+4;
graph1=wilders(var2-var1,5);
Graph1Style=4+1;
Graph0BarColor=Barcolor;


Call this one "Williams AC+"
******************************************
outsidebar = outside();
insidebar = H <= Ref(H,-1) and L >= Ref(L,-1);
upbar = H > ref(H,-1) and L >= ref(L, -1);
downbar = L < ref(L,-1) and H <= ref(H,-1);
barcolor=iif(outsidebar, 1, 
iif(downbar, 4, 
iif(upbar, 5, 
iif(insidebar,6, 0 ) ) ) );

var1=ma( A , 34);
var2=ma( A,5);
var3=var2-var1;
var4=var3-ma(var3,5);
Graph0=var4;
graph0style=2+4;
Graph1=wilders(var4,5);
Graph1Style=5;
Graph0Barcolor=Barcolor;


Call this one "Volume"
********************************************
outsidebar = outside();
insidebar = H <= Ref(H,-1) and L >= Ref(L,-1);
upbar = H > ref(H,-1) and L >= ref(L, -1);
downbar = L < ref(L,-1) and H <= ref(H,-1);
barcolor=iif(outsidebar, 1, iif(downbar, 4, iif(upbar,5, 0) ) );

Graph0=V;
Graph0Style=2+4;
Graph1=ma(V,5);
Graph1Style=5;
Graph0Barcolor=ValueWhen(Barcolor !=0, barcolor);