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

Notification

Icon
Error

Options
Go to last post Go to first unread
alberto.tortella  
#1 Posted : Thursday, April 20, 2006 9:39:42 AM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Good morning, I’m writing from Italy. I’m searching for someone who is able to write in Metastock language the trading systems that are contained in Tom Bierovic’s book “Playing for keeps in Stock & Futures”. The 3 trading systems are: - First Prize - R2D2 - Triple Play Are you able to write these in Metastock language? Thanks for the attention Alberto
wabbit  
#2 Posted : Thursday, April 20, 2006 10:56:37 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)
Being mindful of copyright restrictions etc, can you post what the systems are supposed to do? Only then can we see if it is possible to code in MS. wabbit :D
alberto.tortella  
#3 Posted : Thursday, April 20, 2006 2:47:51 PM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Please find attached an explation of the trading systen I'm trying to write in Metastock language. Any doubt please do not hesitate to contact me. Thank you very much for what you we'll be able to make! Alberto
sportrider  
#4 Posted : Friday, April 21, 2006 2:21:48 AM(UTC)
sportrider

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/12/2005(UTC)
Posts: 141
Location: Brooklyn,NY

Alberto, I' ve worked on his systems for some time trying to code it with not too much success.I'ts has been like one of my little projects which I go back to over and over and abandon everytime to come back to later.I at one point contemplated paying one of the guys here to code it for me..but I liked the idea of researching and trying to do it myself. I not that saavy in coding but I enjoy the little that I'm able to put together. I don't know how bad you want or need it but I'll dig up what little I have on paper and other and see if its anyworth...but remember its far from complete<and the bulk of the work(the hard part) I don't have. We have excellent guys here for hire that will code it for you if you don't want to do the work.They have a knack for the little details that I feel comfortable with their coding and they know all the nuances of metastock and will make it work for you.
sportrider  
#5 Posted : Friday, April 21, 2006 2:35:36 AM(UTC)
sportrider

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/12/2005(UTC)
Posts: 141
Location: Brooklyn,NY

