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

Notification

Icon
Error

Options
Go to last post Go to first unread
minnamor  
#1 Posted : Sunday, March 5, 2006 12:00:26 PM(UTC)
minnamor

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 126
Location: Italy

I would like to test a number of pattern trading systems. I am not sure how to handle in system tester an exit based on both: 1. a stop loss at the low of the setup bar (or lowest low in setup, as in the example below) and 2. a time in position limit (5 bars in the example). As an example, take the following entry long condition (I have used the Ref() function for the timing stop rather than the BarsSince() or Simulation.CurrentPositionAge functions which I understand are equivalent): BUY ORDER: setup:=C>O AND L>Ref(L,-2) AND Ref(L,-1)<Ref(L,-2) AND Ref(L,-2)<Ref(L,-3) AND H>Ref(H,-1); Ref(setup,-1) and H>Ref(H,-1) order type: Stop: Max(O,Ref(H,-1)) SELL ORDER: setup:=C>O AND L>Ref(L,-2) AND Ref(L,-1)<Ref(L,-2) AND Ref(L,-2)<Ref(L,-3) AND H>Ref(H,-1); L<ValueWhen(1,setup,Ref(L,-1)) or Ref(setup,-5) order type: Stop: setup:=C>O AND L>Ref(L,-2) AND Ref(L,-1)<Ref(L,-2) AND Ref(L,-2)<Ref(L,-3) AND H>Ref(H,-1); If(L<ValueWhen(1,setup,Ref(L,-1)),Min(O,ValueWhen(1,setup,Ref(L,-1)), Ref(setup,-5),Open,0)) The doubt is about the Stop order code which incorporates both the stop loss level and the time exit (exit at the open as assumed here). Is this the correct way to handle this type of exit conditions in System Tester? Thanks for your opinion and regards. Maurizio
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.