stockfetcher 963 posts msg #45281 
6/26/2006 1:59:50 PM
Below are new mathematical functions available for your filters:
round(indicator,decimal offset): Round to nearest value based on the decimal offset. By default, round() will round to the nearest integer. For example:
A negative, integerbased offset will shift the rounding to the "right" of the decimal point. For example, to round based on tenths you would enter a 1:
A positive, integerbased offset will shift the rounding to the "left" of the decimal point. For example:
ceil(indicator): Round up to the nearest integer.
floor(indicator): Round down to the nearest integer.
mod(indicator,modulus): Return the remainder using the supplied modulus.
pow(indicator,power): Return the value of the indicator to the specified power.
exp(indicator): Return the value of e raised to the specified power.
exp10(indicator): Return the value of 10 raised to the specified power.
sin(indicator): Compute the sine of the specified value.
asin(indicator): Compute the arc sine of the specified value.
cos(indicator): Compute the cosine of the specified value.
acos(indicator): Compute the arc cosine of the specified value.
tan(indicator): Compute the tangent of the specified value.
atan(indicator): Compute the arc tangent of the specified value.
For more math functions click here
As always, let us know if you have any questions or would like to see any measures not listed above!
Thank you,
StockFetcher.com Support

nikoschopen 2,824 posts msg #45288  Ignore nikoschopen 
6/26/2006 3:31:00 PM
Stockfetcher,
You seemed to have left us with only one option when rounding, namely to round the result to only its nearest "whole" number. Yet the possiblity of rounding to a certain number of decimal places or "to the next higher number" cannot be ruled out. For example, I prefer to see the value of $26.67 rounded to $26.70 instead of $27.

tomb 267 posts msg #45290  Ignore tomb 
6/26/2006 3:38:35 PM
Hi,
If noninteger based rounding is required, we recommend using something similar to:
Tom
StockFetcher.com Support

nikoschopen 2,824 posts msg #45291  Ignore nikoschopen 
6/26/2006 3:45:22 PM
Well, duh! Another display of my inexcusable ignorance... LOL

nikoschopen 2,824 posts msg #45292  Ignore nikoschopen 
6/26/2006 4:07:02 PM
Tomb,
On a similar note, would it not be better to implement a userdefined parameter to designate the decimal places to be used? For instance, the following round function will return a decimal string rounded to the hundredths:
round(close,2)

tomb 267 posts msg #45293  Ignore tomb 
6/26/2006 4:18:02 PM
Hi,
We are looking into making that change.
On a related note, we are currently looking into a bug with some invalid results from the round function. We'll post an update when this has been resolved.
Thank you!
Tom
StockFetcher.com Support

tomb 267 posts msg #45297  Ignore tomb 
6/26/2006 7:37:56 PM
Hi,
Please note the change to the usage of "round" in the first message of this thread.
Thank you again, and please let us know if you run into any issues or have any questions.
Tom
StockFetcher.com Support

nikoschopen 2,824 posts msg #45327  Ignore nikoschopen 
6/27/2006 3:00:39 PM
Tomb,
Has the bug been removed? There are times when I get erroneous values or no calculation at all. It's only after continually refreshing the screen the correct numbers make their belated appearance.

tomb 267 posts msg #45328  Ignore tomb 
6/27/2006 3:21:02 PM
Is there a particular example above that is producing problems, or do all of the examples show an error? Any additional information would definitely help.
Tom
StockFetcher.com Support

nikoschopen 2,824 posts msg #45329  Ignore nikoschopen 
6/27/2006 4:14:30 PM
Tomb,
At this time, only the default value of 0 seems to work without a glitch. If I were to change the offset value to any other number, the result remains the same as the close. Hence it's my belief that the error isn't isolated to one set of "example". I have made screenies of round() using two different offset values (1 and 1) in the hope of making myself more clear.
http://img128.imagevenue.com/img.php?loc=loc85&image=24477_round.jpg
http://img101.imagevenue.com/img.php?loc=loc86&image=24484_round2.jpg
