PureBytes Links
Trading Reference Links
|
<SPAN
class=186270704-30042003>Owen,
<SPAN
class=186270704-30042003>
I have
not tested this but it should get you started....
<SPAN
class=186270704-30042003>
<SPAN
class=186270704-30042003>cond1=your stochastic event (a
Binary)
cond2=
your second event (buy, sell. ma cross, etc)
<SPAN
class=186270704-30042003>
now
count the number of bars that have passed since your second
condition
<SPAN
class=186270704-30042003>
<SPAN
class=186270704-30042003>pds=barssince(cond2);
<SPAN
class=186270704-30042003>count=sum(cond1,pds);
<SPAN
class=186270704-30042003>
this
should offer the signals since the last buy.
<SPAN
class=186270704-30042003>
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: Owen Davies
[mailto:owen5819@xxxxxxxxxxxx]Sent: Tuesday, April 29, 2003 5:54
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Please help extend
function of condition counter (Was Re: [amibroker] Re: Resetting
counter)Can anyone tell me how to count events after a
certain condition is met?Say, number of times a stochastic (or whatever) has
crossed its movingaverage (or whatever) since Cross(C,MA(C,20)) (or
whatever?)Actually, while I'd like the most general solution possible,
at the momentI'm trying to count events after a Buy, Sell, Short, or
Cover. And, ofcourse, it has to be reset for the next trade.(I
swear, fifteen years ago I could have figured this out for myself.
Ireally gotta get back into programming!)Many thanks.Owen
DaviesSend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
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
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|