TradingView
QuantNomad
Dec 1, 2021 4:48 PM

Advanced Comparison Tool 

Bitcoin / U.S. dollarBitstamp

描述

With the new Pine Script features you can build pretty interesting scripts.
Here is my try to expand functionality of basic comparison tool you have in TradingView.
When you apply it on your chart you can select a bar when do you want to start comparing your instrument from.
In parameters you can specify up to 32 symbols to compare. You can also disable symbols and change color for them as well.
As a result you'll see a table with summary and line for every instrument you selected as if it started from the close of the selected bar.

Disclaimer.
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice
评论
TradingWolf
Nice work! do you know how you can rig alerts up to this? I tried setting it up with a for loop but it only seems to trigger for the first few assets and doesn't check the rest
RedKTrader
Nice work - thank you for sharing...
ICEKI
Thank You so much QuantNomad for building this awesome comparison tools, this is a great tools for compare multiple assets much easier, very appreciated your generous contributions to our community, keep it up and wish all the best <3
A_Traders_Edge
Man, thats similar to the pubs I just started submitting BUT BETTER!!! Thanks for out shining me as its giving me some great ideas. Bravo on this one. Might be one of my favs of yours. Kinda wondering why your not creating some functions to get your lines down to under 100 though...nonetheless... great....just great!!! ps love your idea for the get only symbols array...was doing it in a more verbose way. Will have to use that one.
Cobaintrade
I think there is an issue with it and it isn't generating any output.
QuantNomad
@azs101, Do you select a bar after adding it to the chart?
Cobaintrade
@QuantNomad, yes.

Re-installed a few hours after and it’s working fine now. No N/A errors.
FishStocker
For some reason it wont show anything in my tradingview chart. Do I need a pay license ? Please help
chosin76
this is great.. if you replace the manual bar entry with
chart.left_visible_bar_time: tradingview.com/pine-script-reference/v5/
it will adjust for the chart view

I will probably set it up so you can do either
NEKSUS_
Please add a cell "total" - the sum of all values in the P&L column
更多