StockFetcher Forums · Announcements · Many More Math Functions! << 1 2 >>Post Follow-up
 stockfetcher980 postsmsg #45281 6/26/2006 1:59:50 PMBelow 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: Fetcher[show stocks where close is above 5.00 and add column round(close)] A negative, integer-based offset will shift the rounding to the "right" of the decimal point. For example, to round based on tenths you would enter a -1: Fetcher[show stocks where close is above 5.00 and add column round(close,-1)] A positive, integer-based offset will shift the rounding to the "left" of the decimal point. For example: Fetcher[show stocks where close is above 5.00 and add column round(close,1)] ceil(indicator): Round up to the nearest integer. Fetcher[show stocks where close is above 5.00 and add column ceil(close)] floor(indicator): Round down to the nearest integer. Fetcher[show stocks where close is above 5.00 and add column floor(close)] mod(indicator,modulus): Return the remainder using the supplied modulus. Fetcher[show stocks where close is above 5.00 and add column mod(close,10)] pow(indicator,power): Return the value of the indicator to the specified power. Fetcher[show stocks where close is above 5.00 and add column pow(RSI(14),1.5)] 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 nikoschopen2,824 postsmsg #45288- Ignore nikoschopen 6/26/2006 3:31:00 PMStockfetcher, 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. tomb267 postsmsg #45290- Ignore tomb 6/26/2006 3:38:35 PMHi, If non-integer based rounding is required, we recommend using something similar to: Fetcher[set{pricernd, round(close multiplied by 10) / 10} close is above 5.00 and add column pricernd] Tom StockFetcher.com Support nikoschopen2,824 postsmsg #45291- Ignore nikoschopen 6/26/2006 3:45:22 PMWell, duh! Another display of my inexcusable ignorance... LOL nikoschopen2,824 postsmsg #45292- Ignore nikoschopen 6/26/2006 4:07:02 PMTomb, On a similar note, would it not be better to implement a user-defined 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) tomb267 postsmsg #45293- Ignore tomb 6/26/2006 4:18:02 PMHi, 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 tomb267 postsmsg #45297- Ignore tomb 6/26/2006 7:37:56 PMHi, 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 nikoschopen2,824 postsmsg #45327- Ignore nikoschopen 6/27/2006 3:00:39 PMTomb, 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. tomb267 postsmsg #45328- Ignore tomb 6/27/2006 3:21:02 PMIs 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 nikoschopen2,824 postsmsg #45329- Ignore nikoschopen 6/27/2006 4:14:30 PMTomb, 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
 StockFetcher Forums · Announcements · Many More Math Functions! << 1 2 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.