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

Notification

Icon
Error

Options
Go to last post Go to first unread
Rookie  
#1 Posted : Sunday, November 11, 2007 9:03:07 PM(UTC)
Rookie

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/3/2007(UTC)
Posts: 6

Hello,

i am using MetaStock v7.2 EoD and didn`t find following simple ROC Indicator in the Indicator List ...

I want to have a ROC Indicator from today to one year back as the same date - and not like in the indicator builder since 365 days !!!

Is this true that this SIMPLE ROC INDICATOR is not in the indicator list !?

I find some intresting ROC Indicators in this forum yet - thanks for it but i couldn`t find a simple ROC Indicator like this. Can anybody write me this ROC Indicator shortly. I am not able to create one *shame

best luck 4 your trades :
Rookie



pumrysh  
#2 Posted : Tuesday, November 13, 2007 12:40:27 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

The indicator is in the indicator list as Price ROC.

Or use the ROC (Rate of Change)
ROC(Close,periods,%)

Hope this helps,

Preston

mstt  
#3 Posted : Tuesday, November 13, 2007 6:26:17 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Hi Rookie

Here's a variation of a formula I posted to a thread called "52-Week High". This formula marks backward anniversaries of the current date. If the last bar on a chart is November 13 2007 then it will mark November 14 2006, and so on. This is the "Start" variable, and the most recent of these marks the first bar of the current rolling year. To measure the rate of change from the last bar of the previous rolling year (as exact to one year ago as you can get) you should go back one bar from the most recent "Start" signal. That's taken care of by the "Periods" definition. Keep in mind that the only valid ROC value from this formula is its value on the last bar. On all other bars the fixed look-back period could be off by a bar or two.

There are a number of issues here that are not taken into account and which could affect results if this formula was used in an exploration. For example, the "Periods" parameter will return a valid value regardless of how much or how little data is loaded.

A "calendar days look-back" device for any number of days could be constructed easily enough using one of the available "day counters". I've used Wabbit's day counter in most of the weekly formulas (for EOD data) on my website. Hope this helps.

{One Year ROC}

{Mark Backward Anniversary}

{Date variables}

D:=DayOfMonth(); M:=Month(); Y:=Year();

LD:=LastValue(D); LM:=LastValue(M);

D1:=Ref(D,-1); M1:=Ref(M,-1); Y1:=Ref(Y,-1);

A:=(Y>Y1+1 OR (Y>Y1)*(M>M1 OR (M=M1)*(D>=D1)));

A:=ExtFml("Forum.Sum",A,1);

G:=M*31+D-372*(M>LM OR (M=LM AND D>LD))-372*A;

Start:=ExtFml("Forum.Sum",G<ValueWhen(2,1,G),1);

Start;

Periods:=LastValue(BarsSince(Start)+1);

ROC(C,periods,$);

Roy

MetaStock Tips & Tools

mstt  
#4 Posted : Tuesday, November 13, 2007 6:35:58 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

My mistake. The "Start" variable output has now been removed. I forgot to do so after testing the formula.

{One Year ROC}

{Mark Backward Anniversary}

{Date variables}

D:=DayOfMonth(); M:=Month(); Y:=Year();

LD:=LastValue(D); LM:=LastValue(M);

D1:=Ref(D,-1); M1:=Ref(M,-1); Y1:=Ref(Y,-1);

A:=(Y>Y1+1 OR (Y>Y1)*(M>M1 OR (M=M1)*(D>=D1)));

A:=ExtFml("Forum.Sum",A,1);

G:=M*31+D-372*(M>LM OR (M=LM AND D>LD))-372*A;

Start:=ExtFml("Forum.Sum",G<ValueWhen(2,1,G),1);

Periods:=LastValue(BarsSince(Start)+1);

ROC(C,periods,$);

Roy

MetaStock Tips & Tools

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.