[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

Thanks Terry..

But I need to do this during an "Explore"

My long term averages are 30 days and would not work (I don't think)
I think it has to be done in a function. 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, "Terry" <MagicTH@xxx> wrote:
>
> You are using subscripts [0] in AddColumn. They should not be 
there.
> 
> Normally Filter = 1; to see all bars of data, or Filter = Buy; to 
see
> only bars with Buy signals. You can certainly do Filter = C > 4.0 
to see
> only bars where the Close is greater than 4.0. You can even use 
Filter >
> barCount - 15; to see just the last 15 days of AddColumn(), but 
you must
> remove all the subscripts[0]. All you need is the first
> AddColumn(Close,"Close"); which shows all bars that match the 
Filter.
> 
> You can also Explore just the last 15 days in AA by setting n bars 
or
> last n days to 15, same results on a daily database, different if 
using
> intraday data, and setting Filter = 1; 
> --
> Terry
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On
> Behalf Of bestbobleonard
> Sent: Saturday, November 11, 2006 08:58
> To: amibroker@xxxxxxxxxxxxxxx
> 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