PureBytes Links
Trading Reference Links
|
Ken,
You dont really need several lines to change the direct counting [Cum
(1)] to inverse counting.
Just replace your
y=Cum(1)%x==0;
with
y=(LastValue(Cum(1))-Cum(1))%x==0;
and you will always see the last 3-day candle.
Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> 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);
> 0;y=Cum(1)%x==
> 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
------------------------ 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/
|