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

RE: [amibroker] Re: exit help required



PureBytes Links

Trading Reference Links

I think you need to rework some of your statements since Cross(x,y) will only result in a 1 or 0 (True or False) and it appears you are assuming it results in a price. There are two places noted by red text.

 

It’s possible in your ApplyStop case that you just want a 1 point stop, but you are probably getting either a 0 point stop or a 1 point stop by using the Cross function there depending on the truth of the Cross().

 

If you want a stop at a certain price I think you need to convert it to points instead of an absolute price.

--

Terry

 

| -----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);

|

 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software Stock investment software


YAHOO! GROUPS LINKS