PureBytes Links
Trading Reference Links
|
Ara, the Help
says:SYNTAX BarsSince( ARRAY )RETURNSARRAYFUNCTION
Calculates the number of bars (time
periods) that have passed since ARRAY was true (or
1)Perhaps BarsSince() cannot be used
with ticks since Ticks are not timebased. It may be related to the fact that
there is no unique answer, as time is in seconds and there could be many bars in
one second. Don't ask me why but the code below "appears" to work, please
let me know if this turns out to be correct because i am also working with
ticks.
SecMark = <FONT
face="Lucida Console" color=#0000ff size=2>TimeNum<FONT
face="Lucida Console" size=2>() != <FONT face="Lucida Console"
color=#0000ff size=2>Ref(<FONT
face="Lucida Console" color=#0000ff size=2>TimeNum<FONT
face="Lucida Console" size=2>(),-<FONT face="Lucida Console"
color=#ff00ff size=2>1<FONT face="Lucida Console"
size=2>);<FONT face="Lucida Console" color=#0000ff
size=2>Plot(<FONT
size=2>SecMArk,<FONT
face="Lucida Console" color=#ff00ff size=2>""<FONT face="Lucida Console"
size=2>,1<FONT
face="Lucida Console" size=2>,<FONT face="Lucida Console" color=#ff00ff
size=2>2);Num_Bars = <FONT
face="Lucida Console" color=#0000ff size=2>Sum<FONT face="Lucida Console"
size=2>(<FONT face="Lucida Console" color=#0000ff
size=2>BarsSince(<FONT
size=2>SecMark),<FONT
face="Lucida Console" color=#ff00ff size=2>500<FONT face="Lucida Console"
size=2>);Title = <FONT face="Lucida Console" color=#ff00ff
size=2>""+Num_Bars;
<FONT face=Arial
color=#0000ff>Best regards,
<FONT face=Arial
color=#0000ff>herman -----Original
Message-----From: Ara Kaloustian [<A
href="">mailto:ara1@xxxxxxxxxx]Sent: Sunday,
August 08, 2004 3:40 PMTo: AB-MainSubject: [amibroker] Tick
barsI am trying to compute the number of bars (in tick data base
mode) per 5 minute interval and 50 or 144 tick chart, usingNum_Bars =
BarsSince(TimeNum() > TimeNum() -500);The answer is always
zero.Anyone see the problem with code ?AraCheck
AmiBroker web page at:<A href=""
target=_blank>http://www.amibroker.com/Check group FAQ at: <A
href=""
target=_blank>http://groups.yahoo.com/group/amibroker/files/groupfaq.htmlYahoo!
Groups SponsorADVERTISEMENTYahoo! Groups
LinksTo visit your group on the web, go to:<A
href=""
target=_blank>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 the Yahoo! Terms of Service.
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|