ROUND to one decimal point?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #65979 quote
    robdav
    Participant
    Veteran

    Hi

    I have an indicator that generates support and resistance levels. I need to compare the Close value to the support/resistance levels.

    When you look on the PRT crosshair the Close value is ALWAYS to one decimal place. See attached screen capture.

    If you ROUND it you obviously lose the decimal point. If you use Close then you get five decimal points. (IG Index DFB EUR/GBP spread bet)

    Is there a way to get the Close value used by the inbuilt PRT crosshair or to round to one decimal point?

    Thanks

    Rob

    RoundedClose = ROUND(Close)
    
    RETURN Close as "Close", RoundedClose as "Rounded close"
    #65984 quote
    Despair
    Blocked
    Master
    roundedclose = round(close*10)/10
    robdav and Lisa Beaney thanked this post
    #65986 quote
    robertogozzi
    Moderator
    Master

    Despair suggested the correct way to round values. Use GRAPH to view the rounded value. You will notice that 1.25048 will be rounded to 1.30000, while 1.24294 will be rounded to 1.20000.

    robdav thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

ROUND to one decimal point?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
robdav @robdav Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by robertogozzi
7 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/21/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...