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

Re: [amibroker] Chart X-Axis



PureBytes Links

Trading Reference Links

Hi hoping I can help a bit with your code
First I suggest you change the buy and sell signalls to that of Buy =
Cross(X,50); Sell = Cross(50,X);
This will make them a single signal than signals for every bar that X is
greater or lesser than 50, and much easier for using. You should then find
that the exremspan(buy,10); should work better.

Cheers,
Graham
http://e-wire.net.au/~eb_kavan/

-----Original Message-----
From: Joseph Rivera [mailto:shibumi@xxxxxxxxxxxxxxx] 
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@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



 



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/