SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : Metastock 6.0 for Window

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Vic who wrote (1981)4/24/1998 7:05:00 PM
From: Craig DeHaan  Read Replies (1) of 4056
 
Vic,
Make sure you're setting all variable calls as

S1:= If .......... (and end each with a semicolon per convention) ";"
S2:= If .......... ;
etc.

As for 6.0 compatibility, I believe it supported the PREVIOUS function as does 6.5. If not, or should you care to try a speed-tweaked version posted by Tim Kruzel on the Metastock list earlier this month try this out:

==============================
Date: Sun, 12 Apr 1998 00:37:00 -0500
From: TKruzel <TKruzel@centuryinter.net>
To: Metastock-Users-List <metastock-list@metastock.com>

For those of you trying to use Mr. Widner's formulas, I
Think you will find the following to be equivalent and
they avoid the use of PREVIOUS (a computational pig).

In the MetaStock Indicator Builder create an indicator
called:

Enter_Long_SR (or whatever you want to call it)

Copy the following into the indicator:

{*********************************************}

S1:=ValueWhen(1,Ref(LOW,-4)=LLV(LOW,9),Ref(LOW,-4));

S2:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S1,-1));

S3:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S2,-1));

S4:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S3,-1));

S5:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S4,-1));

S6:=ValueWhen(1,S1<>Ref(S1,-1),Ref(S5,-1));

WSO:=100*(1-(Int(S1/CLOSE)+Int(S2/CLOSE)+
Int(S3/CLOSE)+Int(S4/CLOSE)+
Int(S5/CLOSE)+Int(S6/CLOSE))/6);

{*********************************************}

R1:=ValueWhen(1,Ref(HIGH,-4)=HHV(HIGH,9), Ref(HIGH,-4));

R2:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R1,-1));

R3:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R2,-1));

R4:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R3,-1));

R5:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R4,-1));

R6:=ValueWhen(1,R1<>Ref(R1,-1),Ref(R5,-1));

WRO:=100*(1-(Int(R1/CLOSE)+Int(R2/CLOSE)+
Int(R3/CLOSE)+Int(R4/CLOSE)+
Int(R5/CLOSE)+Int(R6/CLOSE))/6);

{*********************************************}

EnterLong:=If(((WSO > Mov(WSO,4,S)) OR (Mov(WRO,30,S) > 95)),1,0);

{*********************************************}

Then go to the MetaStock System Tester and create a test called:

SR_Long (or whatever you want to call it)

The enter long criteria is simply:

Fml("Enter_Long_SR")

Set your STOPS as indicated and you should have it.

Regards,
Tim
==============================

I haven't set it up yet, but it looks to be properly coded.

Good luck,
Craig
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext