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

[amibroker] Re: AFL Puzzle



PureBytes Links

Trading Reference Links


Thanks all for your help and suggestions - I did as suggested by 
Scott and initialized first - seems okay now and everything was left 
intact so somehow the initializes was required. Still a bit of a 
mystery but no matter. 

very helpful folks on this board and much appreciate help.


Dean H. 


btw Scott - thanks for link to ensign article - never a shortage of 
things to pick up with this stuff.


 Best  

Dean H.





--- In amibroker@xxxxxxxxxxxxxxx, Scott Cong <scong@xxxx> wrote:
> Would initialize
> 
> HaOpen HaOpen[0] = O[0];
> 
> makes difference?
> 
> By the way, at Ensign website (www.ensign.com), there is an article 
> about Henkin Ashi chart (Sep. newsletter?), interesting to read. It 
> seems they prefer average candle (candles based on average prices) 
to 
> Henkin Ashi. I have coded it as below:
> ---------------------------------------
> 
> // Candle chart based on average prices. Using smoothfactor = 0.5, 
it is 
> effectively two periods average price.
> 
> bPriceType = Param("0: OHLC; 1: Henkin Ashi; 2: Average candle", 0, 
0, 2);
> bBarOverlay = Param("Overlay bar chart: 0: N; 1: Y", 0, 0, 1);
> 
> if ( bPriceType == 2 )   
> {    // Average candle
>     sc = 0.5;
> 
>     // Uncomment the follow lines to see the effect of volitality 
based 
> AMA (from Amibroker manual)
>     /*
>     fast = 2/(2+1);
>     slow = 2/(10+1);
>     dir=abs(Close-Ref(Close,-10));
>     vol=Sum(abs(Close-Ref(Close,-1)),10);
>     ER=dir/vol;
>     sc =( ER*(fast-slow)+slow)^2; Graph0 = AMA( Close, sc );
>     */
>     aO = AMA(O, sc);
>     aH = AMA(H, sc);
>     aL = AMA(L, sc);
>     aC = AMA(C, sc);
> 
>     if (bBarOverlay)
>         Plot(C, "", colorBlack, styleBar);
> }
> else if ( bPriceType == 1 )
> {
>     aO[0] = C[0];
>     aC = (O+H+L+C)/4;
>     aO = AMA( Ref( aC, -1 ), 0.5 );
>     aH = Max( H, Max( aC, aO ) );
>     aL = Min( L, Min( aC, aO ) );
> }
> else
> {
>     aO = O;
>     aH = H;
>     aL = L;
>     aC = C;
> }
> 
> PlotOHLC(aO, aH, aL, aC,""+Name(), colorGreen, styleCandle);
> 
> >Aside from the frustration of "rebuilding" this code several times
> >I'm totally perplexed by this "anomaly" that makes absolutely no
> >sense.
> >
> >
> >  
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/