logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
bearishbull  
#1 Posted : Friday, August 19, 2005 9:27:10 AM(UTC)
bearishbull

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/30/2005(UTC)
Posts: 71

OK I want to backtest the following: You start long, there is a 2% trailing stoploss and if it's hit you are short with again a 2% tralingstoploss...etc..If that stoploss is hit you are long again with a 2% trailing stoplos.. This loks like easy to make, mbut I can't do it..:( help me!
wabbit  
#2 Posted : Friday, August 19, 2005 9:49:42 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Have you tried doing this with Richard Dale's excellent and free trailing stop loss indicator? wabbit :D If not, try it. If so, then shout and we can do it over the weekend as a project?? SWMBO dependent, of course! :smt079
bearishbull  
#3 Posted : Friday, August 19, 2005 9:53:02 AM(UTC)
bearishbull

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/30/2005(UTC)
Posts: 71

wabbit wrote:
Have you tried doing this with Richard Dale's excellent and free trailing stop loss indicator? wabbit :D If not, try it. If so, then shout and we can do it over the weekend as a project?? SWMBO dependent, of course! :smt079
where can I find that Richard dale stuff?
wabbit  
#4 Posted : Friday, August 19, 2005 9:55:41 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
bearishbull  
#5 Posted : Friday, August 19, 2005 10:13:56 AM(UTC)
bearishbull

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/30/2005(UTC)
Posts: 71

wabbit wrote:
http://www.tradernexus.com/advancedstop/advancedstop.html wabbit :D
nope, don't work, those Stop are based on ATR.. I know I should use something like this: HighestSince(1, entry, h) * (1/1.02) but that's all :(, it's harder than it sounds
bearishbull  
#6 Posted : Sunday, August 21, 2005 9:24:45 AM(UTC)
bearishbull

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/30/2005(UTC)
Posts: 71

bump... is this impossible?
wabbit  
#7 Posted : Sunday, August 21, 2005 12:23:02 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
bb, I started working on this one for you but SWMBO had to use the computer for her assignments due to tomorrow. Where I was up to... I started with writing the pseudo code: On the first bar in the chart, no trades open: ...check to see if any long or short entry conditions are met ...if an entry condition is met, open the long or short trade as applicable On the second bar: ...if no trades are open, check to see if any long or short entry conditions are met and open a trade as applicable ...if a trade is already open, check to see if an exit condition has been met. An exit in one direction is automatically an entry in the opposite direction On each subsequent bar: ...if no trades are open, check to see if any long or short entry conditions are met and open a trade as applicable ...if a trade is already open, check to see if an exit condition has been met. An exit in one direction is automatically an entry in the opposite direction Using the PREV function, this should be quite do-able, and using Patrick's latch should also make things easier too. The initial entry criteria is your long/short entry criteria. Once one of these trades is open (the value of the latch is 1 or -1), then check to see if the exit condion is met, and recompute on the next bar. Without testing: stop:=2;{percent} FastMA:=Mov(C,7,S); SlowMA:=Mov(C,21,S); LE:=Cross(FastMA,SlowMA); LX:=C<((100-stop)/100)*HighestSince(1,LE,H); SE:=LX; SX:=C>((100+stop)/100)*LowestSince(1,SE,L); LE:=SX; ExtFml("ForumDll.Latch",LE,LX,SE,SX) See if that helps the problem? If not, you will have to wait until I get back from working away and out of touch for a little for a little while... wabbit :D P.S. I think that you are going to want to be trading extreeeeemly large priniciples to overcome the brokerage of such a trading system - I suggest you rethink the logic if you want to avoid the poor house!
bearishbull  
#8 Posted : Sunday, August 21, 2005 1:47:05 PM(UTC)
bearishbull

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/30/2005(UTC)
Posts: 71

wabbit wrote:
P.S. I think that you are going to want to be trading extreeeeemly large priniciples to overcome the brokerage of such a trading system - I suggest you rethink the logic if you want to avoid the poor house!
Don't have the tme now to try, try it later today.. This system is not one I will use in the real market, It's just for the statistics I use.. update --- ok, tried the code, don'; t work the way it should...
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.