logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dieselpr  
#1 Posted : Wednesday, July 27, 2005 4:03:45 AM(UTC)
dieselpr

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 130

Is there a way to ref the decimal placement or value in a formula? 109.04 for JPY 1.2101 for other pairs If the opening price decimal is to the right 3 places I want to uses .01 if the decimal place is to the right 1 place then i want to use .0001 can this be done in metastock?
Jose  
#2 Posted : Wednesday, July 27, 2005 7:09:50 AM(UTC)
Jose

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)
From memory, this can be done using the Frac() and Int() MetaStock functions. jose '-) http://metastocktools.com/#metastock
dieselpr  
#3 Posted : Wednesday, July 27, 2005 2:47:07 PM(UTC)
dieselpr

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 130

So would this give me what I want? If(Int(ref(o,-1))>=100,.01,.0001) Basically i'm tring to switch between the two values
Jose  
#4 Posted : Thursday, July 28, 2005 8:43:15 AM(UTC)
Jose

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)
dieselpr wrote:
Is there a way to ref the decimal placement or value in a formula? 109.04 for JPY 1.2101 for other pairs
Try this: [code:1:c526020ef1] WholeNumber1:=109.04; decimal1:=Frac(WholeNumber1); WholeNumber2:=1.2101; decimal2:=Frac(WholeNumber2); decimal1;decimal2 [/code:1:c526020ef1] jose '-) http://metastocktools.com/#metastock
Users browsing this topic
Guest (Hidden)
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.