• Prodotti
  • Comunità
  • Mercati
  • Broker
  • Altro
Inizia
  • Comunità
  • /Indicatori e strategie
  • /Shorten

Shorten

Math RoundHello Reader, This is Observer from Vietnam. PURPOSE I'd like to share my script for Round Math, it's for only education purpose. I make the formula math_row(x, y) to round the value as we design and shorten the number appearance (value). It's more flexible than str.tostring(close,format.volume) or others. HOW TO USE Formula math_row(x,y) - x is the value which need to be rounded or shorten - y is the number which you want to round after "." symbol. ***Shorten*** If x < 1.000, no shorten If x >= 1.000 and x < 1.000.000, shorten to thousand value with "K" letter If x >= 1.000.000 and x < 1.000.000.000, shorten to million value with "M" letter If x >= 1.000.000.000, shorten to billion value with "B" letter ***Round*** If y = 0 => no round If y = 1 => round to format ###.# If y = 2 => round to format ###.## If y = 3 => round to format ###.### If y is other => round to default format of Tradingview EXAMPLE math_row(1.002342, 3) = 1.002 math_row(1923.321, 2) = 1.92K math_row(221452133, 1) = 221.5M Hope it useful and clear to you.
Indicatore Pine Script®
di marketreaderz
Aggiornato
22

Dati di mercato forniti da ICE Data services. Dati di riferimento forniti da FactSet. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

Più che un semplice prodotto
  • Grafici
Screener
  • Azioni
  • ETF
  • Obbligazioni
  • Singole cripto
  • Coppie CEX
  • Coppie DEX
  • Pine
Heatmap
  • Azioni
  • ETF
  • Cripto
Calendari
  • Economico
  • Utili
  • Dividendi
Altri prodotti
  • Curve di rendimento
  • Opzioni
  • Notiziario
  • Pine Script®
Applicazioni
  • Smartphone
  • Desktop
Comunità
  • Social network
  • Muro social
  • Invita un amico
  • Regolamento
  • Moderatori
Idee
  • Trading
  • Formazione
  • Selezione editoriale
Pine Script
  • Indicatori e strategie
  • Maestri
  • Freelancer
Strumenti e abbonamenti
  • Caratteristiche
  • Costi
  • Dati di mercato
Trading
  • Panoramica
  • Broker
Offerte speciali
  • Futures CME Group
  • Futures Eurex
  • Bundle azioni USA
Informazioni sulla società
  • Chi siamo
  • Manifesto
  • Atleti
  • Blog
  • Carriere
  • Kit multimediale
Merchandising
  • TradingView Shop
  • I tarocchi per i trader
  • C63 TradeTime
Politiche e sicurezza
  • Condizioni d'uso
  • Declinazione di responsabilità
  • Normativa sulla privacy
  • Politica sui cookies
  • Dichiarazione di accessibilità
  • Rischi per la sicurezza
  • Pagina di stato
Soluzioni per le aziende
  • Widget
  • Librerie grafiche
  • Lightweight Charts™
  • Grafici avanzati
  • Piattaforma di trading
Opportunità di crescita
  • Pubblicità
  • Integrazione broker
  • Programma affiliazione
  • Programma di formazione
Comunità
  • Social network
  • Muro social
  • Invita un amico
  • Regolamento
  • Moderatori
Idee
  • Trading
  • Formazione
  • Selezione editoriale
Pine Script
  • Indicatori e strategie
  • Maestri
  • Freelancer
Soluzioni per le aziende
  • Widget
  • Librerie grafiche
  • Lightweight Charts™
  • Grafici avanzati
  • Piattaforma di trading
Opportunità di crescita
  • Pubblicità
  • Integrazione broker
  • Programma affiliazione
  • Programma di formazione
Look FirstLook First