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

Re: [amibroker] Chart X-Axis



PureBytes Links

Trading Reference Links

Jojeph,
The binary condition BarsSince(Buy)>d will be equal to 0[FALSE] or 1
[TRUE]
Since Sell*0=0 and Sell*1=Sell, you may have

 Buy=...;
Sell=...;
d=10;
Buy=ExRemSpan(Buy,d);//it will remove excessive buys within d bars 
after the Buy signal
Sell=(BarsSince(Buy)>d)*Sell;//it will accept Sell signals ONLY d 
bars after the Buy signal

In this form, no Buy/Sell will appear d days after any Buy signal.
Is this what you want ?
Dimitris Tsokakis
> 
> -----Original Message-----
> From: Joseph Rivera [mailto:shibumi@x...] 
> Sent: Thursday, 12 February 2004 9:36 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Minimum BarSinceEntry
> 
> 
> Greetings to all.
> I've been using the archives extensively to learn BaGooDills of AB 
so 
> thank all of you for your past contributions. People really DO read 
> your post(s), years later and they really ARE very helpful.
> 
> I've got what should be a simple problem that is giving me a MAJOR 
> headache.
> 
> How do you code AFL to hold a position open (LONG) for a minimum 
> number of bars regardless of any other signals that might occur 
> during that timespan?
> 
> I've tried :
> 
> Buy= X > 50
> Sell= X <50 AND BarsSince(Buy)>=10;
> Doesn't work..
>  
> I tried:
> Buy = X >50
> ExRemSpan(Buy,10)
> Sell= X < 50 AND BarsSince(Buy)>=10;
> 
> I tried:
>  Sell = X < 50 AND BarsSince(Buy>10);
> 
> 
> I've tried cursing the %@#$# screen..
> That doesn't help much either.
> 
> Isn't there a native AFL method to do this without scripting a 
> BarSinceEntry type count loop?
> 
> Thanks~
> 
> 
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/