PureBytes Links
Trading Reference Links
|
Try Something like this: TradingDaysfromStartofCalendarYear = ValueWhen( start == DateNum(), BarIndex(), 1);
Your chosen start date must be a valid trading day (not a holiday).
On Sat, Oct 4, 2008 at 2:20 PM, jim_wiehe <jim_wiehe@xxxxxxxxx> wrote:
I cant seem to get the BarIndex() count from a calendar date.
Sometimes I get large numbers and sometimes no number. I'm sure this
is a real easy one for the experienced Amibroker users. Any help
would be greatly appreciated
Thanks in advance
start = ParamDate( "Start Date", "2008-01-01" );
TradingDaysfromStartofCalendarYear = ValueWhen( start,BarIndex(), 1);
ROCSinceStartOfYear=ROC(C,TradingDaysfromStartofCalendarYear );
Filter = C> 15 AND MA(V,10) >1000000;
Buy=Filter;
Sell=EMA(C,6)<EMA(C,7);
AddColumn( Close, "Close ",1.2 );
AddColumn( ROC(C,1), "1 day %Chg ",1.2 );
AddColumn( ROC(C,5), "5 day %Chg ",1.2 );
AddColumn(ROCSinceStartOfYear,"ROC Year",1.2);
__._,_.___
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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
*********************************
__,_._,___
|