Discussions
»
Product and Service Development
»
Formula Assistance
»
Is there a way to ref the decimal placement or value in a fo
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?
|
|
|
|
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)
|
|
|
|
|
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
|
|
|
|
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)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Is there a way to ref the decimal placement or value in a fo
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.