• Produk
  • Komuniti
  • Pasaran
  • Broker
  • Lebih
Mulakan
  • Komuniti
  • /Penunjuk dan strategi
  • /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.
Penunjuk Pine Script®
oleh marketreaderz
Telah dikemas kini
22

Pilihan data pasaran disediakan oleh perkhidmatan Data ICE. Pilihan data rujukan disediakan oleh FactSet. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

Bukan sekadar produk
  • Carta Super
Penyaring
  • Saham
  • ETF
  • Bon
  • Syiling kripto
  • Pasangan CEX
  • Pasangan DEX
  • Pine
Peta Suhu
  • Saham
  • ETF
  • Kripto
Kalendar
  • Ekonomi
  • Perolehan
  • Dividen
Lebih produk
  • Keluk hasil
  • Opsyen
  • Aliran Berita
  • Pine Script®
Aplikasi
  • Mudah alih
  • Atas meja
Komuniti
  • Rangkaian sosial
  • Dinding Kasih
  • Rujuk rakan
  • Peraturan Dalaman
  • Moderator
Idea
  • Dagangan
  • Pendidikan
  • Pilihan Editor
Skrip Pine
  • Penunjuk & strategi
  • Pakar
  • Freelancer
Alatan & langganan
  • Ciri
  • Penentuan Harga
  • Data pasaran
Dagangan
  • Gambaran keseluruhan
  • Broker
Tawaran istimewa
  • Hadapan CME Group
  • Hadapan Eurex
  • Himpunan saham AS
Mengenai syarikat
  • Siapa kami
  • Manifesto
  • Atlet
  • Blog
  • Kerjaya
  • Kit media
Barangan
  • Kedai TradingView
  • Kad tarot untuk pedagang
  • Masa Dagangan C63
Polisi & keselamatan
  • Terma Penggunaan
  • Penafian
  • Dasar Privasi
  • Polisi Kuki
  • Kenyataan Kebolehcapaian
  • Kerentanan keselamatan
  • Halaman Status
Penyelesaian perniagaan
  • Widget
  • Perpustakaan pencartaan
  • Lightweight Charts™
  • Carta Termaju
  • Platform Dagangan
Peluang pertumbuhan
  • Pengiklanan
  • Integrasi brokeraj
  • Program rakan kongsi
  • Program pendidikan
Komuniti
  • Rangkaian sosial
  • Dinding Kasih
  • Rujuk rakan
  • Peraturan Dalaman
  • Moderator
Idea
  • Dagangan
  • Pendidikan
  • Pilihan Editor
Skrip Pine
  • Penunjuk & strategi
  • Pakar
  • Freelancer
Penyelesaian perniagaan
  • Widget
  • Perpustakaan pencartaan
  • Lightweight Charts™
  • Carta Termaju
  • Platform Dagangan
Peluang pertumbuhan
  • Pengiklanan
  • Integrasi brokeraj
  • Program rakan kongsi
  • Program pendidikan
Look FirstLook First