5 decimal places for "H"igh and "L"ow bar prices in indcatrs  [SOLVED]

Questions about MultiCharts and user contributed studies.
maddog206
Posts: 3
Joined: 19 Oct 2016

5 decimal places for "H"igh and "L"ow bar prices in indcatrs

Postby maddog206 » 19 Oct 2016

Hi, I have researched and can't find an answer to this simple question so I am going to post it.

I am working Forex High and Low bar prices. When I try to subtract Low from High, I get 1.10 - 1.10 = 0. But what I really want is 1.09935 - 1.09885 = 0.00040. So how do I force 5 decimal places on user variables and system supplied variables in Power Language indicators?

Thanks a million.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: 5 decimal places for "H"igh and "L"ow bar prices in indc  [SOLVED]

Postby Henry MultiСharts » 20 Oct 2016

Hello maddog206,

Here is how to do that:

Code: Select all

vars: var1(0);
var1=high-low;
print(var1:0:5);
or

Code: Select all

print((high-low):0:5);


Return to “MultiCharts”