TradingView
Protervus
2022年1月15日午後5時3分

Secondary Chart with OverSized Candles 

SAND / USDFTX

詳細

Hi everyone, I'm sharing a simple script I made for a friend. He was looking for a way to add another asset to his chart, and monitor relevant movements \ spot eventual correlation, especially when trading Cryptocurrencies.
We couldn't find a similar script already available so here it is - the code is commented and I hope it's clear enough :)

Notes:
- The parameter scale = scale.left keeps the scales separated and therefore the chart is more organized, otherwise the chart would appear flat if the price difference is too big (e.g. BTC vs XRP)
- It is possible to have the script running in a separate panel (instead of overlay) by moving it to a new pane (when added to the chart) or by removing the parameter overlay = true at the beginning of the code.
- In case you wish to add indicators to this sub-chart (e.g. Bollinger Bands, EMA, etc..) you can do that by adding the relevant code and feed it with the variables OPEN \ HIGH \ LOW \ CLOSE as well as using the same method to retrieve new variables from the target asset with the request.security function.

Hope this comes handy.
Val - Protervus

リリースノート

Added Price Line as per request (can be disabled in Settings)

リリースノート

Code-cleaning only.

リリースノート

Fixed the alert for Bearish OverSized Candle
コメント
aitenlabs
the script is amazing, thanks for sharing! keep up the good work 💪
xmd1979
cool script, thank you )
Protervus
@xmd1979, Appreciated :)
HomelessToRich
Thanks for this indicator. Do you think it is possible to add price line on this script ?
Protervus
@BlackMamba23, You can go into chart general settings, tab "Scales", and check "indicator Last Value Label" - it will highlight the price on the left scale :)
Alternatively, it is possible to add a label on the realtime bar of the secondary chart. Let me know if this answers to your question.
HomelessToRich
@Protervus, Thanks for the reply. Yes I need independent price line on the second chart on new chart below if it's possible
Protervus
@BlackMamba23, Let me look into that! :)
Protervus
@BlackMamba23, Should be done, let me know if it works!
HomelessToRich
@Protervus, Work fine thanks a lot
詳細