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 : Friday, April 7, 2006 3:12:49 PM(UTC)
minnamor

Rank: Advanced Member

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

The following system has been copied from the excellent (for those with a smattering of German) www.Metastock-Forum.de and is taken from George Pruitt's "The Ultimate Trading Guide" pages 227-233. STLong:= Ref(LLV(L,30),-1); StShort:= Ref(HHV(H,30),-1); stopLong:=If(Cum(1)=1,0,If(C<PREV,StLong,Max(StLong,PREV))); stopShort:=If(Cum(1)=1,0,If(C>PREV,StShort,Min(StShort,PREV))); ELEntryprice:=ValueWhen(1,H>Ref(HHV(H,30),-1),C); ELmidlevel:=ELEntryprice-(Ref(HHV(H,30),-1)-Ref(LLV(L,30),-1))/2; {MaxLoss Stop} ESEntryprice:=ValueWhen(1,L<Ref(LLV(L,30),-1),C); ESmidlevel:=ESEntryprice+(Ref(HHV(H,30),-1)-Ref(LLV(L,30),-1))/2; {MaxLoss Stop} LE:=H>Ref(HHV(H,30),-1) AND C>Max(Elmidlevel,stoplong); SE:= L<Ref(LLV(L,30),-1) AND C<Min(ESmidlevel,stopshort); LX:=C<ELMidlevel OR C<StopLong; SX:=C>ESMidlevel OR C>StopShort; Would it be possible to eliminate the Prev functions above to accelerate explorations? By the way I am getting very good results on tests, particularly long positions only, on Italian stocks with TradeSim. For those interested, the results are very interesting if periods are replaced with the ASI Homodyne Period (no great difference with Cybercyle). Thanks and regards.
StorkBite  
#2 Posted : Friday, April 7, 2006 5:25:30 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Coding is not my strong point. You'll have to test it with known values (I didn't)... [code:1:7ef27fb493]STLong:= Ref(LLV(L,30),-1); StShort:= Ref(HHV(H,30),-1); stopLong:=If(Cum(1)=1,0,If(C<Ref(C,-1),StLong,Max(StLong,Ref(C,-1)))); stopShort:=If(Cum(1)=1,0,If(C>Ref(C,-1),StShort,Min(StShort,Ref(C,-1)))); ELEntryprice:=ValueWhen(1,H>Ref(HHV(H,30),-1),C); ELmidlevel:=ELEntryprice-(Ref(HHV(H,30),-1)-Ref(LLV(L,30),-1))/2; {MaxLoss Stop} ESEntryprice:=ValueWhen(1,L<Ref(LLV(L,30),-1),C); ESmidlevel:=ESEntryprice+(Ref(HHV(H,30),-1)-Ref(LLV(L,30),-1))/2; {MaxLoss Stop} LE:=H>Ref(HHV(H,30),-1) AND C>Max(Elmidlevel,stoplong); SE:= L<Ref(LLV(L,30),-1) AND C<Min(ESmidlevel,stopshort); LX:=C<ELMidlevel OR C<StopLong; SX:=C>ESMidlevel OR C>StopShort; [/code:1:7ef27fb493]
jjstein  
#3 Posted : Friday, April 7, 2006 5:27:59 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
A few questions: 1) What are you using for an exploration? 2) What version of TradeSim are you using?
minnamor  
#4 Posted : Friday, April 7, 2006 5:57:38 PM(UTC)
minnamor

Rank: Advanced Member

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

