Hello
I got indicator that capture and plot the high of the previous day. On my data window, I got the resulting number = 1. To read the proper value, i need to format that Indicator to have a 5 digit after 0 precision. Otherwise, the appear result equal 1
My goal is to have it coded inside the indicator. The same one is use all over every charts that I use and in each of them, i need to format the precision.
A good day to all
Martin
Could I define the result report precision within code
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: Could I define the result report precision within code
When I do a print statement for example , I set the precision this way:
Print(date,",",time,",","Close=",Close:1:4);
For Forex-(Eurusd) this will result in a price like 1.3176 .
You would probably use something like close:1:5 (5 represents the number of digits to the right of the decimal, the 1 represents the number of digits to the left of the decimal).
Print(date,",",time,",","Close=",Close:1:4);
For Forex-(Eurusd) this will result in a price like 1.3176 .
You would probably use something like close:1:5 (5 represents the number of digits to the right of the decimal, the 1 represents the number of digits to the left of the decimal).
Re: Could I define the result report precision within code
Hello Sptrader
I do use the format like you wrote for my print out or file writing. My interrogation if for the data in the Data Windows box.
When i plot or do some calculation and I read the result in the data window, in need to modify from the indicator property the number of digit after the 0. I'm looking to embedded in the code this format.
Martin
I do use the format like you wrote for my print out or file writing. My interrogation if for the data in the Data Windows box.
When i plot or do some calculation and I read the result in the data window, in need to modify from the indicator property the number of digit after the 0. I'm looking to embedded in the code this format.
Martin