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

[amibroker] Re: Arrays handling



PureBytes Links

Trading Reference Links

Try
myarray=Cum(Cum(1)>LastValue(Cum(1)-50));
Plot(myarray,"",1,1);
DT
--- In amibroker@xxxxxxxxxxxxxxx, "nkis22" <nkishor@xxxx> wrote:
> I am trying to fill in an array (j) with 0 to 50
> so that the last bar is 50. Tried this code below but
> doesn't work. Please help
> 
> prd=50;
> Lb=LastValue(Cum(1));
> fb=Lb-prd; //fb is the bar to start, so fb should show 0
> 
> j[0]=-1e10; //empty array
> k=0;
> for(i=fb; i<Lv; i++)
> {
> j[i]=k;
> k=k+1; //increase counter
> 
> }
> Plot(j,"",1,1);
> 
> 
> tia
> nand
> 
> 
> 
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" 
<psytek@xxxx> 
> wrote:
> > You can pre-fill arrays with empty values (-1e10) so they don't 
> plot.
> > 
> > Herman
> > 
> > -----Original Message-----
> > From: Tomasz Janeczko [mailto:amibroker@x...]
> > Sent: May 2, 2003 2:41 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] Arrays handling
> > 
> > 
> > Hello,
> > 
> > Currenly all AFL arrays are setup so they have equal length 
(equal 
> to number
> > of data points available for given symbol)
> > 
> > This is essential to enable them to match with price arrays.
> > This way given array element refers to the same date/time
> > as in other array. So 70th element of your custom array x[ 70 ]
> > refers to 70th bar of Close array and they both represent
> > value at given date.
> > 
> > If they were not one would never be sure if shorter array
> > refers to FIRST or LAST part of price array (or maybe some
> > part in the middle).
> > 
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > 
> > ----- Original Message -----
> > From: "Listes trading" <listes.trading@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Thursday, May 01, 2003 6:10 PM
> > Subject: [amibroker] Arrays handling
> > 
> > 
> > > Tomasz
> > >
> > > I am playing a little bit with loops and I encounters the 
> following
> > problem.
> > > In AFL , all arrays have the length of the current price array 
> and this
> > > causes some troubles.
> > > Example:
> > > for(i=1; i<=100; i++)
> > > {
> > > X[i} = i;
> > > }
> > > mini = lowest(X);
> > > last = lastvalue(X);
> > >
> > > I would expect to have mini = 1 and last=100
> > > Unfortunately, AFL stores the values from 1 to 100 in the first 
> one
> > hundred
> > > elements of the array and then pads with 0.
> > > This causes the results to be mini =0 and last=0.
> > > How to handle this kind of situation?
> > > Would it be possible to add the capability to define array with 
> length
> > > different than the price array?
> > >
> > > Waz
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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 
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > 
> > 
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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 
> http://docs.yahoo.com/info/terms/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/uetFAA/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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/