PureBytes Links
Trading Reference Links
|
Ken,
You can add many conditions. All other conditions you place
in regular SELL rule
+ use ApplyStop.
Sell = Cond2; // place any number of your sell conditions here
Applystop (stopTypeNBar, stopModePoint, 25);
Using AND operator does not work due to the fact that ApplyStop
does not return any value (it just instructs the backtester to
exit if trade is not closed during specified number of bars)
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Ken Close" <closeks@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, May 13, 2003 4:42 PM
Subject: RE: [amibroker] Exit After N Bars without ApplyStop
> Tomasz:
>
> But is it not true that you CAN NOT couple another condition to
> ApplyStop, which is what I asked....
>
> Sell = Cond2 AND Applystop (stopTypeNBar, stopModePoint, 25);??????????
>
> My real problem is the Q3 I asked where the Time variable is reset on
> each multiple Buy rather than on just the first Buy.
>
>
> Ken
>
> -----Original Message-----
> From: Tomasz Janeczko [mailto:amibroker@xxxxxx]
> Sent: Tuesday, May 13, 2003 10:22 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Exit After N Bars without ApplyStop
>
> Hello,
>
> You can use
> Sell = Ref( buy, -25 );
>
> but the most universal method it to use nBar stop
>
> Buy=your rule here
>
> Sell = yourrule here ;
>
> ApplyStop( stopTypeNBar, stopModePoint, 25 );
>
>
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "Ken Close" <closeks@xxxxxxxx>
> To: "AmiBroker List" <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, May 13, 2003 4:14 PM
> Subject: [amibroker] Exit After N Bars without ApplyStop
>
>
> > Question1: How might I cause an exit after N bars with another
> > condition?
> >
> > Could it be:
> >
> > Buy = Cond1;
> > Time = BarSince(Buy);
> > Cond2 = .......
> > Sell = Cond2 OR Time > 25;
> >
> > Question 2: Am I correct that there is NO WAY to "couple" ApplyStop
> with
> > another condition; IOW, I could NOT accomplish the above using
> ApplyStop
> > (type 3)?? If so, how could it be written?
> >
> > Question 3: A more complex variation for the above is this: if the
> Buy
> > statement requires ExRem to filter out extra Buys, what can reset the
> > Buy and still maintain the Time variable?
> >
> > Buy = Cond1 AND Cond1a; // Cond1a produces numerous buys and we want
> the
> > first buy
> >
> > Buy = ExRem(Buy,???????);// If enter Buy,Sell, then how do the
> following
> > lines work
> >
> > Time = BarsSince(Buy);
> > Sell Cond2 OR Time > 25;
> >
> > Sell = ExRem(Sell,Buy);//??????? In the wrong place??
> >
> > I have tried all sorts of variations of the above and can not get the
> > buy sell arrows to appear in the correct places.
> >
> > Any comments on any and all questions would be appreciated.
> >
> > Ken
> >
> >
> >
> > 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
> http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
> 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
> http://docs.yahoo.com/info/terms/
>
>
>
>
>
> 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 http://docs.yahoo.com/info/terms/
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 http://docs.yahoo.com/info/terms/
|