PureBytes Links
Trading Reference Links
|
Gordon,
This code plots the highest visible barindex. This is a zero
based array so the last bar will be 1 less than the total number of
quotes.
BV = <FONT
color=#0000ff>Status(<FONT
color=#ff00ff>"barvisible"<FONT
size=2>); HVBIndex = <FONT
color=#0000ff>LastValue( <FONT
color=#0000ff>Highest( <FONT
color=#0000ff>ValueWhen(BV,<FONT
color=#0000ff>BarIndex())
), True<FONT
face="Courier New"> );
Plot(HVBIndex
,"HVBIndex",<FONT
color=#ff00ff>1,<FONT
color=#000000>styleLine);
Regards,William Peters<A
href="">www.amitools.com
-----Original Message-----From: Gordon [<A
href="">mailto:amibroker@xxxxxxxxxxxxxx]Sent:
Monday December 8, 2003 3:56 PMTo: amibroker@xxxxxxxxxxxxxxxSubject:
[amibroker] Bar index of last visible barI'm writing an indicator.
Searching the newsgroup archives, I found(posted 3/2/2003) what I thought
was my answer to determining the barindex of the last visible
bar:"Tomasz posted this to the member section a while
ago......barvisible = Status("barvisible");r = RSI( 14 );maxr =
LastValue( Highest( IIf( barvisible, r, 0 ) ) );"So it would seem
that:aVisBars = Status("barvisible");nLastVisBar =
LastValue(Highest(IIf(aVisBars, BarIndex(), 0)));should work, where
nLastVisBar holds the barindex of the last visiblebar. However, nLastVisBar
always has a value of 0 when I access it incode. Also, the help says that
Highest returns a NUMBER, but it seemsto be an ARRAY. Without the use of the
LastValue() function, I can'tuse nLastVisBar in an IF statement.That
way I initialize nLastVisBar, btw, is at the top of anindicator. The value
is then used to control a for loop.If anyone can see the error I must be
missing, I would appreciate
it.Gordon------------------------ Yahoo! Groups Sponsor
---------------------~-->Buy Ink Cartridges or Refill Kits for your HP,
Epson, Canon or LexmarkPrinter at MyInks.com. Free s/h on orders $50 or more
to the US & Canada.<A href=""
target=_blank>http://www.c1tracking.com/l.asp?cid=5511<A
href=""
target=_blank>http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM---------------------------------------------------------------------~->Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx(Web page: <A
href=""
target=_blank>http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href=""
target=_blank>http://groups.yahoo.com/group/amibroker/files/groupfaq.htmlYour
use of Yahoo! Groups is subject to <A href=""
target=_blank>http://docs.yahoo.com/info/terms/
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|