Problem with indicator rounding

Questions about MultiCharts and user contributed studies.
bluefightingcat
Posts: 38
Joined: 31 Oct 2015
Has thanked: 1 time
Been thanked: 2 times

Problem with indicator rounding

Postby bluefightingcat » 20 Jan 2016

Hi,

I have a study with the following code:

Code: Select all

PR = 100*PercentRank(RateOfChange(C,1),RateOfChange(C,1),iLenROC+1);
The only input is the iLenROC and for that I use a default of 100 bars (i.e. 100 days in my case).

However the result that is produced when I plot this study is rounded to the closest integer. So I end up with a result such as 81.0000 instead of getting the exact figure to 4 decimal places.

I have tried everything but I can't figure out what I am doing wrong with this.

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

Re: Problem with indicator rounding

Postby Henry MultiСharts » 28 Jan 2016

Hello bluefightingcat,

You need to check how PercentRank works and the values you pass to it for the calculations.


Return to “MultiCharts”