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

RE: [amibroker] DallasNTAmibroker group



PureBytes Links

Trading Reference Links

Salil,
Let the new array be g. In IB you may have

Cond=DayOfWeek()==2;
Ctue=ValueWhen(Cond,C);
Plot(Ctue,"Ctue",1,1);
j=0;g=0;
for(i=0;i<BarCount;i++)
{
if(Cond[i]==1)
{
g[j]=Ctue[i];j=j+1;
}
}
Plot(g,"g",2,2);

The array g will have the Tuesdays values for the first LastValue(Cum
(Cond)) elements. The rest are filled with zeros[or any other value].
If you want to move g at the end, then it should begin from the 
(L1-num) th element with

Cond=DayOfWeek()==2;
Ctue=ValueWhen(Cond,C);
Plot(Ctue,"Ctue",1,1);
num=LastValue(Cum(Cond));L1=LastValue(Cum(1))-1;
j=L1-num;g=0;
for(i=0;i<BarCount;i++)
{
if(Cond[i]==1)
{
g[j]=Ctue[i];j=j+1;
}
}
Plot(g,"g",2,2);

Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Salil,
> cond=Dayofweek()==2;
> num=lastvalue(cum(cond));
> will give the length of this new array.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "Salil V Gangal" 
> <salil_gangal@xxxx> wrote:
> > Friends,
> > 
> > I have a data-series, say Nasdaq Composite closing values (^IXIC) 
> in 
> > AmiBroker, then is there a way I can create an array based on 
this 
> > data-series of Nasdaq, which has in it the closing values of only 
> > Tuesday's using AFL, within Indicator Builder ?  If Tuesday's 
data 
> is 
> > not present, then next day's data is to be taken instead.
> > 
> > Regards,
> > - Salil V Gangal



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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