+1 888 340 6572 



Post new topic Reply to topic 
Could I define the result report precision within code   [ ]
Author Message
#1 posted 18 Mar 2012 

Status: Offline
Posts: 1054
Thanks Received: 194 times
Thanks Given: 604 times
Joined: 23 Nov 2010
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


#2 posted 18 Mar 2012 

Status: Offline
Posts: 519
Thanks Received: 199 times
Thanks Given: 292 times
Joined: 09 Apr 2010
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).



For this message the author sptrader has received thanks:
arjfca


#3 posted 18 Mar 2012 

Status: Offline
Posts: 1054
Thanks Received: 194 times
Thanks Given: 604 times
Joined: 23 Nov 2010
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



Post new topic Reply to topic