TradingView
dep0tyoxxx
2021年4月20日下午12點55分

Date-selected Synch and Compare Script Module [yoxxx] 

Visa Inc.NYSE

描述

This Script is a Convenience Script Module for calculations based or started on a fix time / date.
(In difference to bar_index-based where the reference point is shifting from bar to bar, thus is dynamic).

Purpose examples:
- Comparison by start date
- Time driven studies or strategies
- Measuring from Date of Interest

The script also contains a date input box with the feature of auto-converting the default time to local user time (a newer feature of Tradingview which too me a lot of research to find; so here integrated).
Last not least it the module gives you a ready to go example for multi security comparison on percentage scale with a free selectable start date.

Enjoy
Yoxxx

P.S:. For further notes look at the script code.
They are concerning usage and how avoiding some strange display issues.
評論
justnifty
Hi, Did you find any solution for this?
Date-sync & Compare [yoxxx]
why it differ from the default comparison chart when new data is added to the chart in the live chart?

the above chart is for EURUSD (blue) and GBPUSD (orange) comparison. The top window is default from TV and the bottom window is this indicator.
When I started I started from 18th Oct 2.45 am (as it was the time for the first candle from the LEFT side) at that time it was matching perfectly, but as the new data came in it is not matching now.
Can you throw some light on this, and any solution for this?
And If we change the starting point exactly as the chart window it again starts matching for some time.
I have only basic knowledge about pine, but If we can keep a constant number of candles all the time in the calculation, then we can solve the problem. So everytime it adds a new candle on the right side it will drop 1 old candle from the left side. Can we do that in the new pine version?
Thanks for your time.
dep0tyoxxx
@justnifty, I havent got the time to go deeper in the moment, but my bet is that is sommething to with actual (if that is the term) vs historical data. The chart in progress is by default calaculated differently then historical ones. If this is the reason you shouldnt have your issues, when you snycstart is not today. Hope that helps.
yoxxx
justnifty
@dep0tyoxxx, Thank you for your time.
I have added a black line that prints the % difference continuously.
Is there any good indicator which we can use with black line and we get confirmation that now it is moving towards zero!!
Then this will become near the holy grail!
A_Traders_Edge
So my friend, I searched for this for quite a while to be able to view 40 diff crypto's % gains starting from when Bitcoin had a bottom (to see which racehorses were out of the gates the fastest). Wish I would have found this sooner. One of the other user selectable options that split my friggin skull was when I wanted to be able to basically "reset" the time from where the % gains started calculating from. So the option was a user selectable interval that when the interval was reached (in bars) then the % gains plots would reset to 0. I was able to work it out but am not 100% satisfied with the result bc every time the plots reset to zero I end up losing 2 bars worth of movement (which isnt a HUGE deal but big enough that I keep thinking about it thus am writing it here. If I was to share the script with you, would you have any interest in checking it out to see if you could easily see another way around it that perhaps Ii missed? It is the crux of an otherwise bad-ass script (in my eyes at least). Now, if your too busy I would COMPLETELY understand and wouldnt hold it against you. Have a great day bud.
更多