I found the DMI spread;for some reason I have a setting of 13,and couldn't find the book to confirm. ( PDI(13 ))- ( MDI(13 )). Set it in its own window and plot as a histogram then then right click and get properties and plot a horizontal line at 15.
wabbit  
#6 Posted : Friday, April 21, 2006 2:46:04 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)
> Exponential Moving Average (13 periods) = EMA 13 > Exponential Moving Average (34 periods) = EMA 34 > DMI Spread = DMI+[14] – -DMI-[14] > MACD 3-8-13 (see below the Metastock code) DiffOfAvg:= Mov(CLOSE, 3, E) - Mov(CLOSE, 8, E); DiffOfAvg; Mov(DiffOfAvg,13,E); Mov(CLOSE, 3, E) - Mov(CLOSE, 8, E); DiffOfAvg - Mov(DiffOfAvg,13,E) SETUP 1 > EMA13 > EMA34 > Price today is the highest price in the last 21 days (point 1 on the graph) > In this day DMI Spread is > 15 (point 2 on the graph) [color=red:eb41796e68]Mov(C,13,E)>Mov(C,34,E) AND C>=HHV(C,21) AND (Pdi(14)-mdi(14))>15[/color] SETUP 2 (retracement) > There is a retracement between 38.2% and 61.8% Fibonacci zones (point 3 on the graph) > Fibonacci retracement must be plot from the initial trend to the highest price in the last 21 days (point 4 on the graph). [color=blue:eb41796e68]Personally, I do NOT like this code, nor do I recommend that you use it. Due to the dynamic nature of the Zig(), Peak() and Trough() functions, these indicators will move with time - - they are based on hindsight and hence cannot be traded in real life/time. My recommendation is to use the other filter criteria to find a small subset of stocks, then manually apply the fib indicator. Its more work, yes, but ts safer and that will save you money in the long run![/color] [color=red:eb41796e68]Pk:=Peak(1,C,5); Tr:=Trough(1,C,5); i:=Cum(Pk+Tr>-1)=1; {Check the peak is more recent than the trough} rightOrder:=ROC(Zig(C,5,%),1,%)<0; newPk:=C>=Pk AND C>=HHV(C,21); newPkVal:=ValueWhen(1,newPk,C); PkTrRange:=newPkVal-Tr; PkCRange:= newPkVal-C; pct:=100*PkCRange / PkTrRange; pct:=rightorder*pct; pct>38.2 AND pct<61.8;[/color] > MACD 3-8-13 cross down the signal line (point 5 on the graph) for the first time since when the signal line is positive [color=red:eb41796e68]myMACD:=Mov(C,3,E)-Mov(C,8,E); signalLine:=Mov(myMACD,13,E); {MACD Signal Counter : - with thanks to Roy Larsen} a:=myMACD<signalLine; b:=signalLine<0; i:=Cum(a+b>-1)=1; g:=Cum(a)-ValueWhen(1,i OR b,Cum(a)); {filter} g=1;[/color] ENTRY > MACD signal line remain positive > MACD Histogram > MACD Histogram previous day (point 6 on the graph). [color=red:eb41796e68]myMACD:=Mov(C,3,E)-Mov(C,8,E); signalLine:=Mov(myMACD,13,E); myMACDHist:= myMACD- signalLine; {filter} signalLine>0 AND myMACDHist>Ref(myMACDHist,-1) [/color] I hope I have these interpretations correct. If not, let me know and we can work on them together. wabbit :D
alberto.tortella  
#7 Posted : Friday, April 21, 2006 11:38:15 AM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Many compliments for this work! I'm very impressed from your ability =D> The last 2 trading systems are easier then first prize, and I'm sure that you will be able to write these in Metastock language! :roll: Have a nice weekend! Alberto
alberto.tortella  
#8 Posted : Friday, April 21, 2006 12:31:38 PM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Here is the second of the 3, r2d2. Thanks a lot! Alberto
wabbit  
#9 Posted : Friday, April 21, 2006 9:17:16 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)
I don't know why you needed anyone else to code this part for you. All the information you needed was in my previous post. You really should attempt to do as much for yourself as you can, we aren't always going to be there to help when you REALLY need it.... and you will become a better programmer. Programming systems and indicators like these will also give you a better understanding of HOW the systems are supposed to work. Its only through this effort will you realise that most "systems" consist mainly of throwing together redundant indicators until pattern they want to see appears! Anyway.... try this SETUP 1 Closing price > EMA 55 for the entire set up period. [color=blue:c5f2be049a]How long is this period?[/color] DMI Spread > 15 at the peak of the most recent positive wave (point 1 on the graph) [color=red:c5f2be049a]Prd:=30; {filter} Sum(C>Mov(C,55,E),prd)=prd AND (PDI(13)-MDI(13))>15[/color] SETUP 2 (divergence) [color=blue:c5f2be049a]Finding this part of the indicator is going to be dependent on how you define the peaks and troughs. You could use the Peak() and Trough() indicators, but as we have seen these use hindsight to make their decisions and cannot be traded in real life/time. So we are going to define our troughs programmatically. I will use an example Jose Silva has on his site: http://www.metastocktools.com/[/color] The new low in the closing price is higher then the previous low (see the n° 2 blue trendline in the graph) [color=red:c5f2be049a]{ Price troughs } { Copyright 2004-2006 Jose Silva } Ch:=20/100; {percentage change} ind:=C; TrC:=ind>Ref(ind,-1) AND Ref(ind,-1)<Ref(ind,-2) AND Ref(ind,-1)<=(ind+Ref(ind,- 2))/2*(1-Ch); TrC1:=ValueWhen(1,TrC,Ref(ind,-1)); TrC2:=ValueWhen(2,TrC,Ref(ind,-1)); {filter} TrC1>TrC2;[/color] The new low in the MACD is lower then the previous low (see the n° 3 red trendline in the graph). [color=red:c5f2be049a]{ MACD troughs } { Copyright 2004-2006 Jose Silva } Ch:=20/100; {percentage change} myMACD:=Mov(C,3,E)-Mov(C,8,E); signalLine:=Mov(myMACD,13,E); ind:=signalLine; TrInd:=ind>Ref(ind,-1) AND Ref(ind,-1)<Ref(ind,-2) AND Ref(ind,-1)<=(ind+Ref(ind,- 2))/2*(1-Ch); TrInd1:=ValueWhen(1,TrInd,Ref(ind,-1)); TrInd2:=ValueWhen(2,TrInd,Ref(ind,-1)); {filter} TrInd1<TrInd2;[/color] [color=blue:c5f2be049a]You could add some code, if you like to make sure the troughs are occurring on or about the same time...[/color] [color=red:c5f2be049a]Abs(BarsSince(TrC1)-BarsSince(TrInd1))<=5; {must be within 5 bars of each other}[/color] ENTRY Entry when MACD Histogram > MACD Histogram previous day (point 4 on the graph). [color=red:c5f2be049a]myMACD:=Mov(C,3,E)-Mov(C,8,E); signalLine:=Mov(myMACD,13,E); myMACDHist:= myMACD- signalLine; {filter} myMACDHist>Ref(myMACDHist,-1) [/color] Hope this helps. wabbit :D P.S. All of this was written using the MS Bible and the information Jose freely posts on his website, with our thanks. P.P.S. This was all written VERY early in the morning, so I would check it all, very thoroughly!
wabbit  
#10 Posted : Friday, April 21, 2006 9:21:03 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)
BTW: The last system on your list is "triple play". You will NOT receive any assistance from me until you post your attempt at coding that indicator, and the original intent of the indicator. Tough. But, I think, fair. wabbit :D
sportrider  
#11 Posted : Saturday, April 22, 2006 3:47:23 AM(UTC)
sportrider

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/12/2005(UTC)
Posts: 141
Location: Brooklyn,NY

Very well done Wabbit, I think just sitting back and having someone code for you someone elses system is missing 90 % of the point.If it was your own system created by one self then thats a different story;you know how its suppose to work and the nuances of the system. Don't get me wrong ,you really went to town with the first system and I copied every bit of your post to pick it apart later when I have some time and see what I could learn from it and how you aproached it.Thanks :)
alberto.tortella  
#12 Posted : Wednesday, April 26, 2006 7:03:44 AM(UTC)
alberto.tortella

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/13/2006(UTC)
Posts: 53
Location: Verona - Italy

Thank you Wabbit for your assistance. I'm using Metastock only from few days and I'm searching for the best way in order to insert these codes in the Explorer. I don't know if it's better to insert the entire code in a single column or if it's better to divide the code in different columns, for instance set up 1 in column A, set up 2 in column B and so on. What's your opinion? #-o Tks Alberto
wabbit  
#13 Posted : Friday, April 28, 2006 12:37:51 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)
alberto, Sorry for the delayed response, but I was thinking about how best to answer your question. I came to the conclusion; I cannot answer that! It all depends on how important you think each component is to the entire system. If equally important, just group all the filters into one and search for this parameter: otherwise place each component in a column and go from there. I guess it all depends on YOUR requirements. Be daring, try a few different methods. It doesnt cost anything for you to cut and paste code into the different sections and compare the results. wabbit :D
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.