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

Re: [amibroker] N bar candlesticks



PureBytes Links

Trading Reference Links

Hello,

N-day bars are natively available in 4.63.0 and above.
See Tools->Preferences->Intraday
enter
N-day interval here.

Or use TimeFrame functions

TimeFrameSet( 3 * inDaily ); // 3-day interval

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "aequalsz" <aequalsz@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, November 23, 2004 8:28 PM
Subject: [amibroker] N bar candlesticks


> 
> 
> Hello,
> 
> Seems like someone may have already presented something similar. 
> Anyway here's a simple AFL code to display N bar candlesticks.   
> 
> Aequalsz
> 
> 
> Nbars = Param("N bars",1,1,10,1);
> 
> ibar = BarCount-1;
> for( i =  BarCount-Nbars; i > 0; i=i-Nbars )
> {
> 
> Mopen[ibar] = Open[i];
> Mclose[ibar] = Close[i+Nbars-1];
> 
> Hs = 0.0;
> Ls = 100000.0;
> for(j=i; j < i+Nbars; j++)
> {
> if(High[j] > Hs)
> {
> Hs = High[j];
> } 
>                       if(Low[j] < Ls)
> {
> Ls = Low[j];
> } 
> }
> Mhigh[ibar] = Hs;
> Mlow[ibar] = Ls;
> ibar = ibar - 1;
> }
> 
> GraphXSpace = 1;
> 
> PlotOHLC(Mopen,Mhigh,Mlow,Mclose,"Mult day bars",c
> olorWhite,styleCandle);
> 
> 
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/