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

Re: [amibroker] Heikin-Ashi code modification as per e-signal help needed:



PureBytes Links

Trading Reference Links

If eSignal produces different chart it means that its implementation is wrong or you are using different data (settings).
 
I have talked with Dan Valcu and AmiBroker implementation that you quoted at the end of your e-mail 
follows precisely his original idea, and exactly this description:
 
# haClose = (O+H+L+C)/4
# haOpen = (haOpen (previous bar) + haClose (previous bar))/2
# haHigh = Maximum(H, haOpen, haClose)
# haLow = Minimum(L, haOpen, haClose)

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: nebt1
Sent: Thursday, April 27, 2006 1:00 AM
Subject: [amibroker] Heikin-Ashi code modification as per e-signal help needed:

Hi e-signal using somewhat different code for Heikin-Ashi then
presently
available AmiBroker code for it. Chart comes out different as well
on e-signal Heikin-Ashi.
Here is the code and explanations from e-signal by Dan Valcu:
     http://r7.com/ashi.htm

CALCULATION

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. I have used daily data throughout this article, so
one bar represents one trading day. Depending on the trading time
frame, you may employ other data, such as intraday, weekly, or
monthly.

The value haOpen is always set to the midpoint of the body of the
previous bar, while haClose is computed as the average price of the
current bar. The modified high, haHigh, is chosen as the highest
value of the set {real high (H), modified open (haOpen), and
modified close (haClose)}. The same logic applies to the definition
of the modified low: It is the lowest value in the set {real low
(L), modified open (haOpen), and modified close (haClose)}.
======
AmiBroker code that I presently have is as follows:

_SECTION_BEGIN("Haikin Ashi");
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );

PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "Modified " + Name(),
colorBlack, styleCandle );
_SECTION_END();
======
Please, someone, translate that e-signal code into AFL AmiBroker.
tia, Ben






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS