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

RE: [amibroker] Re: Observation on 3 days per bar plotting



PureBytes Links

Trading Reference Links

As usual, simple and correct.

 

DT, thanks for the easy change.

 

Thanks also to others who shared their ideas on this topic.

 

Ken

 

-----Original Message-----
From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@xxxxxxxxx] 
Sent: Tuesday, October 12, 2004 12:44 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Observation on 3 days per bar plotting

 


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 (HYPERLINK
"http://www.grisoft.com)."http://www.grisoft.com).
> Version: 6.0.775 / Virus Database: 522 - Release Date: 10/8/2004





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

Check group FAQ at: HYPERLINK
"http://groups.yahoo.com/group/amibroker/files/groupfaq.html"http://grou
ps.yahoo.com/group/amibroker/files/groupfaq.html 






Yahoo! Groups Sponsor



ADVERTISEMENT
HYPERLINK
"http://us.ard.yahoo.com/SIG=12921s57t/M=295196.4901138.6071305.3001176/
D=groups/S=1705632198:HM/EXP=1097642653/A=2128215/R=0/SIG=10se96mf6/*htt
p:/companion.yahoo.com"click here


 HYPERLINK
"http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=621528184"

 

   _____  

Yahoo! Groups Links

*	To visit your group on the web, go to:
HYPERLINK
"http://groups.yahoo.com/group/amibroker/"http://groups.yahoo.com/group/
amibroker/
  
*	To unsubscribe from this group, send an email to:
HYPERLINK
"mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe"amibro
ker-unsubscribe@xxxxxxxxxxxxxxx
  
*	Your use of Yahoo! Groups is subject to the HYPERLINK
"http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service. 


---
Incoming 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



---
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
 


[Non-text portions of this message have been removed]



------------------------ 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/