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.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Originally Posted by: ageitalia 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
|
1 user thanked MS Support for this useful post.
|
|
|
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.