TradingView
allanster
2022년 2월 7일 오전 11시 42분

How To Count Decimals 

Bitcoin / United States DollarCoinbase

설명

Custom f_nDecimals() function returns precision of decimal numbers of the following forms:
const, input, simple, and series of the following types: float, integer, and string.
Error checking is performed for valid numbers and invalid values return NaN.

NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!

릴리즈 노트

Revision 1

Added a compact refactored equivalent version of function: f_nDecimals().
Renamed original annotated version of function to: f_nDecimal5().
Added column to matrix table to compare equivalency.

릴리즈 노트

Cosmetic.

릴리즈 노트

Revision 2

Implemented a more detailed grid for testing higher precision values. Increased precision of example output values.

릴리즈 노트

Cosmetic.

릴리즈 노트

Cosmetic.
코멘트
kurtsmock
Loving it.
allanster
@kurtsmock, thank you Kurt for your interest and comment, much appreciated!
kurtsmock
@allanster, You're the most under-rated member of the TV community. Your contributions are fantastic! <3
farooq_raza
Looks Impressive! love to try it!
allanster
@farooq_raza, thanks for your interest and comment!
더보기