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

Re: [amibroker] BarsSince(Buy)



PureBytes Links

Trading Reference Links

Hello,

The answer is in the User's Guide:
http://www.amibroker.com/guide/h_understandafl.html

Hint: all arrays are processed at once and your BarsSince(Buy) is effectivelly
BarsSince(False).

You can use ExRemSpan instead:

Buy = Cross( RSI(3), 47 );
Buy = ExRemSpan( Buy, 10 );

Sell = Cross( 52, RSI(3)) AND BarsSince( Buy ) > 10;
Sell = ExRemSpan( Sell, 10 );


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "zoli_j" <novizoli@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, November 12, 2004 10:28 AM
Subject: [amibroker] BarsSince(Buy)


> 
> 
> Hallo Group!
> 
> Why doesn't work this AFL code?
> 
> "
> Buy = False; 
> Sell = False; 
> Buy[0] = True; 
> Sell[0] = True; 
> 
> Buy = Cross(RSI(3), 47) AND (BarsSince(Buy) > 10) AND (BarsSince
> (Sell) > 10); 
> Sell = Cross(52,RSI(3)) AND (BarsSince(Buy) > 10) AND (BarsSince
> (Sell) > 10);
> Plot(BarsSince(Buy),"BarsSince(Buy)",colorGreen,styleLine);
> "
> 
> I got Buy signal even if last Buy was for example yesterday.
> Could anybody help me?
> 
> BR,Zoli.
> 
> 
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/