Two numbers after the decimal point

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #244015 quote
    Marcel van VlietMarcel 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
    JSJS
    Participant
    Master

    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 robertogozzirobertogozzi
1 year, 7 months ago.

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