OPEN-SOURCE SCRIPT

How To Count Decimals

Mis à jour
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!
Notes de version
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.
Notes de version
Cosmetic.
Notes de version
Revision 2

Implemented a more detailed grid for testing higher precision values. Increased precision of example output values.
Notes de version
Cosmetic.
Notes de version
Cosmetic.
countdecimalsdigitseducationalfractionfunctionnumeralsPine utilitiesprecisionradixremainderTrend Analysis

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?


lux ex tenebris • deuro mea umbra absens • Telegram: t.me/allanster
Aussi sur:

Clause de non-responsabilité