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

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



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxx> 
wrote:
>
> Hello,
> 
> I have looked at the eSignal code and not counting the fact that 
it is 20 times longer than AFL formula,
> it is doing the same thing as:
> 
> 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 );
> 
> So, you must be using different data.
> Note that Haikin-Ashi is using recursive formulation and the 
results you are getting will be different
> depending on NUMBER OF BARS that are used in calculation.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
>   ----- Original Message ----- 
>   From: Tomasz Janeczko 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Thursday, April 27, 2006 1:11 AM
>   Subject: Re: [amibroker] Heikin-Ashi code modification as per e-
signal help needed:
> 
> 
>   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 
>     To: amibroker@xxxxxxxxxxxxxxx 
>     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 
> 
>       a..  Visit your group "amibroker" on the web.
>         
>       b..  To unsubscribe from this group, send an email to:
>        amibroker-unsubscribe@xxxxxxxxxxxxxxx
>         
>       c..  Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of Service. 
> 
> 
> -------------------------------------------------------------------
---------
>
Hi Tomasz,
Thanks for a reply, woodie from cci club uses e-signal formula quite 
well and we both had IB data with different results using Heikin 
Ashi today.
>From what i see HaOpen calculated in e-signal uses (open+close)/2 
previous bar and afl formula does it with close only/2??? I am not 
afl programmer,
and i don't doubt that afl language is shorter... but could there be 
still difference in results cause of HaOpen calculations in both?
tia, Ben






------------------------ Yahoo! Groups Sponsor --------------------~--> 
GFT Forex Trading Accounts As low as $250 with up to 400:1 Leverage. Free Demo.
http://us.click.yahoo.com/lpv1TA/jlQNAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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/