Two numbers after the decimal point

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #244015 quote
    Marcel van Vliet
    Participant
    Veteran

    Hi,

    The position of my self-built indicators is always displayed on the right axis with three numbers after the decimal point. I would like to see this with two decimal places.
    Does anyone know if there is a code for this?

    Thank you.

    #244029 quote
    JS
    Participant
    Senior

    The decimals in an indicator are determined based on “Floating Point,” which means that the number of decimals adjusts according to the calculation…
    As far as I know, there is no setting for this…

    Iván González thanked this post
    #244054 quote
    robertogozzi
    Moderator
    Master

    Use round(), floor() or ceil() using 2 as the precision.

    More digits are likely to be printed, but those after the first 2 decimal places will all be set to 0’s:

    a=13.5254
    x=round(a)
    y=round(a,2)
    return x AS "integer",y as "2 digits"
    Iván González thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Two numbers after the decimal point


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by robertogozzi
11 months, 3 weeks ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/19/2025
Status: Active
Attachments: No files
Logo Logo
Loading...