[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Decimal places



PureBytes Links

Trading Reference Links

Could this help?
 
>From the Metastock Help File
=======================
 
SYNTAX prec( DATA ARRAY, PRECISION ) 
FUNCTION Truncates DATA ARRAY to PRECISION decimal places.
EXAMPLE The formula "prec( 10.12981, 2 )" returns 10.120.  The formula "prec( 10.12981, 4 )" returns 10.12980.  Small binary rounding errors may cause some minor distortion in the decimal portion of any number stored in a computer.
==================
 
Dusant
 
  ----- Original Message ----- 
  From:   Jose   Silva 
  To: equismetastock@xxxxxxxxxxxxxxxx   
  Sent: Friday, July 07, 2006 6:36 AM
  Subject: Re: [EquisMetaStock Group]   Decimal places
  

        
Unfortunately MetaStock will always display all decimal places in   
indicator and exploration values. There is a way to restrict decimal   
place output only in the Expert Commentary.

The best solution is to   round-off decimal places.
Try this indicator example from
http://www.metastocktools.com/#metastock   :

===================================
Round to   nearest decimal or   integer
===================================
---8<---------------------------------------

{   Rounds off data array to nearest specified
decimal place [+x] or integer   [-x].

©Copyright 2004~2006 Jose Silva.
For personal use only.
http://www.metastocktools.com   }

{ Sample Data Array to be rounded   }
val:=Mov(C,21,E);

{ User inputs }
x:=Input("Round to   nearest decimal [+x] or integer   [-x]",-10,10,1);
plot:=Input("Data output: [1]Rounded,   [2]Original",1,2,1);

{ Rounding engine   }
rounded:=Int(val*Exp(Log(10)*Int(x))+.5)
/Exp(Log(10)*Int(x));

{   Plot in own window   }
If(plot=1,rounded,val)

---8<---------------------------------------

jose   '-)
http://www.metastocktools.com

---   In equismetastock@xxxxxxxxxxxxxxx,   bill rook 
<zipple_acre_udder@xxx> wrote:
>
>   
> 
> Hi Group
> 
> I m getting too many decimal   plcaes on my Bollinger?RSI?slope
> scans.
> 
> Is there   a way of not having so many?
> 
> Regards
> 
>   Bill



   #ygrp-mlmsg {	FONT-SIZE: small; FONT-FAMILY: arial,helvetica,clean,sans-serif}#ygrp-mlmsg TABLE {	}#ygrp-mlmsg SELECT {	FONT: 99% arial,helvetica,clean,sans-serif}INPUT {	FONT: 99% arial,helvetica,clean,sans-serif}TEXTAREA {	FONT: 99% arial,helvetica,clean,sans-serif}#ygrp-mlmsg PRE {	FONT: 100% monospace}CODE {	FONT: 100% monospace}#ygrp-mlmsg  {	LINE-HEIGHT: 1.22em}#ygrp-text {	FONT-FAMILY: Georgia}#ygrp-text P {	MARGIN: 0px 0px 1em}#ygrp-tpmsgs {	CLEAR: both; FONT-FAMILY: Arial}#ygrp-vitnav {	FONT-SIZE: 77%; MARGIN: 0px; PADDING-TOP: 10px; FONT-FAMILY: Verdana}#ygrp-vitnav A {	PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}#ygrp-actbar {	CLEAR: both; MARGIN: 25px 0px; COLOR: #666; WHITE-SPACE: nowrap; TEXT-ALIGN: right}#ygrp-actbar .left {	FLOAT: left; WHITE-SPACE: nowrap}..bld {	FONT-WEIGHT: bold}#ygrp-grft {	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 15px; PADDING-TOP: 15px; FONT-FAMILY:
 Verdana}#ygrp-ft {	PADDING-RIGHT: 0px; BORDER-TOP: #666 1px solid; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; FONT-FAMILY: verdana}#ygrp-mlmsg #logo {	PADDING-BOTTOM: 10px}#ygrp-vital {	PADDING-RIGHT: 0px; PADDING-LEFT: 8px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 8px; PADDING-TOP: 2px; BACKGROUND-COLOR: #e0ecee}#ygrp-vital #vithd {	FONT-WEIGHT: bold; FONT-SIZE: 77%; TEXT-TRANSFORM: uppercase; COLOR: #333; FONT-FAMILY: Verdana}#ygrp-vital UL {	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 2px 0px; PADDING-TOP: 0px}#ygrp-vital UL LI {	CLEAR: both; BORDER-RIGHT: #e0ecee 1px solid; BORDER-TOP: #e0ecee 1px solid; BORDER-LEFT: #e0ecee 1px solid; BORDER-BOTTOM: #e0ecee 1px solid; LIST-STYLE-TYPE: none}#ygrp-vital UL LI .ct {	PADDING-RIGHT: 0.5em; FONT-WEIGHT: bold; FLOAT: right; WIDTH: 2em; COLOR: #ff7900; TEXT-ALIGN: right}#ygrp-vital UL LI .cat {	FONT-WEIGHT: bold}#ygrp-vital A {	TEXT-DECORATION: none}#ygrp-vital A:hover {
	TEXT-DECORATION: underline}#ygrp-sponsor #hd {	FONT-SIZE: 77%; COLOR: #999}#ygrp-sponsor #ov {	PADDING-RIGHT: 13px; PADDING-LEFT: 13px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; BACKGROUND-COLOR: #e0ecee}#ygrp-sponsor #ov UL {	PADDING-RIGHT: 0px; PADDING-LEFT: 8px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px}#ygrp-sponsor #ov LI {	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 77%; PADDING-BOTTOM: 6px; PADDING-TOP: 6px; LIST-STYLE-TYPE: square}#ygrp-sponsor #ov LI A {	FONT-SIZE: 130%; TEXT-DECORATION: none}#ygrp-sponsor #nc {	PADDING-RIGHT: 8px; PADDING-LEFT: 8px; MARGIN-BOTTOM: 20px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; BACKGROUND-COLOR: #eee}#ygrp-sponsor .ad {	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 8px; PADDING-TOP: 8px}#ygrp-sponsor .ad #hd1 {	FONT-WEIGHT: bold; FONT-SIZE: 100%; COLOR: #628c2a; LINE-HEIGHT: 122%; FONT-FAMILY: Arial}#ygrp-sponsor .ad A {	TEXT-DECORATION: none}#ygrp-sponsor .ad A:hover {	TEXT-DECORATION:
 underline}#ygrp-sponsor .ad P {	MARGIN: 0px}o {	FONT-SIZE: 0px}..MsoNormal {	MARGIN: 0px}#ygrp-text TT {	FONT-SIZE: 120%}BLOCKQUOTE {	MARGIN: 0px 0px 0px 4px}..replbq {	}
 				
---------------------------------
 Yahoo! India Answers: Share what you know. Learn something new Click here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here

[Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/