Buy=Sell=Cump=Vanz=0;
Buy[i] = Close[i] > R[i];
Sell[i] = Close[i] < S[i];
Cump[i]=Buy[i];
Vanz[i]=Sell[i];
this applies to the Buy,Sell,Cump,Vanz arrays. You also cannot use IIF inside a loop in this case.
Another item is the plotshapes that define the location of the arrows. eg Low-50 means $50 below Low. Unless this price already shows on your screen you will not see the arrows. You are much better to use the full power of the plotshapes and define it as the pixel offset
PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -10 );
PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -10 );
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
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:
<*> 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
| Investment management software | Real estate investment software | Investment property software |
| Software support | Real estate investment analysis software | Investment software |
YAHOO! GROUPS LINKS
- Visit your group "amibroker" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
