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

Re: [amibroker] Getting near the end



PureBytes Links

Trading Reference Links

This may not be exactly what you're looking for, but it does show how to plot a vertical line "n" bars to the left of the last bar.
Hope this helps..
Lal
----------
N = Param("Bars away from end", 5, 0, 100, 1);

AtNBar = BarIndex() == LastValue(BarIndex() - N); // are we at Nth bar from the last?
Plot(AtNBar,"", colorRed, styleHistogram| styleOwnScale, Null, Null) ; // Plot vertical line, N bars to left of last bar
-----------

----- Original Message ----
From: John Bollinger <BBands@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Friday, 25 July, 2008 7:56:56 PM
Subject: [amibroker] Getting near the end

Hello,

I'd like to change a calculation as I get within n periods of the end
of an array in real time.

if (BarIndex() <= LastValue(BarIndex) - n)
do this;
else
do that;

The above has problems as it compares an arrray to a number.

I've tried SelectedValue( BarIndex( )).

TIA,

jab



Not happy with your email address?
Get the one you really want - millions of new email addresses available now at Yahoo! __._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___