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

Notification

Icon
Error

Options
Go to last post Go to first unread
ageitalia  
#1 Posted : Monday, June 12, 2017 1:58:48 PM(UTC)
ageitalia

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/16/2006(UTC)
Posts: 47
Location: Italy

Thanks: 6 times

Ciao a tutti,

given a selected number of securities, I need a formula which, each day, would take the highest value and the lowest value among them.

E.g: different interest rates. In the custom formula I would put

us:=Security("PATH\US", C);

de:=Security("PATH\DE", C);

jp:=Security("PATH\JP", C);

uk:=Security("PATH\UK", C);

Then, the formula would calculate, on a daily basis, the highest value and the lowest value among the four securities; in order to plot the difference.

Any hint?

Thank you and greetings.

MS Support  
#2 Posted : Tuesday, June 13, 2017 9:54:07 PM(UTC)
MS Support

Rank: Advanced Member

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

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

Ciao a tutti,

given a selected number of securities, I need a formula which, each day, would take the highest value and the lowest value among them.

E.g: different interest rates. In the custom formula I would put

us:=Security("PATH\US", C);

de:=Security("PATH\DE", C);

jp:=Security("PATH\JP", C);

uk:=Security("PATH\UK", C);

Then, the formula would calculate, on a daily basis, the highest value and the lowest value among the four securities; in order to plot the difference.

Any hint?

Thank you and greetings.

Hi,

You could do something like this:

Code:
1st:=Security("US",C);
2nd:=Security("DE",C);
3rd:=Security("JP",C);
4th:=Security("UK",C);
Max(1st,Max(2nd,Max(3rd,4th))) - Min(1st,Min(2nd,Min(3rd,4th)))

Edited by user Tuesday, June 13, 2017 9:54:54 PM(UTC)  | Reason: Not specified

thanks 1 user thanked MS Support for this useful post.
ageitalia on 6/14/2017(UTC)
ageitalia  
#3 Posted : Wednesday, June 14, 2017 5:05:47 AM(UTC)
ageitalia

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/16/2006(UTC)
Posts: 47
Location: Italy

Thanks: 6 times
Thank you! That was what I was looking for!... :-)
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.