Seems another method for the calculation would be easier
This just adds up the number of previous "days" bars for condition of
volume>previous bar volume

Days=Param("Days To Test",1,1,15,1);
TestVolume = sum(Volume>Ref(Volume ,-1), Days);
PassTest = TestVolume == Days;


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 05/12/06, Ara Kaloustian <[EMAIL PROTECTED]> wrote:

use
PassTest = iif(testvolume ==False,True);

if statements can be used with not array variables.

----- Original Message -----
From: "Homar Simpson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, December 04, 2006 8:51 PM
Subject: [amibroker] Having a nasty time figuring this APL out.


>  Long time programmer, but mostly in VB type languages. I dont think
> thats the problem here though.
>
>  Tried a bunch of styles before I realized that you need to use ==
> for testing (again, not needed in VB).
>
>  But now the complier is complaining that
>
>  >>>  if (TestVolume == False) PassTest = False;
>
>  is using an array.  Whats up with that?  Testvolume is either true
> or false , so I dont know what an array has to do with it, other than
> the Volume array that its testing.
>
> I'm sure its an easy fix ;-).
>
>
>
> Days=Param("Days To Test",1,1,15,1);
>
> PassTest=True;
>
> for(i=Days; i>0 ; i--)
>
> {
> TestVolume = (Ref(Volume ,-i+1)> Ref(Volume ,-i));
>
>
> if (TestVolume == False) PassTest = False;
>
>
> FL1=PassTest;
> FL2=Close >Param("ClosingPrice",5,0,999999,1);
>
> Filter = FL1 AND FL2;
>
> AddColumn(Close,"Close",1.4);
> AddColumn(Volume,"Volume",1.0);
> AddTextColumn( FullName(), "Full name", 77);
>
> AddColumn(Ref(Volume,-1),"Volume -1",1.0);
> AddColumn(Ref(Volume,-2),"Volume -2",1.0);
> AddColumn(Ref(Volume,-3),"Volume -3",1.0);
>
>
>
> 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
>
>
>


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




Reply via email to