Discussions
»
Product and Service Development
»
MetaStock
»
Customize the no of decimal points displayed
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/20/2006(UTC) Posts: 53
|
Hi.
For example, it shows the following in the data window:
Date - 28/03/2005
Time - 11:39AM
Value - 1.75004319
Open - 1.750
High - 1.750
.
.
.
MA - 1.74920489
MA - 1.74918889
.
.
.
As you see, in Open/High column, it shows up to 3 decimal points.
In other column, it shows 8 dights.
Is there any way to customize the no of decimal points displayed? How?
Thank you!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
No, not that I am aware of. :(
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/20/2006(UTC) Posts: 53
|
g_stockman wrote:No, not that I am aware of. :(
:( Bad news! :evil:
Forex futures are usually 4 decimal places, while JPY is 6 decimal places. :(
:cry:
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Decimal/Integer rounding can be done at the formula level:
[code:1:e9fe41f202]
===================================
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<---------------------------------------
[/code:1:e9fe41f202]
jose '-)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/20/2006(UTC) Posts: 53
|
Thanks, Jose!
I found something strange.
When I just open the chart (without that template/layout), it shows 8 decimal places.
But when I apply that template/layout, it shows 3 decminal places only.
Weird?!
It seems the display of decimal places can be controlled by the template/layout.
Any clue why this thing occurs?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
I think that we'll have to throw that irregularity into the bottomless pit of MetaStock mysteries. :)
jose '-)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/20/2006(UTC) Posts: 53
|
Metastock has lots of MMs!
What're MMs? Metastock Mysteries! :mrgreen:
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
MetaStock
»
Customize the no of decimal points displayed
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.