To use this script you need to understand what Pearson's R is; which is how correlated a set of data is to a line within a given deviation (+ or -).
If the Pearson's R is negative (-) then the trend is going upwards. If the value is positive (+) then the trend is going downwards.
There is a lot of debate as to what the ideal negative and positive values are for the Pearson's R, so you can change these in the settings. What the script will do is attempt to automatically find (and draw the ) based on a given minimum period and a maximum period (both set in the settings) that match the ideal Pearson's R settings selected.
Ideally the data is MOST correlated the closest it is to -1 or 1. This means the pattern is very reliable.
This script was designed and works very well with the bar replay mode. You may need a more professional version of TradingView to use this correctly. This mode allows you to see the script in action as it mutates and changes according to the new data being introduced.
I've pre-set the Pearson's R (+) and (-) ranges to what I think is ideal.
You can disable what shows in the infobox as well in the settings if you only care about seeing certain results so it doesn't get so cluttered in there ;).
Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.
Before trying it in Real-time need your help to clarify the followings. (below mentioned setting changes are done through setting gear of Indicator and NOT directly inside code. If it needs to be changed in script, please advise)
On Intraday Chart (as you mentioned default settings work well with 4H chart and not work with lower time frame)
To apply it on 5minutes chart, I am trying to change the setting to> Min period 8, Max period 24 and Step by as 8 (multiple of min period 8 and hope this is what you meant)
But when Info Box display comes, at start shows Long Trend(LT) as 24 and Short Trend(ST) as 8 but after sometime ST keep changing to 12 & 16 and back to 8 instead of fixed Min & Max period set. Tried multiple settings and think that the numbers I entered is incompatible. So need your help to clarify.
1. As per your observations using this indicator what is the best intraday 5min chart Min Period, Step By and Max Period? (I tried 8 & 24 as Step by need to be multiples of them and it is closer to Fib 8 & 21 indicating short term trend). If possible, provide 2 or 3 setting options to experiment.
2. What is impact (better or worse) of increasing or decreasing the Step by other than PC processing power consumption?
On Daily chart (if understood correctly, the default setting of Min period 48 & Max period 360 is recommended for 4 hour chart. So, want to reconfirm whether you recommend other settings for daily or weekly chart too.
3. As per your observations using this indicator what is the best settings for Min Period, Step By and Max Period on Daily chart? If possible, provide 2 or 3 setting options to experiment.
On Weekly chart
4. As per your observations using this indicator what is the best settings for Min Period, Step By and Max Period on weekly chart?
5. If understood correctly, you meant to enter "LONG" when Pearson R value is -0.85 for high probable solid reliable continuing trend and go "SHORT" when Pearson R value is 0.71 for high probable solid reliable trend. Please confirm this understanding is correct.
6. If above understanding is correct, whether changing default of -0.85 & 0.85 to -0.85 & 0.71 in settings of Oscillator and Strategy script is fine? Also whether it have any impact to other settings and need to be changed in settings or script.
Sorry to bother you with above questions as I am finding this indicator have high potential to filter out good probability trades when used correctly with any strategy. So clarifying above points will help me to try out this indicator.
Awaiting your reply.
Once again thank you for the efforts and sharing it to the community.