Trading Chaos

Discussion in 'Technical Analysis' started by osho67, Aug 4, 2005.

  1. Hi,

    I am using Quotetracker and would like to implement some of the indicators Bill Williams describes in his book

    When he describes alligator, I understand this to be a triple moving average system.

    5 EMA , weak
    8 EMA , medium
    13 EMA , strong

    Is this correct ?

    Is it possible to implement the others AO ( awesome indicator), momentum indicator, etc


    Thanks
     
  2. Babak

    Babak

    Junk. Don't waste your time. Bill is the only one who understands the drivel he spews.
     
  3. 1) I agree with the previous poster

    and

    2) No those values are very wrong ... Bill like most guru uses a bunch of modified indicators. I included the genuine ones in one of my free dlls for SierraChart (kiwiext.dll I think) so if you want to get Sierrachart (about 8 bucks a month i think) then you can get the full set.

    FWIW I dont trade his stuff I just wrote the indicators for someone who said they'd give me a bottle of whiskey if I did. Useless beggar never did so I guess that they didnt work for him either (personally I hope he lost heaps!!) :)
     
  4. Hi

    Thanks for the responses, I agree that I need to be a bit skeptical, but trying to figure this stuff out for what it is.

    kiwi_trader, could you please tell me what the values should be for alligator indicator, am I even correct in my assumption that it is a triple moving average ?


    Many Thanks

    Osho
     
  5. Hi,

    i would like to disagree with what was stated earlier about bill williams' indicators. I use the alligator moving averages as well as the AO and AC indicator and i think they are quite usefull at least for my trading decisions. I attached a file showing the S&P 500 Future.
    I have to admit the whole system is a trendfollowing system, with all the advantages and disadvantages such a system has.
    I use metastock, so if you need the codes i would be happy to send them.


    best regards Lennetkann
     

  6. Hi Lennetkann


    Can you please tell me what the settings are for the alligator moving averages?
     
  7. Sure, no problem here is the Metastock-Formula:

    Alligator Blue:
    Ref(Wilders(MP(),13),-8)

    Alligator Red:
    Ref(Wilders(MP(),8),-5)

    Alligator Green:
    Ref(Wilders(MP(),5),-3)

    MP(): Returns the midpoint of the Data Array over the specified time period. The midpoint is the value halfway between the highest and lowest Data Array values during the specified period.

    Wilders: It is basically a type of moving average, similar to the "exponential" method in that it retains a decreasingly smaller percentage of all historical data in the series.

    i hope this will help you.
     
  8. Thanks Lennetkann
     
  9. Babak

    Babak

    If you can profit from the jibber jabber of Bill, then all the more power to you. From my point of view, the guy is a smarmy snakeoil vendor who tries to hyponotize simple minds with complex words and concepts (chaos theory, fractals, etc.) while actually delivering rather stale and cliched content (moving average and counter-trend strategies).

    The fact that he puts fractals and chaos on his book's cover and has nothing whatsoever to say (in a meaningful way) about them between the covers, tells you all you need to know.
     
  10. FWIW here is my code for his ma, the AO and the AC based on emails between bill and the person who asked about it:

    sg.BaseDataIn[3][pos] is the array of closing prices at each pos(ition)
    sg.SubGraphDataOut[4][pos] are chart outputs (0-3) and storage (4-7).
    Language = C


    Code:
    
    /***********************************************************************/
    void __declspec(dllexport) BWMA(struct s_sg &sg)
    
    {
    	sg.GraphName="BWMA";
    	sg.SubgraphName[0]="MA";
    
    	sg.InputNames[2]="3 MA Length";
    
    	sg.FreeDLL=1;
    	if(sg.ArraySize<100) return;
    	// if(sg.DateIn[sg.ArraySize-1]>38350) return;
    
    	int    i,j,c,start,  pos,term=30,Bars;
    	float  k;
    
    	if(sg.Inputs[2]==0) sg.Inputs[2]=34;
    
    	double sum1=0;
    	double avg1=0;
    
    	sg.DataStartIndex=50;
    
    	for (pos=50; pos < sg.ArraySize; pos++)
    	{
    
    				sum1 = sum1 + sg.BaseDataIn[3][pos];
    				if(pos>=50+sg.Inputs[2]) {sum1 = sum1 - avg1;};
    				avg1 = sum1 / sg.Inputs[2];
    
    				sg.SubGraphDataOut[0][pos] = avg1;
    		}
    
    
    };
    
    
    /***********************************************************************/
    
    void __declspec(dllexport) AC(struct s_sg &sg)
    
    {
    	sg.GraphName="AC";
    	sg.SubgraphName[0]="Up";
    	sg.SubgraphName[1]="Dn";
    	sg.SubgraphName[2]="Flat";
    
    
    	sg.InputNames[2]="3 Long MA Length";
    	sg.InputNames[3]="4 Short MA Length";
    	sg.InputNames[4]="5 Signal MA Length";
    	sg.InputNames[5]="6 BWSmoothed (0), Exponential (1) or Simple (2) Moving Averages";
    
    	sg.FreeDLL=1;
    	if(sg.ArraySize<100) return;
    	// if(sg.DateIn[sg.ArraySize-1]>38350) return;
    
    	int    i,j,c,start,  pos,term=30,Bars;
    	float  k;
    
    	if(sg.Inputs[2]==0) sg.Inputs[2]=34;
    	if(sg.Inputs[3]==0) sg.Inputs[3]=5;
    	if(sg.Inputs[4]==0) sg.Inputs[4]=5;
    
    	double sum1=0; double sum2=0; double sum3=0; double sum4=0;
    	double avg1=0; double avg2=0; double avg3=0; double avg4=0;
    	double cfactor1=2/(sg.Inputs[2]+1); double cinvfactor1=1-cfactor1;
    	double cfactor2=2/(sg.Inputs[3]+1); double cinvfactor2=1-cfactor2;
    	double cfactor4=2/(sg.Inputs[4]+1); double cinvfactor4=1-cfactor4;
    
    	sg.DataStartIndex=50;
    
    	for (pos=50; pos < sg.ArraySize; pos++)
    	{
    
    
    			if(sg.Inputs[5]==0)
    			{
    
    				sum1 = sum1 + sg.BaseDataIn[3][pos];
    				if(pos>=50+sg.Inputs[2]) {sum1 = sum1 - avg1;};
    				avg1 = sum1 / sg.Inputs[2];
    
    				sum2 = sum2 + sg.BaseDataIn[3][pos];
    				if(pos>=50+sg.Inputs[3]) {sum2 = sum2 - avg2;};
    				avg2 = sum2 / sg.Inputs[3];
    
    				avg3 = avg2 - avg1;
    
    				sg.SubGraphDataOut[5][pos] = avg3;
    				sum4 = sum4 + avg3;
    				avg4 = sum4 / sg.Inputs[4];
    				j=pos-sg.Inputs[4]+1;
    				if(pos>50+sg.Inputs[4]-2) {sum4 = sum4 - sg.SubGraphDataOut[5][j];};
    
    
    			} else if(sg.Inputs[5]==1)
    			{
    				avg1 = avg1*cinvfactor1+sg.BaseDataIn[3][pos]*cfactor1;
    				avg2 = avg2*cinvfactor2+sg.BaseDataIn[3][pos]*cfactor2;
    				avg3 = avg2 - avg1;
    				sg.SubGraphDataOut[5][pos] = avg3;
    				avg4 = avg4*cinvfactor4+avg3*cfactor4;
    			} else
    			{
    				sum1 = sum1 + sg.BaseDataIn[3][pos];
    				avg1 = sum1 / sg.Inputs[2];
    				j=pos-sg.Inputs[2]+1;
    				if(pos>50+sg.Inputs[2]-2) {sum1 = sum1 - sg.BaseDataIn[3][j];};
    
    				sum2 = sum2 + sg.BaseDataIn[3][pos];
    				avg2 = sum2 / sg.Inputs[3];
    				j=pos-sg.Inputs[3]+1;
    				if(pos>50+sg.Inputs[3]-2) {sum2 = sum2 - sg.BaseDataIn[3][j];};
    
    				avg3 = avg2 - avg1;
    
    				sg.SubGraphDataOut[5][pos] = avg3;
    				sum4 = sum4 + avg3;
    				avg4 = sum4 / sg.Inputs[4];
    				j=pos-sg.Inputs[4]+1;
    				if(pos>50+sg.Inputs[4]-2) {sum4 = sum4 - sg.SubGraphDataOut[5][j];};
    			}
    
    
    			sg.SubGraphDataOut[4][pos] = avg3-avg4;
    
    			if(sg.SubGraphDataOut[4][pos]>sg.SubGraphDataOut[4][pos-1])
    				{sg.SubGraphDataOut[0][pos] = sg.SubGraphDataOut[4][pos]; sg.SubGraphDataOut[1][pos] = 0; sg.SubGraphDataOut[2][pos] = 0;} else
    			if(sg.SubGraphDataOut[4][pos]<sg.SubGraphDataOut[4][pos-1])
    				{sg.SubGraphDataOut[0][pos] = 0; sg.SubGraphDataOut[1][pos] = sg.SubGraphDataOut[4][pos]; sg.SubGraphDataOut[2][pos] = 0;} else
    			{sg.SubGraphDataOut[0][pos] = 0; sg.SubGraphDataOut[1][pos] = 0; sg.SubGraphDataOut[2][pos] = sg.SubGraphDataOut[4][pos];};;
    
    		}
    
    
    };
    
    
    /***********************************************************************/
    
    void __declspec(dllexport) AO(struct s_sg &sg)
    
    {
    	sg.GraphName="AO";
    	sg.SubgraphName[0]="Up";
    	sg.SubgraphName[1]="Dn";
    	sg.SubgraphName[2]="Flat";
    	sg.SubgraphName[3]="All";
    
    
    	sg.InputNames[2]="3 Long MA Length";
    	sg.InputNames[3]="4 Short MA Length";
    	sg.InputNames[4]="5 Signal MA Length";
    	sg.InputNames[5]="6 BWSmoothed (0), Exponential (1) or Simple (2) Moving Averages";
    
    	sg.FreeDLL=1;
    	if(sg.ArraySize<100) return;
    	// if(sg.DateIn[sg.ArraySize-1]>38350) return;
    
    	int    i,j,c,start,  pos,term=30,Bars;
    	float  k;
    
    	if(sg.Inputs[2]==0) sg.Inputs[2]=34;
    	if(sg.Inputs[3]==0) sg.Inputs[3]=5;
    	if(sg.Inputs[4]==0) sg.Inputs[4]=5;
    
    	double sum1=0; double sum2=0; double sum3=0; double sum4=0;
    	double avg1=0; double avg2=0; double avg3=0; double avg4=0;
    	double cfactor1=2/(sg.Inputs[2]+1); double cinvfactor1=1-cfactor1;
    	double cfactor2=2/(sg.Inputs[3]+1); double cinvfactor2=1-cfactor2;
    	double cfactor4=2/(sg.Inputs[4]+1); double cinvfactor4=1-cfactor4;
    
    	sg.DataStartIndex=50;
    
    	for (pos=50; pos < sg.ArraySize; pos++)
    	{
    
    			if(sg.Inputs[5]==0)
    			{
    
    				sum1 = sum1 + sg.BaseDataIn[3][pos];
    				if(pos>=50+sg.Inputs[2]) {sum1 = sum1 - avg1;};
    				avg1 = sum1 / sg.Inputs[2];
    
    				sum2 = sum2 + sg.BaseDataIn[3][pos];
    				if(pos>=50+sg.Inputs[3]) {sum2 = sum2 - avg2;};
    				avg2 = sum2 / sg.Inputs[3];
    
    				avg3 = avg2 - avg1;
    
    				sg.SubGraphDataOut[5][pos] = avg3;
    				sum4 = sum4 + avg3;
    				avg4 = sum4 / sg.Inputs[4];
    				j=pos-sg.Inputs[4]+1;
    				if(pos>50+sg.Inputs[4]-2) {sum4 = sum4 - sg.SubGraphDataOut[5][j];};
    
    
    			} else if(sg.Inputs[5]==1)
    			{
    				avg1 = avg1*cinvfactor1+sg.BaseDataIn[3][pos]*cfactor1;
    				avg2 = avg2*cinvfactor2+sg.BaseDataIn[3][pos]*cfactor2;
    				avg3 = avg2 - avg1;
    				sg.SubGraphDataOut[5][pos] = avg3;
    				avg4 = avg4*cinvfactor4+avg3*cfactor4;
    			} else
    			{
    				sum1 = sum1 + sg.BaseDataIn[3][pos];
    				avg1 = sum1 / sg.Inputs[2];
    				j=pos-sg.Inputs[2]+1;
    				if(pos>50+sg.Inputs[2]-2) {sum1 = sum1 - sg.BaseDataIn[3][j];};
    
    				sum2 = sum2 + sg.BaseDataIn[3][pos];
    				avg2 = sum2 / sg.Inputs[3];
    				j=pos-sg.Inputs[3]+1;
    				if(pos>50+sg.Inputs[3]-2) {sum2 = sum2 - sg.BaseDataIn[3][j];};
    
    				avg3 = avg2 - avg1;
    
    				sg.SubGraphDataOut[5][pos] = avg3;
    				sum4 = sum4 + avg3;
    				avg4 = sum4 / sg.Inputs[4];
    				j=pos-sg.Inputs[4]+1;
    				if(pos>50+sg.Inputs[4]-2) {sum4 = sum4 - sg.SubGraphDataOut[5][j];};
    			}
    
    
    			sg.SubGraphDataOut[4][pos] = avg3-avg4;
    
    			sg.SubGraphDataOut[3][pos] = sg.SubGraphDataOut[5][pos];
    			if(sg.SubGraphDataOut[5][pos]>sg.SubGraphDataOut[5][pos-1])
    				{sg.SubGraphDataOut[0][pos] = sg.SubGraphDataOut[5][pos]; sg.SubGraphDataOut[1][pos] = 0; sg.SubGraphDataOut[2][pos] = 0;} else
    			if(sg.SubGraphDataOut[5][pos]<sg.SubGraphDataOut[5][pos-1])
    				{sg.SubGraphDataOut[0][pos] = 0; sg.SubGraphDataOut[1][pos] = sg.SubGraphDataOut[5][pos]; sg.SubGraphDataOut[2][pos] = 0;} else
    			{sg.SubGraphDataOut[0][pos] = 0; sg.SubGraphDataOut[1][pos] = 0; sg.SubGraphDataOut[2][pos] = sg.SubGraphDataOut[5][pos];};;
    
    		}
    
    
    };
    
    
     
    #10     Aug 6, 2005