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

Notification

Icon
Error

Options
Go to last post Go to first unread
Derek Worswick  
#1 Posted : Wednesday, August 16, 2006 3:23:04 AM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hello,

Could you please help me with the MetaStock code for a

Variable Period DSS Stochastic below?

Is it possible to using Power Pivots…. to use the variable Hilbert Period?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pds:=ExtFml( "Hilbert.HilbertPeriod");

Slw:=Input("Slowing double stoch",1,20,3);

trigger:=Input("Trigger Length",1,20,3);

A:=Mov((CLOSE-LLV(LOW,Pds))/(HHV(H,pds)-LLV(L,Pds)),Slw,E)*100;

DSS:=Mov((A-LLV(A,pds))/(HHV(A,Pds)-LLV(A,Pds)),Slw,E)*100;

20;

80;

Mov(DSS,trigger,S);

DSS;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

{instead of LastValue of HilbertPeriod }

{pds:=LastValue( Round( ExtFml("Hilbert.HilbertPeriod")));}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hoping you can help.

Best regards.

Derek

uasish  
#2 Posted : Friday, August 18, 2006 4:16:33 AM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times

Hi, Derek

I have just copy pasted this in my Metastock ,it is working fine what is the problem ?

Asish

uasish  
#3 Posted : Friday, August 18, 2006 4:23:00 AM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times

Derek,

This is actually William's % R 's basic code.

Asish

Derek Worswick  
#4 Posted : Friday, August 18, 2006 7:09:51 AM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hi Asish,

Thank you for your interest.

When formula below is posted in MetaStock Pro v 8.0 with PowerPivots.

An Error message is displayed with the curser is at the “Pds” term at this line in the formula,

A:=Mov((CLOSE-LLV(LOW,Pds))/(HHV(H,Pds)-LLV(L,Pds)),Slw,E)*100;

and Error message says:

Pds”…. “This variable or expression must contain only constant data.”

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have written the formula again below

Pds:=ExtFml( "Hilbert.HilbertPeriod");

Slw:=Input("Slowing double stoch",1,20,3);

trigger:=Input("Trigger Length",1,20,3);

A:=Mov((CLOSE-LLV(LOW,Pds))/(HHV(H,Pds)-LLV(L,Pds)),Slw,E)*100;

DSS:=Mov((A-LLV(A,pds))/(HHV(A,Pds)-LLV(A,Pds)),Slw,E)*100;

20;

80;

Mov(DSS,trigger,S);

DSS;

Best regards,

Derek

wabbit  
#5 Posted : Friday, August 18, 2006 11:06:52 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)
Derek,

The HHV() and LLV() functions cannot have dynamically set values for Pds. To use dynamic values try the Forum.dll:

ExtFml("Forum.HHV",H,Pds);
ExtFml("Forum.LLV",L,Pds);

which can accept programatically set values for Pds.


Hope this helps.

wabbit [:D]

uasish  
#6 Posted : Saturday, August 19, 2006 10:29:14 AM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times

Hi Derek,

I just used this :

pds:=LastValue( Round( ExtFml("Hilbert.HilbertPeriod")));............ as 1st line.

Asish

Derek Worswick  
#7 Posted : Wednesday, August 23, 2006 5:19:28 AM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hi Wabbit,

Thank you for your explanation and help with Hilbert Period DSS Stochastic.

Best regards,

Derek

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.