I use version 4.3.2 Professional Edition. I addition to using the Homodyne Period function to avoid optimization, I have also added a minor pivot point exit (Power Pivot plug-in) to avoid the large profit giveback sometimes associated with Donchian models. The results are attached to this message for your perusal (just one iteration). I should stress that I have tested the above system on a trade on next day open (Hence in system tester all entry/exit conditions are delayed by one bar). Explorations for simple signals on this basis would be the straightforward from the model given earlier. For instance for long entries I would write: STLong:= Ref(LLV(L,30),-1); StShort:= Ref(HHV(H,30),-1); stopLong:=If(Cum(1)=1,0,If(C<PREV,StLong,Max(StLong,PREV))); stopShort:=If(Cum(1)=1,0,If(C>PREV,StShort,Min(StShort,PREV))); ELEntryprice:=ValueWhen(1,H>Ref(HHV(H,30),-1),C); ELmidlevel:=ELEntryprice-(Ref(HHV(H,30),-1)-Ref(LLV(L,30),-1))/2; {MaxLoss Stop, abh. vom Preis} ESEntryprice:=ValueWhen(1,L<Ref(LLV(L,30),-1),C); ESmidlevel:=ESEntryprice+(Ref(HHV(H,30),-1)-Ref(LLV(L,30),-1))/2; H>Ref(HHV(H,30),-1) AND C>Max(Elmidlevel,stoplong) and so on.
StorkBite  
#5 Posted : Friday, April 7, 2006 6:23:24 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Using the modified version of the formula above on 190 daily securities, I found no differences in the reported results when compared to the original formula results. The modified formula completed the Exploration in 9 secs, while the original formula took 56 secs. UserPostedImage
minnamor  
#6 Posted : Saturday, April 8, 2006 9:45:57 AM(UTC)
minnamor

Rank: Advanced Member

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

Apologies, the correct reference was to pages 187-188 of Pruitt's "The Ultimate Trading Guide". As far as I can see, replacing Prev as suggested appears to cause problems if one wants to plot formula as indicator. Incidentally, I hope the attached spreadsheet and included graph be of interest to some of you. The reference in the graph is to Ehlers article entitled "Trading System Equity Growth" available at the MESA site. I tend to focus on systems that fall within the quadrant delimited by Ehlers' recommended limits (money management rules, confirmation and filters, etc.). These systems would then be tested with TradeSim. Systems in the two areas delimited by the regression line (note that the regression curve almost exactly crosses Ehlers' levels at their intersection point) and Ehlers vertical and horizontal lines would also deserve attention. All other systems would not be tested further. The curve called "Efficient frontier" contains all tested systems. Any new system below this curve would be discarded as inefficient. For those interested, a spreadsheet with macro using Ehlers' method can be downloaded from http://www.tradersite.it/index.php (file name: equity growth generator.xls).
jjstein  
#7 Posted : Saturday, April 8, 2006 1:10:06 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Could you forward that XLS to me at JohnathanStein@yahoo.com? I've looked at the site, and don't speak Italian -- and trial & error ain't workin', either<g>.
StorkBite  
#8 Posted : Sunday, April 9, 2006 6:38:49 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Minnamor-
Minnamor wrote:
Would it be possible to eliminate the Prev functions above to accelerate explorations?
It seems like there are two different conversations going on here. Your original question is stated above. Now, I'm not sure what you are saying. If this is just a review or praise of a system, it should be moved to chit chat or you can communicate PM with jstein. Let me know and I'll take care of moving the topic for you. If you were really looking for a solution to the original question, the Exploration I offered seems to work. I have found no differences in output. Compare that formula to your original formula side by side in the Explorer.
Minnamor wrote:
As far as I can see, replacing Prev as suggested appears to cause problems if one wants to plot formula as indicator
This is a different question still. What kind of problems are you experiencing? You should be able to continue using the original formula as an indicator. In your comparison, if you are getting different values between the original formula plotted as an indicator and the new formula in the Explorer, then make sure the periods you have loaded on the chart are equal to the periods of data that you have loaded for your Exploration. If you want to compare them both as indicators (not Explorations) then plot them both in the same window and look for deviations. I don't see any differences in the test group of 190 securities that I tried. I believe the original PREV statement was being used as a latch function; however, I could be wrong. Regardless, you have to compare apples to apples. If you do come up with differences after this, please give me some specific examples (securities and date ranges) so that I can follow through with your original question. Thanks, G
minnamor  
#9 Posted : Sunday, April 9, 2006 6:43:37 AM(UTC)
minnamor

Rank: Advanced Member

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

Point taken. I appreciate your contribution and I agree that the discussion digressed a bit. Regards.
StorkBite  
#10 Posted : Sunday, April 9, 2006 6:48:25 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
I just wanted to iron out any kinks that might still exist. My test database was pretty small and it was only on N. American stocks.
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.