-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx
[mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Al Taglavore
Sent: Monday, January 08, 2001 1:10 AM
To: metastock@xxxxxxxxxxxxx
Subject: Re: Formula help
Dave,
Thank you very much. The Inactivity tab procedure worked exactly as I had hoped. The entry condition does not seem to make the entry that I have wanted. To explain, I have two conditions for entry:
1) The low of the price must be the lowest low value of any18 day period.
2) I want to enter above the high of that LLV (L,18) bar.I have tried the Ref(H,-1) and I have tried the Alert(C>=LLV(H,18),
3).All to no avail.(I tried the "Alert" function in an attempt to hold the statement for three bars after the LLV occured).
I can get the L<=LLV(L,18) coupled with a close above the MP() to signal entry with no problem.I cannot, however, connect the L<=(L,18) statement with the statement that my entry can only occur above the high of the lowest bar. (I make my entry based on a % of ATR(50) above the high.) I have been trading, with success, this condition.I want to test and attempt to optimize the condition to enhance profits and feel more confident to increase the trade size.My exit has been C<Ref(L,-1). Now I can have that exit and the three day in trade rule to build upon.
Again, thank you very much for the response. Hopefully, I have made clear my objective. If you can suggest a code for the entry it would be much appreciated.
Thank you,
Al Taglavore
-----Original Message-----
From: Dave Nadeau [mailto:dave_nadeau@xxxxxxxxx]
Sent: Tuesday, January 09, 2001 12:29 AM
To: metastock@xxxxxxxxxxxxx
Subject: RE: Formula help
Al,
No problem. Since you've chosen the inactivity tab for the exit, I will stay with the assumed use of the MetaStock System Tester.
So the setup is that the Low of a bar is the Lowest value in 18 bars.
SETUP:=L=LLV(L,18);
Your buy stop is set at a percentage of the ATR, I'll use 70% in this example; if the HIGH of the next or any subsequent bar is greater than this HIGH+0.7*(ATR(50))
{Note: I prefer the use of Mov(ATR(1),50,S) to the ATR(50) function. It eliminates some of the smoothing and seems to work better for me--credit to Chuck LeBeau}.
LONGTRIGGER:=H>=(ValueWhen(1,SETUP=1,HIGH)+0.7*(ATR(50)));
So by combining,