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

Notification

Icon
Error

Options
Go to last post Go to first unread
sportrider  
#1 Posted : Saturday, October 15, 2005 9:06:32 PM(UTC)
sportrider

Rank: Advanced Member

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

DEAR SIR, > > I SEEM TO BE HAVING PROBLEMS WITH TELLING METASTOCK TO CLOSE A POSITION 3 > DAYS LATER ESPECIALLY WHEN THE FORMULAS IS TRUE SEVERAL DAYS IN A ROW. > > FOR EXAMPLE:ON A CHANNEL BREAKOUT SYSTEM IF THE FORMULA:BUY > H>REF(HHV(H,10),-1) .NOW I TRY TELLING IT TO SELL 3 DAYS LATER: > BARSSINCE(H>REF(HHV(H,10),-1))=3 .IT HAS NO PROBLEM WITH THIS FORMULA BUT IF THE > FIRST FORMULA :H>REF(HHV(H,10),-1) IS TRUE SEVERAL DAYS IN A ROW IT DOESNT KNOW TO > START FROM THE FIRST OCCURANCE WHERE THE BUY WAS TRUE.HOW DO I REFER BACK TO THE > FIRST OCCURANCE SINCE THIS IS WHERE IM GETTING IN ON THE FIRST BREAKOUT NOT ON THE > CONSECUTIVE ONES. > THANK YOU IN ADVANCE AND LET ME KNOW IF YOU NEED FURTHER INPUT
Patrick  
#2 Posted : Saturday, October 15, 2005 9:10:10 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Try using the cross function ... Condition:=Cross(H,REF(HHV(H,10),-1)); Barssince(Condition)=3 Patrick :mrgreen:
sportrider  
#3 Posted : Saturday, October 15, 2005 11:19:30 PM(UTC)
sportrider

Rank: Advanced Member

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

THANKS PATRICK, I WOULD STILL GET THE SAME CONDITION .FOR EXAMPLE IF THE CONDITION IS TRUE THREE DAYS IN A ROW,WHERE TODAYS HIGH TAKES OUT THE HIGH FROM 10 DAYS AGO AND TOMORROW WE GET A NEW HIGH THAT TAKES THE PREVIOUS TEN DAY HIGH AND THE FOLLOWING DAY AFTER TOMORROW WE GET ANOTHER HIGH METASTOCK WOULD GET YOU IN ON A BUY WITH THE FIRST OCCURANCE.BUT IT WOULDNT KNOW TO GET YOU OUT 3 DAYS LATER BECAUSE IT WAS TRUE 3 DAYS IN A ROW SO YOU WOULD WIND UP GETTING OUT THE LAST DAY THE STATEMENT WAS TRUE PLUS THREE DAYS WICH WOULD PUT YOU 6 DAYS AWAY. FOR SOME REASON I'M GETTING MORE CONVINCE THAT METASTOCK IS LACKING ON THIS CAPABILITY.UNLESS THERES A WAY OF DOING IT THAT I'M NOT AWARE OF..SOMEONE PLEASE HELP!!!!!!!!!
Patrick  
#4 Posted : Sunday, October 16, 2005 12:48:18 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Please remove the cap locks this is extremely annoying ... I almost do not want to read your post because of it ... Have you tried what I suggested? Please post the formula you are currenlty using to get your buy signal. Thanks
sportrider  
#5 Posted : Sunday, October 16, 2005 4:04:30 AM(UTC)
sportrider

Rank: Advanced Member

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

Patrick, Thanks for the reply ,I really appreciate it and sorry for the cap lock I have not tried the formula because it looked like one of the many that I had tried;I've been beating my brains over this for weeks. I will try it anew and see if I get the results that I want. The formula I'm using for buys: H>REF(HHV(H,10),-1) .Now I try telling it to sell 3 days later for sells: BARSSINCE(H>REF(HHV(H,10),-1))=3 .after running the test ask for it to be plotted on a chart and you will see that its not following the system to sell after three days if it makes consecutive bars high.
Patrick  
#6 Posted : Sunday, October 16, 2005 4:51:00 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
No problem sportrider ... You should read Roy Larsen's latch tutorial ... It is located in the download section under Metastock files, help files.I'm sure this will be really helpful. Now a quick stab at it would be : {buy} N:=H>REF(HHV(H,10),-1); Tr:=If(PREV=0,If(N,1,0),If(sum(prev,3)=3,0,PREV)); Tr=1 and ref(tr,-1) = 0; {Sell} N:=H>REF(HHV(H,10),-1); Tr:=If(PREV=0,If(N,1,0),If(sum(prev,3)=3,0,PREV)); Tr=0 and ref(tr,-1) = 1; Are you sure the previous formula I posted was not sufficient, sorry I did not test any of this so I don't know for sure ... Patrick
Jose  
#7 Posted : Sunday, October 16, 2005 5:00:26 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
SportRider, below is your MS code solution - but only if you promise never to touch the Caps Lock again, ever... ;) [code:1:65e4ee6675] { LongEntry-related timed exit } { ©Copyright 2004~2005 Jose Silva For personal use only. http://www.metastocktools.com } { User inputs } exitPds:=Input("Exit trade at x periods", 1,2600,3); delay:=Input("Entry and Exit delay",0,5,0); { Sample entry conditions } In:=H>Ref(HHV(H,10),-1); { Entry-related exit latch } latch:=If(PREV>0, If(BarsSince(PREV<=0)<exitPds,1,-1),In); { Clean Entry & Exit signals } entry:=latch=1 AND Alert(latch<1,2); exit:=latch=-1; { Plot signals in own window } 0;Ref(entry-exit,-delay) [/code:1:65e4ee6675] jose '-)
sportrider  
#8 Posted : Sunday, October 16, 2005 11:46:47 PM(UTC)
sportrider

Rank: Advanced Member

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

Hey guys , thanks again to the both of you I promise to not to use 'cap lock' again,....I apologize for the long time in reply, I have been down for the count with the flu will try the 2 formulas tomorrow thanks again.
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.