[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Metastockusers] Re: thanks



PureBytes Links

Trading Reference Links


Hi, Roy
 
Thanks so much. I study the latch code. I understand the theory. But My sell order(reset) condition's true or false depends on my my buy order(set) condition. For example:
 
buy order:
cross(mov(c,5,e),mov(c,25,e));
 
 
sell order:
 
a:=barssince(cross(mov(c,5,e),mov(c,25,e)));
c <  cum(a);
 
Then it's hard to use latch because  the sell order's true or false depends on the buy order's result. otherwise, that will be a self loop problem.
 
So I try to use simulation function that if there is a buy order position opening, the second and third and so on of cross(mov(c,5,e),mov(c,25,e))'s result will be ignored. But i don't know which one is suitable. I try to use Simulation.CurrentPositionAge. But I don't know what's the return value of first day of buy order signal generated. I test the function that one day after the buy order position will return 1 and then 2,3,4 and so on. 
How to do it?
 
Thanks a lot,
 
Eric
 
Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
EricYou could try this and adapt it to suit.RoyA:=Int(Abs(CMO(C,9))/10)+1;B:=HHV(C,LastValue(A-PREV+PREV));D:=Mov(C,25,E);F:=If(A=1,HHV(D,1),If(A=2,HHV(D,2),If(A=3,HHV(D,5),If(A=4,HHV(D,4),If(A=5,HHV(D,5),If(A=6,HHV(D,6),If(A=7,HHV(D,7),If(A=8,HHV(D,8),If(A=9,HHV(D,9),If(A=10,HHV(D,10),HHV(D,11)))))))))));F;----- Original Message ----- From: "rans rundize" To: Cc: Sent: Tuesday, November 18, 2003 12:53 PMSubject: thanks> Hi, Roy>> Thanks so much. I am studying it now.> I have read your reply about HHV(close,n).>> "Try this. It works with some functions and not others.>> A:=Int(Abs(CMO(C,9))/10)+1;> B:=HHV(C,LastValue(A-PREV+PREV));>
 B;">> It is working only with HHV(C, LastValue(A-PREV+PREV)); But I need theresult of B:=HHV(mov(c,25,E),LastValue(A-PREV+PREV)); It is not working andreturns N/A.> I don't know why? How to do it one way or another?>> best regards,>> Eric>>>>> ---------------------------------> Do you Yahoo!?> Protect your identity with Yahoo! Mail AddressGuard
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard






Yahoo! Groups Sponsor












To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.