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

[amibroker] Re: Newbie Problem Looping the last 15 days. It maybe me. Maybe AMI broker.



PureBytes Links

Trading Reference Links

Hi Steve, 

Thanks for your post..

But I need to do this during an "Explore" Thus I think I have to do 
this in a function. My long term averages are 30 days and would not 
work (I don't think). I have another qualifier that I only want to 
test 10 days back.

I did eliminate close[0].

Do you know know why close[1] and close[2] don't give we what I 
expect?

Thanks
BobL







--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxx> wrote:
>
> Hi - It can be done easily without any loops. Here is example for 
gapup's.
> 
> Filter = GapUp()
> AddColumn( Close, "Close" );
> 
> Load the code into AA, select your stock or list, select "last n 
quotes" and 
> fill in 15, hit Explore
> 
> Steve
> 
> ----- Original Message ----- 
> From: "bestbobleonard" <bestbobleonard@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, November 11, 2006 10:58 AM
> Subject: [amibroker] Newbie Problem Looping the last 15 days. It 
maybe me. 
> Maybe AMI broker.
> 
> 
> > Hi,
> >
> >
> > I want to back test the last 15 days (ONLY) for some data 
anomalies
> > like gapup, etc. I have a simple (STARTER!) function for this
> > below.  I'm beginning to think I don't see array processing
> > correctly.
> >
> > I did read the manual on arrays and it's not clear on some 
points so
> > finally I did the following:
> >
> > Filter =  (Close[0] > 4.0)  ;
> >
> >
> > AddColumn(Close, "Close");
> > AddColumn(Close[0], "Close0");
> > AddColumn(Close[1], "Close1");
> > AddColumn(Close[2], "Close2");
> >
> >
> > Which gets:
> > Ticker Date/Time Close close1 close2 close3 close4
> > JCP 11/9/2006 79.55 53.75 52.21 53.40 54.18
> >
> >
> > Clearly, I'm not getting correct elemens of the array. The values
> > shhould all be it ther $70's. Maybe I misunderstood the
> > Manual but the page on arrays is skimpy and poorly written.
> >
> >
> > Maybe someone can just point me to some better
> > examples/documentation.
> >
> > I read it that "close[0] equals day1 in his tables??"
> >
> > I'm using QP3.
> >
> > Or maybe show me what's wrong with the below function.
> >
> > Thanks for Any suggestions,
> > BobLenard (programming newbie)
> >
> >
> > // *************************
> > ////
> >
> >
> > function Dropper(period)
> > {
> > yesno = 0;
> >
> > global dropdelta;
> >
> > dropdelta[0] = 0; //initaliation & needed for debug!
> >
> >  for (i = 1; i <= 15; i++)
> >   {
> >    dropdelta [i] =  High[i] -  Low [i +1 ] ;
> >   }
> >
> >
> >  for (j = 1; j <= period; j++)
> >   {
> >    if ( dropdelta[ j ] < 0)
> >     yesno = 1;
> >   }
> >
> > return yesno;
> >
> > }
> >
> >
> > gotadrop = Dropper(15);
> >
> >
> > Filter =  (Close[0] > 4.0)  ;
> >
> > AddColumn(Close, "Close");
> >
> > AddColumn(dropdelta[1], "dtest1");
> >
> > AddColumn(dropdelta[2], "dtest2");
> >
> > AddColumn(dropdelta[3], "dtest3");
> >
> > AddColumn(dropdelta[4], "dtest4");
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>




Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.11/542 - Release Date: 11/20/2006