How can I control showing the digits to the right of the decimal, but for ONLY specific buffers, not all?

 

So far, all I'm aware of is:

IndicatorSetInteger(INDICATOR_DIGITS,0);

which suppresses the decimal portion of ALL the buffer readouts in an indicator.

How can I suppress only specific buffers that I already know ahead of time will have no decimal values, making them integers (in effect).

I'd like to get rid of all those unnecessary zeros.

Anyone know how to do this?

 

I don't think there is a simple solution for that. The difficult solution is:

1. Remove all those value from indicator(use INDICATOR_CALCULATIONS instead of INDICATOR_DATA)

2. Create OBJ_LABEL for each value in a fashion that you desire.

 

what about casting the double or float to integer or long?

  for(int i = 0; i < rates_total; i++)
     {
      val = (int)close[i];
     }
 
Yashar Seyyedin #:

I don't think there is a simple solution for that. The difficult solution is:

1. Remove all those value from indicator(use INDICATOR_CALCULATIONS instead of INDICATOR_DATA)

2. Create OBJ_LABEL for each value in a fashion that you desire.

thanks, yeah, I suspected

 
Conor Mcnamara #:

what about casting the double or float to integer or long?

That's exactly why I have the question. I have some buffers set to display what amount to integers, so I don't want to see 5 zeros to the right of the decimal when they'll never contain any values in those places.