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

RE: [amibroker] Multiple entries



PureBytes Links

Trading Reference Links




<SPAN 
class=028035805-24032003>Chuck,
This 
is a good example of a use for cum(1) or barindex(). We need to see if more than 
3 buys have occurred since the last sell. You should be able to adapt this 
example. Note I used Exrem only for the sell side...
<SPAN 
class=028035805-24032003> 
<FONT 
color=#282828 size=2> 
Sell1=<FONT 
size=2>C<MA<FONT 
size=2>(C,<FONT 
size=2>20<FONT 
color=#0000ff>);
Buy1=<FONT 
size=2>C>MA<FONT 
size=2>(C,<FONT 
size=2>20<FONT 
color=#0000ff>);
x=ValueWhen(Sell<FONT 
face=Arial size=2>1,BarIndex<FONT 
size=2>(),1<FONT 
color=#0000ff>);
y=ValueWhen(Buy<FONT 
face=Arial size=2>1,BarIndex<FONT 
size=2>(),1<FONT 
color=#0000ff>);
test=Ref(y,-<FONT 
size=2>3)<x<FONT color=#282828 face=Arial 
size=2>;
 <FONT 
color=#0000ff>
Buy=Buy1 <FONT face=Arial 
size=2>AND<FONT 
color=#0000ff> test;<FONT color=#000000 face=Arial 
size=2>
Sell<FONT color=#282828 face=Arial 
size=2>=Sell1;<FONT color=#000000 
face=Arial size=2>
Sell=<FONT face=Arial 
size=2>ExRem(<FONT face=Arial 
size=2>Sell,<FONT face=Arial 
size=2>Buy<FONT 
color=#0000ff>);
 
 Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Chuck Rademacher 
[mailto:chuck_rademacher@xxxxxxxxxx]Sent: Monday, March 24, 2003 
12:45 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
Multiple entries
My 
system in question is trading stocks, long and short.  I want to be able to 
take my "buy" signal the first three times that it occurs.  If I was buying 
1,000 shares, I could end up with 3,000 shares long before 
exiting.
<FONT color=#0000ff face=Arial 
size=2> 
If I 
use ExRem, I end up taking the signal once.  Without ExRem, I could take 
the signal a hundred times.
<FONT color=#0000ff face=Arial 
size=2> 
Can 
anyone help me modify the system to limit the number of positions I will 
take.
<FONT color=#0000ff face=Arial 
size=2> 
Thanks 
in advance!Send 
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


  ADVERTISEMENT









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.