Search the web
Sign In
New User? Sign Up
amibroker · AmiBroker User's List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Wierd trailing stop problem in backtest. Please help????   Message List  
Reply | Forward Message #139979 of 143720 |
Re: Wierd trailing stop problem in backtest. Please help????

Hi,
I think this may be something to do with the way I have constructed a permission
filter, with an incorrect use of 'setForeign'. It may be screwing up all the
test results. I'll post back when I've fixed it.
Regards, Chris.

--- In amibroker@yahoogroups.com, "christianvost" <christianvost@...> wrote:
>
> Hi. Can anyone help? I am backtesting a system which uses Buy,Sell,Short,Cover
variables,(TradeDelays,0,0,0,0) on close, and also stopTypeProfit(8.25%) and
stopTypeTrailing(5.25%). The problem that I am having is in backtesting. One of
the trades is a long position on the close, at $45.00, the following bar opens
lower at 43.9353, and is closed out immediately (Long trail). Resulting in a
loss of -2.37% The price then climbs to reach the profit target, but it's
already closed. I set the trailing stop at 5.25% so shouldn't the trailingstop
set itself at 5.25% below the entry price, and then trail, which is what I want
it to do.
> Here is a snippet of my code,
>
> Buy = Cross(FStRSISm,ForeignStochRSI) AND Permit; //Permit=Filter
> Sell = Cross(ForeignStochRSI,FStRSISm);
> Short = Cross(ForeignStochRSI,FStRSISm) AND (NOT Permit);
> Cover = Cross(FStRSISm,ForeignStochRSI);
>
> ProfStop = 8.25;
> TrailStop = 5.25;
> ApplyStop(stopTypeProfit,stopModePercent,ProfStop);
> ApplyStop(stopTypeTrailing,stopModePercent,TrailStop);
>
> The system itself, does not generate any exit signals or opposite entry
signals which could also close the trade. Therefore I can only assume that I am
missing something in the code or settings, for the trailing stop.
>
> Many thanks for any help, Chris.
>





Mon Jul 6, 2009 4:07 am

christianvost
Offline Offline
Send Email Send Email

Forward
Message #139979 of 143720 |
Expand Messages Author Sort by Date

Hi. Can anyone help? I am backtesting a system which uses Buy,Sell,Short,Cover variables,(TradeDelays,0,0,0,0) on close, and also stopTypeProfit(8.25%) and...
christianvost
Offline Send Email
Jul 5, 2009
2:54 am

Hi, I think this may be something to do with the way I have constructed a permission filter, with an incorrect use of 'setForeign'. It may be screwing up all...
christianvost
Offline Send Email
Jul 6, 2009
4:08 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help