PureBytes Links
Trading Reference Links
|
Hi Brett,
Here are two ways of calculating Heikin-Ashi values in MS.
Both ways can only be plotted as an indicator; as far as I know, you
can't plot the candlestick format without an external dll.
Method 1:
HaClose:=(O+H+L+C)/4;
HaOpen:=(PREV + (Ref(O,-1)+Ref(H,-1)+Ref(L,-1)+Ref(C,-1))/4)/2;
HaHigh:=Max(Max(H,HaOpen),HaClose);
HaLow:=Min(Min(L,HaOpen),HaClose);
HaOpen; HaHigh; HaLow; HaClose
Method 2 is my favorite.
It is interesting to me for three reasons.
1. It provides insight into what Heiken-Ashi really is. It is the
current day's Pivot vs. a moving average of the Pivot
(Pivot = O+H+L+C)/4).
2. It is optimizable; you can optimize the lookback moving average of
HaOpen (i.e., change the EMA period = 3 to OPT in a system test).
3. It shows a way to avoid using the PREV command in certain
situations. This trick can be used in any MS formula where PREV is
needed in the form Current Value + PREV.
HaClose:=(O+H+L+C)/4;
HaOpen:=Mov(Ref(HaClose,-1),3,E);
HaHigh:=Max(Max(H,HaOpen),HaClose);
HaLow:=Min(Min(L,HaOpen),HaClose);
HaOpen; HaHigh; HaLow; HaClose
Ross
--- In equismetastock@xxxxxxxxxxxxxxx, Brett Sinclair
<brett_j_sinclair@xxx> wrote:
>
> Can anyone code Heikin-Ashi Candlesticks in Metastock?
>
> The heikin-ashi candlestick technique uses modified open-high-low-
close (OHLC) values and displays them as candlesticks. The modified
values are computed using these definitions:
>
> haClose = (O+H+L+C)/4
> haOpen = (haOpen (previous bar) + haClose (previous bar))/2
> haHigh = Maximum(H, haOpen, haClose)
> haLow = Minimum(L, haOpen, haClose) The "open," "high," "low,"
and "close" referred to are of the current bar. The prefix
> ha- indicates the corresponding heikin-ashi modified values
>
> Thanks, Brett
>
>
> ---------------------------------
> Yahoo! Mail
> Use Photomail to share photos without annoying attachments.
>
> [Non-text portions of this message have been removed]
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|