logo
  • Home
  • Discussions
  • Files
  • Register
  • Login
Welcome Guest! To enable all features please Login or Register.
  • Forum
  • Active Topics
  • Search
  • Help
  • Login
  • Register
  Search Search

Notification

Icon
Error

OK


Discussions  »  Product and Service Development  »  Formula Assistance  »  How to decide if indicator is trending up/down? Used in screening
How to decide if indicator is trending up/down? Used in screening - How to decide if indicator is trending up/down? Used in screening
Options
  • Email this topic Email this topic
  • Watch this topic Watch this topic
  • Print this topic Print this topic
  • » Normal
  • Threaded
Go to last post Go to first unread
Previous Topic Next Topic
elit  
#1 Posted : Friday, August 25, 2006 8:01:13 AM(UTC)
elit

Rank: Member

Groups: Registered, Registered Users
Joined: 8/25/2006(UTC)
Posts: 10

Is it possible to decide if an indicator is trending up or down?

I want to screen a number of stocks, in order to find stocks where my indicator is trending either up or down and if it is above or below zero on the indicators scale. The indicator is an oscillator.


I'm kind of newbie, mind you... :)
Back to top
  • User Profile
  • View All Posts by User
  • View Thanks

Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.

Back to top  
henry1224  
#2 Posted : Saturday, August 26, 2006 6:30:10 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 3 time(s) in 3 post(s)

Which indicator?

Some indicators plot between 0 and 100 , some scale between 100 and -100.Some are binary which plot 1 or -1.

You have to determine whether your indicator is rising or falling, is it in ovebought or oversold areas?

Back to top
  • User Profile
  • View All Posts by User
  • View Thanks
elit  
#3 Posted : Saturday, August 26, 2006 8:10:07 AM(UTC)
elit

Rank: Member

Groups: Registered, Registered Users
Joined: 8/25/2006(UTC)
Posts: 10

The indicator is a line that plots between 100 and -100.
0 being the mid point.

I just want to determine if it is rising or falling, and if it is above or below zero, in other words the mid point.

I then want to screen stocks and get a list with stocks that have the following criteria:
Indicator is rising, and indicator is above 0


The indicator looks something like this (but in this example the scale in not between 100 and -100):

IND:=
(Mov((Mov(C,100,S) - Ref(Mov(C,100,S),-15)- LLV(Mov(C,100,S) - Ref(Mov(C,100,S),-15),14))/(HHV(Mov(C,100,S) - Ref(Mov(C,100,S),-15),14)-(LLV(Mov(C,100,S) - Ref(Mov(C,100,S),-15),14))),14,E)*100);

IND;
Back to top
  • User Profile
  • View All Posts by User
  • View Thanks
wabbit  
#4 Posted : Saturday, August 26, 2006 8:43:08 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)
elit....

To start with, personally I would prefer to read the code as:

Code:

prd1:=100;
prd2:=15;

x:=Mov(C,prd1,S);
y:=Ref(x,-prd2);
z:=x-y;

num:=z-LLV(z,prd2);
den:=HHV(z,prd2)-LLV(z,prd2);

ind:=100*Mov(num/den,prd2,E);
ind;


which has been only slightly modified, but is much easier to read and (to me) makes more logical sense than previous.

To find whether the most recent 'direction' is up or down, use the ROC() function, and to test whether your (-100 to 100) oscilaltor is above or below zero, then just test for values above or below zero.

Please don't post example codes that you never intend using, post the "real code".

Too often the good people here try to offer solutions for "examples" that just "don't work" when applied to the "real code". If we cannot see the real code, how can we provide a solution? If you have the found the Holy Grail and you use the code/information provided to you from the free and open forum then the Grail does not truly belong to you, does it?



wabbit [:D]


[edit: fixed - thanks Asish]
Back to top
  • User Profile
  • View All Posts by User
  • View Thanks
uasish  
#5 Posted : Saturday, August 26, 2006 8:54:49 AM(UTC)
uasish

Rank: Advanced Member

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

Thanks: 7 times

Elit,

Wabbit just missed a = after : of num .He is zillion years ahead in code mastering.

Asish

Back to top
  • User Profile
  • View All Posts by User
  • View Thanks
elit  
#6 Posted : Sunday, August 27, 2006 8:25:13 AM(UTC)
elit

Rank: Member

Groups: Registered, Registered Users
Joined: 8/25/2006(UTC)
Posts: 10

Thanks for your replies!

The reason I didn't want to post my indicator (which i hope is in fact the "holy grail") is that I think it is copyrighted.


I want to learn to program metastock myself, and hope I will find time to do this. As I have studied some computer science as a minor subject I have some programming experience, but up until now I have always felt that programming was boring and didn't like it. But now as I have gotten interested in trading I have found an interest in programming.




Anyways, I'll look into the ROC() function. I hope I can get help on this forum when i get stuck. I just got metastock so I have a lot to learn. I just wanted to find out if it was even possible to do the things I want to do in metastock.

Thanks again!



Back to top
  • User Profile
  • View All Posts by User
  • View Thanks
elit  
#7 Posted : Monday, August 28, 2006 11:00:31 AM(UTC)
elit

Rank: Member

Groups: Registered, Registered Users
Joined: 8/25/2006(UTC)
Posts: 10

I managed to program my indicator and explorer, thanks for your help.
Back to top
  • User Profile
  • View All Posts by User
  • View Thanks
Users browsing this topic
Guest (Hidden)
Discussions  »  Product and Service Development  »  Formula Assistance  »  How to decide if indicator is trending up/down? Used in screening
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.

Powered by YAF.NET | YAF.NET © 2003-2025, Yet Another Forum.NET
  • Terms
  • Privacy Statement
  •  
© Copyright 2025 MetaStock. All rights reserved.