Your code doesn't work because it never finds a number outside of your initialized 9999999 and - 9999999 values.

 

It cannot find a number outside this range because of your entry test requirements, which always test C against these big numbers, always fails. See red lines of code next:

 

    R[i]=R[i-1];

    S[i]=S[i-1];

 

    if ( C[i-1] >R[i-1] )

    {

        r[i] = C[i-1]+k*f[i-1];

        s[i]= C[i-1]-k*f[i-1];

    }

    if ( C[i-1] <S[i-1] )

    {

        r[i] = C[i-1]+k*f[i-1];

        s[i]= C[i-1]-k*f[i-1];

    }

Also note your first 2 lines designed to pick up yesterday's values, just pick up your limits and propagate them to all bars since the red lines always fail.

--

Terry

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ara Kaloustian
Sent: Saturday, July 01, 2006 13:15
To: [email protected]
Subject: Re: [amibroker] ATR Trading System

 

Dom,

 

I had same problem ...

 

I defined a few variables before loop and that takes care of errors.... but

got zero hits.

 

I also changed some statements in the loop to operate on individual cells,

since you are addressing individual cells with loop.  This made program much

faster, but still no results.

 

All new code is marked as such

 

 

----- Original Message -----

From: "Dominick" <[EMAIL PROTECTED]>

To: <[email protected]>

Sent: Saturday, July 01, 2006 10:24 AM

Subject: Re: [amibroker] ATR Trading System

 

 

> Hi Ara:

>

> I tried your suggestion but keep getting stopped at the "Buy =

> ExRem(Buy, Sell); //Elimina semnalele buy consecutive"

> Maybe I wasn't doing it right.   Could you run this scan and see if it

> happens to you?

>

> If you get it working please show me what you did.

>

> TIA,

>

> dom

>

>

>

>

> 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 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 other support material please check also:

http://www.amibroker.com/support.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:

    [EMAIL PROTECTED]

 

<*> Your use of Yahoo! Groups is subject to:

    http://docs.yahoo.com/info/terms/

 

__._,_.___

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 other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to