QuantNomad

Proper Round Functions [QuantNomad]

Round function in PineScript is very simple and allows you to round numbers only to the closest integer number. This is a bit irritating because I very often have to round numbers to some decimal places and not integer.
So I created 2 functions I use all the time and now sharing them with you.

  • roundn - rounds the values in its first argument to the specified number of decimal places.
  • roundtick - rounds the values to current symbol mintick

I hope they will be useful for you.
Favori Komutlardan Çıkart Favori Komutlara Ekle
Courses:
PineScript Programming: https://qntly.com/pinepro
TradingView Essential: https://qntly.com/tve

Access to Pro Indic.: https://qntly.com/proind

YouTube: https://qntly.com/youtube
Discord: https://qntly.com/discord
Telegram: https://qntly.com/tel

Yorumlar

You're the man. Thnx
Cevap Gönder
hi quand i have a question how can i alert if doble doji side by side and next candle green or red ( doji -> doji -
i have this code buy i need

Precision = input(0.15, minval=0.0001, title="Doji's Max Body size")
barcolor(abs(open - close) <= (high - low) * Precision ? yellow : na)

doji=(abs(open - close) <= (high - low) * Precision ? 1:0)
doji2=(abs(open - close) <= (high - low) * Precision ? 1:0)
plotchar (doji)
Cevap Gönder
@istek7, something like this should work for you:
alertcondition(doje and doji2, "alert", "alert")
+1 Cevap Gönder
istek7 QuantNomad
@QuantNomad, i m not chicking thanks for back
Cevap Gönder
Very thanks
Cevap Gönder
Thanks !
Cevap Gönder
This is an another interesting creation! Thanks for sharing QuantNomad <3
Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Tanıdık yönlendirme Kurallarımız Destek Merkezi Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Hafif Grafik Kitaplığı Blog ve Haberler Twitter
Profil Profil Ayarları Hesap ve Ödemeler Tavsiye edilen arkadaşlar Koinler Destek Kayıtlarım Destek Merkezi Yayınlanmış Fikirler Takip Edenler Takip ediliyor Özel Mesajlar Sohbet Çıkış