PureBytes Links
Trading Reference Links
|
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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|