Secondary Candle Overlay

This simple script is meant to allow the user to select another symbol to add onto their chart and plot the candlesticks for that symbol at the selected resolution requested.

Please see the tooltip provided by the 'Secondary Symbol' input for more details with regards to properly using this script on symbols that have vastly different valuations, it will help with getting the symbol requested to scale properly with the primary symbol on the chart.

The user may also input which colors are used for bullish / bearish candles as well as the symbol itself and its resolution.

IMPORTANT NOTE: THIS SCRIPT DOES NOT ACCOUNT FOR SYMBOLS THAT ARE NOT CONTINUOUS (The defval for the symbol is TVC:DXY which closes on weekends whereas a cryptocurrency like Bitcoin does not stop trading ever; candles on these kinds of markets will be repeated when overlaid onto markets that do not have this property.)
Notas de prensa: Comment polishing
Notas de prensa: More polishing, final submission.
Notas de prensa: House-Rules update
Notas de prensa: Small name change on candle color variable.

Change suggested by @AtomOfScent enacted, the addition of bordercolor does help nicely and I had skimmed over it in the reference manual. Ty for the suggestion.
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con las Normas internas. Puede marcarlo como favorito para usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


This looks like it could be quite useful.
Btw, the default plotcandle is broken. If you change line 79 to the following it'll look much better. Bordercolor should equal the candle color unless explicitly changed @PineCoders
plotcandle(o, h, l, c, color = candle, bordercolor = candle)

+1 Responder