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

Notification

Icon
Error

Options
Go to last post Go to first unread
CalgaryCoolCat  
#1 Posted : Tuesday, July 2, 2019 2:31:33 AM(UTC)
CalgaryCoolCat

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/7/2019(UTC)
Posts: 5
Location: Calgary

Friends,

I am new to writing formulas in MetaStock - I would like to create something that I can run on an exploration that will indicate me a value that is crossing through -.5 or +.5.

The formula is as follows (to plot the indicator):

plot:= RSI(5); ph:=LastValue(Highest(plot)); pl:=LastValue(Lowest(plot)); pf:=10/(ph-pl); v1:= ((plot-pl)*pf)-5; v2:= Mov(v1,9,W);

.5; -.5; (Exp(2*v2)-1)/(Exp(2*v2)+1)

Also, please see https://www.metastock.co...er/resources/tasc/?id=60 for a detailed explanation.

Thank you!

MS Support  
#2 Posted : Tuesday, July 2, 2019 9:52:52 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,929

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: CalgaryCoolCat Go to Quoted Post

Friends,

I am new to writing formulas in MetaStock - I would like to create something that I can run on an exploration that will indicate me a value that is crossing through -.5 or +.5.

The formula is as follows (to plot the indicator):

plot:= RSI(5); ph:=LastValue(Highest(plot)); pl:=LastValue(Lowest(plot)); pf:=10/(ph-pl); v1:= ((plot-pl)*pf)-5; v2:= Mov(v1,9,W);

.5; -.5; (Exp(2*v2)-1)/(Exp(2*v2)+1)

Also, please see https://www.metastock.co...er/resources/tasc/?id=60 for a detailed explanation.

Thank you!

Hi,

This would not take much modification, and it would also depend on how you wanted the information to display in your exploration report. You could modify as follows:

Column A: Above+.5

Code:
plot:= RSI(5);
ph:=LastValue(Highest(plot));
pl:=LastValue(Lowest(plot));
pf:=10/(ph-pl);
v1:=((plot-pl)*pf)-5;
v2:=Mov(v1,9,W);
fin:=(Exp(2*v2)-1)/(Exp(2*v2)+1);
Cross(fin,.5);

Column B: Below-.5

Code:
plot:= RSI(5);
ph:=LastValue(Highest(plot));
pl:=LastValue(Lowest(plot));
pf:=10/(ph-pl);
v1:=((plot-pl)*pf)-5;
v2:=Mov(v1,9,W);
fin:=(Exp(2*v2)-1)/(Exp(2*v2)+1);
Cross(-.5,fin);

Filter:

Code:
ColA OR ColB

CalgaryCoolCat  
#3 Posted : Wednesday, July 3, 2019 1:45:14 AM(UTC)
CalgaryCoolCat

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 4/7/2019(UTC)
Posts: 5
Location: Calgary

Hello, I will try that. Thank you for your help, I really appreciate it.
Users browsing this topic
Similar Topics
May 2004: The Inverse Fisher Transform <pic> (2004)
by KTP2 5/11/2010 1:43:27 PM(UTC)
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.