| -----Original Message-----
| From: amibroker@xxxxxxxxxxxxxxx [mailto:
amibroker@xxxxxxxxxxxxxxx] On
| Behalf Of pennellp2000
| Sent: Tuesday, August 23, 2005 16:49
| To: amibroker@xxxxxxxxxxxxxxx
| Subject: [amibroker] Re: exit help required
|
| Terry,
| I have tried both Applystop and AFL seperately as below. Both
| methods seem to give different exits to my manual backtesting
|
|
| Method 1 using AFL.
|
| Cond1 = Cross(Ref(LLV(Low,5),-1),Close);
| Cond2 = ValueWhen(Buy,BuyPrice) - 1.6*ATR(30);
| Sell = Cond1 AND Cond1 > BuyPrice OR Cross(Cond2,Close);
| // Cond2 is my max stop loss//
|
| Method 2 using Applystop
| ApplyStop(2,2, Cross(Ref(LLV(Low,5),-1),Close),0);
| ApplyStop(0,2,2*ATR(30),0,True,True);
|