Im very thankful , can you update the T3 version of phase change index too ? Im sorry if Im asking so much.
The main difference comes from the usage of buffers and arrays
You are using buffers and I am using arrays for everything except the values that need to be displayed on the chart. The way array are treated in my code means that array elements are accessed in "inverted logic" to buffer logic (in "buffer logic" buffer is the current value, in that "array logic" array is the oldest value) I like this way because apart of resizing the array to current bars size, it does not require any additional coding and allows simple using of two dimensional arrays instead of buffers (it is still an 8 buffer limitation in MT4, MT5 will not have that limitation)
Also, there is one difference in my calculation compared to M.H.Pee way : in his article he calculates momentum(5) as a momentum of 5 elements and not what momentum(5) is - a momentum of 1st and 6th element (if we used Pee's logic, than momentum(1) would always be 0, and as we know, it is not) Hence I do not have the /(Length-1) part but rather simple /(Length). And further To get same values as Pee for his 35 PCI one should use length 34
Anyway, here are tose PCI and T3 smoothed PCI. There is no secret in the code, but as keit tells, one really must read what for and how does Pee use that indicator. That is all
I meant this one , I have not get around to check the double smooth but a quick look I think It may be better than the T3 version...
Again can't thank you enough.
Posted it here : https://www.mql5.com/en/forum/175037/page865