| Index | Recent Threads | Who's Online | User List | Search |
|
|
![]() |
Portfolio123 » List all forums » Forum: Latest Release » Thread: Math function enhancements |
|
Total posts in this thread: 6 |
[Request a Feature] [Add To My Favorites] [Watch this Thread] |
| Author |
|
|
marco
|
We upgraded/added some MATH functions. Here they are: Min(x1, x2 [,..,x20]): Returns the smallest value in list. Up to 20 parameters are allowed and NAs are discarded Max(x1, x2 [,..,x20]): Returns the largest value in list. Up to 20 parameters are allowed and NAs are discarded Average(x1, x2 [,..,x20]): Returns the average value in list. Up to 20 parameters are allowed and NAs are discarded Between(a, b, c): Returns TRUE (1) if a is between b and c (inclusive), FALSE(0) otherwise ---------------------------------------- Portfolio123 Staff |
||
|
|
marco
|
Sorry, the function should read: Avg(x1, x2 [,..,x20]): Returns the average value in list. Up to 20 parameters are allowed and NAs are discarded ---------------------------------------- Portfolio123 Staff ---------------------------------------- [Edit 1 times, last edit by marco at May 8, 2008 11:48:20 AM] |
||
|
|
jerrodmason
Advanced Member UNITED STATES Joined: Jan 14, 2005 Posts: 599 Status: Offline |
Nice. Would yuou consider changing the syntax of Between? It seems more intuitive to display the paramters in ascending order, ie Between(a,b,c) = true iff a<=b<=c ---------------------------------------- The smart money was on Goliath. "He's not the Messiah. He's a very naughty boy." |
||
|
|
gviersen
Advanced Member
|
Still waiting for a Log function. Stock price movements are lognormal, would be nice to have a log function in a lognormal world. Surely you don't have to code all the math functions from scratch?? |
||
|
|
fwouters
Advanced Member
|
Since the change I get an error (Error near ')': Min - Missing operands) for the following function: PctFromHi < Min(-13,(-24 + GainPct/10)) Can't figure out what is wrong with it. Used to work before the upgrade. Can someone help me? ---------------------------------------- Filip |
||
|
|
marco
|
Your function syntax should work but there are problems in the parser. We'll revisit the parsing logic. In the meantime try this alternative: PctFromHi < Min(-13,GainPct/10 -24) Thanks for reporting this ---------------------------------------- Portfolio123 Staff ---------------------------------------- [Edit 1 times, last edit by marco at May 24, 2008 12:47:02 PM] |
||
|
| [Show Thread Printable Version] |