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

[EquisMetaStock Group] Re: HEIKIN-ASHI CANDLESTICK OSCILLATOR



PureBytes Links

Trading Reference Links

Preston,

I agree with you 100% about the value of TA.  For me TA can AT BEST
give me trading tactics  -  entries, exits, scale in/out points etc. 

I have a technical/science background and so when I discovered TA I
was more than a little excited with the prospects.  After all I had
been using my math/science skills to earn a living my entire life with
good success.  I was a BELIEVER !  

I've been trading full time for over 5 years now and lets just say TA
has been put into its proper place.  Not useless, but no grail - no
millions etc etc. 

Ed



--- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxx> wrote:
>
> Ed, 
> 
> When the Heikin-Ashi work first came out I spent a lot of time going 
> through the formula. Since we had not figured out how to master the 
> display in Metastock by formula or DLL at that point, my only 
> recourse was to use an altered excel file of the data. Crude but it 
> worked. 
> 
> Taking a closer look at the work I came to the conclusion that a 
> couple of short term moving averages worked just as well. Sadly, that 
> is the case with most of the TA methods that I have come across. 
> Somewhere we have been led to believe that all we need to make a buck 
> is the holy grail of indicators and we too can make millions. Not the 
> case at all...neither the indicator nor the million.
> 
> If you are planning on making money trading you will have to include 
> fundametal analysis and opportunity. At a recent Senate hearing on 
> the toxic funds debacle there was a testimony given by a well known 
> hedge fund CEO. His statement was a real eye opener. He basically 
> said that once his firm had found something that they planned to 
> invest in that they would wait for months until the right opportunity 
> came along before putting their money in. Their returns by the way 
> were one of the best in the industry.
> 
> As far as a Kalman, here is one that I found:
> 
> {Kalman Filter}
> {Advantage Systems: www.advantage.online.pl}
> PRICEE:=C;
> Smooth:=.13785*(2*PriceE - Ref(PriceE,-1)) +
> .0007*(2*Ref(PriceE,-1) - Ref(PriceE,-2)) +
> .13785*(2*Ref(PriceE,-2) -Ref(PriceE,-3)) + 
> 1.2103*PREV - .4867*Ref(PREV,-1);
> SMOOTH;
> 
> 
> I've never heard of Difussion Indicators so I really can't comment on 
> them.
> 
> Your Modified Heikin-Ashi looks very much like a stochastic of the 
> daily typical price with the open included.
> 
> 
> Preston
> 
>   
> 
> 
>  
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "Ed Hoopes" <reefbreak_sd@> 
> wrote:
> >
> > The original H-A algorithm has so little smoothing that it is often
> > modified -  usually adding more smoothing.
> > 
> > Here is another modified H-A indicator from a TASC article a few 
> years
> > ago.  Note that while the framework is AB Formula Language, the 
> actual
> > calculations are done in JavaScript which can be invoked from 
> within *.afl
> > 
> > (The JavaScript language is embedded in the Windows operating 
> system.)
> > 
> > ********************************
> > // Modified Heikin-Ashi  Translated from EasyLanguage code
> > // Ed Hoopes
> > // July 2005
> > 
> > 	EnableScript( "jscript");
> > 
> > 	haClose   = (Open+High+Low+Close)/4;
> > 	haOpen[0] = Open[0];
> > 	
> > 	for (e = 1; e < BarCount; e++)
> > 	{ 
> > 		haOpen[e] = (Open[e - 1] + haClose[e - 1]) / 2;
> > 	}
> > 
> > 	<%  // JavaScript now;
> > 
> > 	JShaClose = VBArray( AFL( "haClose" ) ).toArray();
> > 	JShaOpen  = VBArray( AFL( "haOpen"  ) ).toArray();
> > 	JSHigh    = VBArray( AFL( "High"    ) ).toArray();
> > 	JSLow     = VBArray( AFL( "Low"     ) ).toArray();
> > 
> > 	haHigh    = new Array();
> > 	haLow     = new Array();
> > 	haColor   = new Array();
> > 
> > // Load the haHigh and haLow arrays and assign a color to each bar;
> > 	for (f = 0; f < JShaClose.length; f++)
> > 	{ 
> > 		haHigh[f] = Math.max( JSHigh[f], JShaOpen[f], 
> JShaClose[f] ); 
> > 		haLow[f] = Math.min(  JSLow[f], JShaOpen[f], JShaClose
> [f] ); 
> > 		if(JShaClose[f] > JShaOpen[f]) haColor[f] = 1.00; 
> else haColor[f] =
> > 0.00;
> > 	}
> > 
> > 	for (g = 7; g < JShaClose.length; g++)
> > 	{
> > 		for(k = -6; k < 0; k++ )
> > 		{ 
> > 	   if(		
> > 		 ( JShaOpen[g] <= Math.max( JShaOpen[g + k], JShaClose
> [g + k] )) && 
> > 		 ( JShaOpen[g] >= Math.min( JShaOpen[g + k], JShaClose
> [g + k] )) &&
> > 		 (JShaClose[g] <= Math.max( JShaOpen[g + k], JShaClose
> [g + k] )) && 
> > 		 (JShaClose[g] >= Math.min( JShaOpen[g + k], JShaClose
> [g + k] ))  )
> > 			 haColor[g] = haColor[g + k];
> >  		}
> > 		
> > 	}
> > 
> > 
> > 	AFL( "haHigh"  ) = haHigh;
> > 	AFL( "haLow"   ) = haLow;
> > 	AFL( "haColor" ) = haColor;
> > 
> > 	%>  //End of JavaScript;
> > 
> > PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "H-A Mod" + Name(),
> > IIf(haColor == 0, colorRed, colorLime), styleCandle );
> > 
> > *********************************
> > 
> > 
> > 
> > 
> > 
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, "Ed Hoopes" <reefbreak_sd@>
> > wrote:
> > >
> > > I'm glad to hear that MS users have access to the H-A indicators.
> > > 
> > > On the general topic of smoothing - here are two other smoothers 
> that
> > > I have found useful:
> > > 
> > > 1. Kalman filters - often used to smooth noisy data in electronics
> > > work well.
> > > 2. statistical smoothing which aggregate the data over many 
> stocks to
> > > produce an indicator - has produced my best results.  I have not 
> seen
> > > these covered in any TA book.  Sometimes they are 
> called 'difussion
> > > indicators' without any further discussion.
> > > 
> > > ReefBreak
> > > 
> > > 
> > > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@> wrote:
> > > >
> > > > As a subscriber to Roy's newsletter you would have a solution 
> to 
> > > > this.
> > > > 
> > > > Preston
> > > > 
> > > > 
> > > > 
> > > > --- In equismetastock@xxxxxxxxxxxxxxx, "Ed Hoopes" 
> > > > <reefbreak_sd@> wrote:
> > > > >
> > > > > As a former user of MetaStock software, I can comment on why 
> the
> > > > > indicator is not programmed for MS.  The MetaStock formula 
> language
> > > > > does not have nearly enough functions to implement the code.
> > > > > 
> > > > > Below, I show the indicator programmed in AmiBroker by Tomasz 
> > > > Janeczko.
> > > > > 
> > > > > Here is an incomplete list of required functions that MS 
> lacks:
> > > > > IIF - an immediate IF function that works on data arrays
> > > > > IF  - a conditional execution statement that allows blocks of
> > > > > statements to be conditionally executed
> > > > > Hold - holds a logic true/false in a certain state for a 
> number of 
> > > > bars
> > > > > AMA - an adaptive moving average function
> > > > > ParamToggle - switches the logic state of a variable
> > > > > Flip - works like an electrical FlipFlop logic circuit
> > > > > StyleArea & StyleOwnScale - allows proper plotting of Heikin 
> bars.
> > > > > 
> > > > > If you wanted to implement this indicator in MS you would 
> need to 
> > > > buy
> > > > > the software developers kit which has software hooks into the 
> MS
> > > > > package.  Plus buy some fully capable language compiler like 
> C++.  
> > > > > 
> > > > > Or, for $199 you could buy AB and use the code below :)
> > > > > 
> > > > > ***********************
> > > > > 
> > > > > HA Candelstick Oscillator in AmiBroker;
> > > > > 
> > > > > function ZeroLagTEMA( array, period )
> > > > > {
> > > > >  TMA1 = TEMA( array, period );
> > > > >  TMA2 = TEMA( TMA1, period );
> > > > >  Diff = TMA1 - TMA2;
> > > > >  return TMA1 + Diff ;
> > > > > }
> > > > > 
> > > > > /////////////////////
> > > > > // Heikin-Ashi code
> > > > > HaClose = (O+H+L+C)/4;
> > > > > HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
> > > > > 
> > > > > avp = Param("Up TEMA avg", 34, 1, 100 );
> > > > > avpdn = Param("Dn TEMA avg", 34, 1, 100 );
> > > > > 
> > > > > // Velvoort is using not original, but modified Heikin-Ashi 
> close
> > > > > HaClose = ( HaClose + HaOpen + Max( H, HaOpen ) + Min( L, 
> > > > HaOpen ) )/4;
> > > > > 
> > > > > // up average
> > > > > ZlHa = ZeroLagTEMA( HaClose, avp );
> > > > > ZlCl = ZeroLagTEMA( ( H + L ) / 2, avp );
> > > > > ZlDif = ZlCl - ZlHa;
> > > > > 
> > > > > keep1 = Hold( HaClose >= HaOpen, 2 );
> > > > > keep2 = ZlDif >= 0;
> > > > > keeping = keep1 OR keep2;
> > > > > keepall = keeping OR ( Ref( keeping, -1 ) AND ( C > O ) OR C 
> >= Ref
> > > > (
> > > > > C, -1 ) );
> > > > > keep3 = abs( C - O ) < ( H - L ) * 0.35 AND H >= Ref( L, -1 );
> > > > > utr = keepall OR ( Ref( keepall, -1 ) AND keep3 );
> > > > > 
> > > > > // dn average
> > > > > ZlHa = ZeroLagTEMA( HaClose, avpdn );
> > > > > ZlCl = ZeroLagTEMA( ( H + L ) / 2, avpdn );
> > > > > ZlDif = ZlCl - ZlHa;
> > > > > 
> > > > > keep1 = Hold( HaClose < HaOpen, 2 );
> > > > > keep2 = ZlDif < 0;
> > > > > keeping = keep1 OR keep2;
> > > > > keepall = keeping OR ( Ref( keeping, -1 ) AND ( C < O ) OR C 
> < Ref
> > > > ( C,
> > > > > -1 ) );
> > > > > keep3 = abs( C - O ) < ( H - L ) * 0.35 AND L <= Ref( H, -1 );
> > > > > dtr = keepall OR ( Ref( keepall, -1 ) AND keep3 );
> > > > > 
> > > > > upw = dtr == 0 AND Ref( dtr, -1 ) AND utr;
> > > > > dnw = utr == 0 AND Ref( utr, -1 ) AND dtr;
> > > > > 
> > > > > Haco = Flip( upw, dnw );
> > > > > 
> > > > > 
> > > > > if( ParamToggle("Chart Type", "Price with color back|HACO 
> wave" ) )
> > > > > {
> > > > >  Plot( Haco, "Haco", colorRed );
> > > > > }
> > > > > else
> > > > > {
> > > > >  Plot( C, "Close", colorBlack, ParamStyle( "Style", 
> styleCandle,
> > > > > maskPrice ) );
> > > > >  Plot( 1, "", IIf( Haco , colorPaleGreen, colorRose ), 
> styleArea |
> > > > > styleOwnScale, 0, 1 );
> > > > > }--- In equismetastock@xxxxxxxxxxxxxxx, "maurizio_innamorati"
> > > > > <maurizio.innamorati@> wrote:
> > > > > >
> > > > > > The above indicator is discussed in TASC December issue. 
> > > > unfortunately, 
> > > > > > the formula in MS code is not listed in Traders' Tips 
> (given in 
> > > > article 
> > > > > > itself only available to subscribers). Could somebody share 
> the 
> > > > code 
> > > > > > for the above indicator witg us? Thanks.
> > > > > >
> > > > >
> > > >
> > >
> >
>



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/