OPEN-SOURCE SCRIPT

Volume scaled Price + auto colour change light/dark mode

🔶 OVERVIEW


🔹 This script shows price in a similar style as volume. To accomplish this we use the body of the candle (close-open), which is placed on a zero line.
imagen

This can be useful when comparing volume ~ price.

🔹 3 options are included to show additional lines, to make comparisons easier:
· Percentile nearest rank
· Bollinger  Bands  (BB)
· Simple  Moving  Average  (SMA)


🔶 SETTINGS


🔹 Option: choose whether to show price (candles) or volume . Adding 2 versions of this indicator on the chart enables you to compare these 2 options:

imagen

🔹 Lines:
· (Percentile nearest rank (only the setting mult is used for this option).
imagen

· Bollinger Bands (BB) (only the setting % perc. nearest rank is used for this option).
imagen

· Simple Moving Average (SMA )
imagen

All 3 options will use length, this is the amount of bars used for calculations.

🔹 Show wick will show you... wicks :)


🔶 PERCENTILE NEAREST RANK


imagen

imagen

imagen

🔹 This script has 2 extra types of background color


· In this case:
         · volume  is higher than previous volume  (volume > volume[1])
         · volume  is above 90th percentile rank (volume > prV)
         · price is lower than previous price (z < z[1])
         · price is below 10th percentile rank (z < prP_)

imagen
imagen



· The second type background color is reversed (volume lower, price higher)
imagen


🔶 AUTOMATIC COLOUR CHANGE WHEN SWITCHING DARK/LIGHT MODE


🔹 chart.bg_color returns the color of the chart’s background from the "Chart settings/Appearance/Background" field, while chart.fg_color returns a color providing optimal contrast with chart.bg_color
   · Following technique gives you the possibility to pick your own colour for either dark/light time.

· We first retrieve separately the red, green and blue component of the measured chart.bg_color



The following assumption states when all 3 colour components' values are below 80, we are in the dark mode:



Now we can use isDark to automatically show your own dark/light mode colours (chosen at settings), dependable on the mode:
imagen
imagen

Cheers!
Candlestick analysisdark_modeeducationallight_modepercentileVolume

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


LuxAlgo Dev: luxalgo.com
PineCoder: pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -
También en:

Exención de responsabilidad