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

Notification

Icon
Error

Options
Go to last post Go to first unread
happysingh  
#1 Posted : Monday, October 16, 2006 1:00:39 AM(UTC)
happysingh

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/3/2005(UTC)
Posts: 64
Location: India

i need formula help for exploration.

i want to get change in price from a specific date , say from 22 may 2006 how much chnage in price. computing the days and daily changing is worst. if i can get date as input fuction then i can get my answers. i dont know how to use date as input function . pls guide.

kanellop  
#2 Posted : Monday, October 16, 2006 8:30:26 AM(UTC)
kanellop

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/3/2005(UTC)
Posts: 181

Dear Happysingh,

Hello from Athens City, Greece!

I hope to be fine there in India!

Well, i see your Problem.

I believe that i have find a Solution.

In the Indicator Builder of our loved Program Metastock, i have create a New Formula.

You give it any Name, i have give it the Name 2006 INDIA.

Here it is the Code into that Formula:

Day1 := 17;
Month1 := 10;
Year1 := 2005;

100 * (CLOSE - ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1, CLOSE))/ ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1,CLOSE)

You can modify the Numbers in the:

Day1 (Now have the 17)

Month1 (Now have the 10)

Year1 (Now have the 2005)

That Formula show you the Percentage change from 17/10/2005 until Today, the Current Day.

I will give you and another Example.

New Code:

Day1 := 10;
Month1 := 01;
Year1 := 2005;

100 * (CLOSE - ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1, CLOSE))/ ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1,CLOSE)

Day1 (Now have the 10)

Month1 (Now have the 01)

Year1 (Now have the 2005)

That means that you show you again, the Percentage change from 10/01/2005 until Today, the Current Day.

Now, you go to your Explorer.

There, in a Column like the A or B or C, etc., you can put the above Code.

In the Filter you can put nothing for to see all the Prices in the Stocks that you choose or the above Code for example like:

Day1 := 17;
Month1 := 10;
Year1 := 2005;

100 * (CLOSE - ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1, CLOSE))/ ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1,CLOSE) > 25

which means that the Day that you will choose, until the Current Day (Today), (Metastock System) find me Stocks with that Criteria.

If you have not Result at all that means:

Does not exist a Stock to meet that Criteria.

The Day you choose, is a Holiday or Weekend.

In your Explorer you have to choose Periods same or above the Days that you want to make that Exploration until the Current Day (Today).

If you want to choose to make an Exploration fron 17/10/2005 until Today you must choose in the SubTool Options... , Periods at least 300 for example.

I hope to understand all that!

Kind Regards,

George Kanellopoulos.

happysingh  
#3 Posted : Monday, October 16, 2006 9:39:50 AM(UTC)
happysingh

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/3/2005(UTC)
Posts: 64
Location: India

Hi

how r u

i am fine in india here dear friend. i have just seen u r reply. i will see to that and try that. for now thanks for u r early reply. what i like most is u r attitude, not just the answer. u appears to be a good person. u can know some more abt me at www.coolguynavneet.blogspot.com

till the time bye for now. will see u shortly.

Navneet singhal ( happysingh)

hayseed  
#4 Posted : Monday, October 16, 2006 10:23:58 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey happy .... i'm happy too, to see people posting code requests again..... things had become kinda slow.... questions help us all....

unfortunately the input function does not work well with explorations.... here's a couple other thoughts on valuewhen's.... the first gives ya a rough idea and the second condenses it down to 1 statement.... both will plot as indicators or course.... the dates, in blue, can be manualy reset in the mmddyyyy format..... each should give the difference in closing price between two dates.....h

happy1

------------------------------------

a:= (Month()*1000000 + DayOfMonth()*10000+ Year())=1032006; {change day to suit}
aa:=ValueWhen(1,a,C);


b:= (Month()*1000000 + DayOfMonth()*10000+ Year())=5032006; {change day to suit}
bb:=ValueWhen(1,b,C);

bb-aa

-----------------------------------

happy2 (condensed one liner of above, may 22,2006 to oct 12, 2006)

------------------------------------

ValueWhen(1,(Month()*1000000 + DayOfMonth()*10000+ Year())=10122006,C) - ValueWhen(1,(Month()*1000000 + DayOfMonth()*10000+ Year())=5222006,C); {change day to suit}

------------------------------------

happysingh  
#5 Posted : Monday, October 16, 2006 11:00:24 AM(UTC)
happysingh

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/3/2005(UTC)
Posts: 64
Location: India

Hi

Thank you for u r solution sir.

I will be glad, If anytime I can be useful to you.

Thanks & regards.

Navneet Singhal (Happysingh)

WWW.COOLGUYNAVNEET.BLOGSPOT.COM

happysingh  
#6 Posted : Monday, October 16, 2006 11:04:18 AM(UTC)
happysingh

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/3/2005(UTC)
Posts: 64
Location: India

Dear George Kanellopoulos.

Hi from Delhi, India!

I wish you all success and good luck in your life.

Well, i saw your solution.

And I have got the solution in it. Along with that I got to learn one more function that is value when.

I will be glad, If anytime I can be useful to you.

Thanks & regards.

Navneet Singhal (Happysingh)

WWW.COOLGUYNAVNEET.BLOGSPOT.COM

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.