Limit Decimals on Calculations

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #56229 quote
    margincallcat
    Participant
    Average

    Hello!

    I wonder if there  is any command to limit decimals to say 2 decimals (0,00). Currently im stuck between using Round which gives a whole number or leave the calculation which results in 5 decimals.

    Im working on an ATR based indicator which return “how many ATRs” price is currently away from a specific line and therefore it would be preferable to have at least 2 decimals that can return like 2,50 ATR etc instead of rounding it to 3.

     

    Thanks

    #56247 quote
    Despair
    Blocked
    Master
    newvalue=Round(value*100)/100
    HerveS_67 and Meta Signals Pro thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Limit Decimals on Calculations


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Despair
8 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/21/2017
Status: Active
Attachments: No files
Logo Logo
Loading...