PureBytes Links
Trading Reference Links
|
You could always use a loop that starts on the first bar of multiples
of 3 back from the last bar
startbar = barcount - 3*floor(barcount/3);
for(i=startbar;i<barcount;i++)
{
etc
}
On Mon, 11 Oct 2004 22:27:18 -0400, Ken Close <closeks@xxxxxxxx> wrote:
>
> Well, I now have two different ways of showing 3 days per bar (or
> point). They are to use TimeFramCompress(C, 3*inDaily) or to use
>
> x=Param("Days",3,2,5);
> y=Cum(1)%x==0;
> Ox=IIf(y,Ref(O,-(x-1)),Null);
> Hx=IIf(y,HHV(H,x),Null);
> Lx=IIf(y,LLV(L,x),Null);
> Cx=IIf(y,C,Null);
> Vx=Sum(V,x);
> Change=100*(Cx-Ref(C,-x))/Ref(C,-x);
> PlotOHLC(Ox,Hx,Lx,Cx,"",colorBlack,styleCandle);
> GraphXSpace=3;
>
> to plot candles----
>
> What is interesting to observe, in comparison to a similar function in
> TC2000 (wherein you select to show 3 day or x day charts), is that the
> TC2000 internal algorithm works from the last (or current) day
> backwards, while the Amibroker code starts at the beginning of the
> database and works its way forward.
>
> This is shown by looking at the close of the 3 day candle in TC2000 and
> seeing today's price as the close price of the candle.
>
> Looking at today's price of a three day per bar or line chart in
> Amibroker shows either a null or yesterday's value. This is the result
> of working "forward" from the start of the database rather than
> "backwards" from the current day's price. Yesterday (Friday), the close
> of the candle equaled the closing daily price but this is only true
> every third day.
>
> No big deal. I certainly could not program it to match how TC2000 works,
> or do I know if it is even possible. Dimitris could probably do it in
> several lines of code. But it is not so important. On second thought,
> if one was writing a system off of this instead of visual
> interpretation, this difference seems like it could influence crossing
> points, etc and produce different and perhaps inferior results.
>
> I have been interested in this because the 3 day per bar or some other
> variation seems like it can show trends a little more clearly with less
> delay than weekly and somewhat better than daily. Don Worden of TC2000,
> in his nightly notes, said that in today's choppy markets, he was
> switching to 3 days/bar to more clearly spot trends.
>
> Just thought I would share for your information----
>
> Ken
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.775 / Virus Database: 522 - Release Date: 10/8/2004
>
>
> 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
>
>
>
>
>
--
Cheers
Graham
http://e-wire.net.au/~eb_kavan/
------------------------ 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/
|