faiyaz7283

Guage

faiyaz7283 Aggiornato   
Library "Gauge"

The gauge library utilizes a gaugeParams object, encapsulating crucial parameters for gauge creation. Essential attributes include num (the measured value), min (the minimum value equating to 100% on the gauge's minimum scale), and max (the maximum value equating to 100% on the gauge's maximum scale). The size attribute (defaulting to 10) splits the scale into increments, each representing 100% divided by the specified size.

The num value dynamically shifts within the gauge based on its percentage move from the mathematical average between min and max. When num is below the average, the minimum portion of the scale activates, displaying the appropriate percentage based on the distance from the average to the minimum. The same principle applies when num exceeds the average. The 100% scale is reached at either end when num equals min or max.

The library offers full customization, allowing users to configure color schemes, labels, and titles. The gauge can be displayed either vertically (default) or horizontally. The colors employ a gradient, adapting based on the number's movement. Overall, the gauge library provides a flexible and comprehensive tool for visualizing and interpreting numerical values within a specified range.
Note di rilascio:
v2 - Added 'keyAlign' to gaugeParams.
Note di rilascio:
v3 - Added titleSize, keySize, and labelSize to gaugeParams.
Note di rilascio:
v4 - Version updates for imported libraries
Note di rilascio:
v5 - Versions updated for imported libraries.

Faiyaz Haider
Libreria Pine

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzare questa libreria in privato o all'interno di altre pubblicazioni open-source, ma il riutilizzo del codice è subordinato al rispetto del Regolamento.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questa libreria?

Copia il testo ed incollalo nel tuo script.