에디터즈 픽OPEN-SOURCE SCRIPT

Spread by

업데이트됨
//Every spread & central tendency measure in 1 script with comfortable visualization, including scrips's status line.

Spread measures:
- Standard deviation (for most cases);
- Average deviation (if there are extreme values);
- GstDev - Geometric Standard Deviation (exclusively for Geometric Mean);
- HstDev - Harmonic Deviation (exclusively for Harmonic Mean).

These modified functions will calculate everything right, they will take source, length, AND basis of your choice, unlike the ones from TW.

Central tendency measures:
- Mean (if everything's cool & equal);
- Median (values clustering towards low/high part of the rolling window);
- Trimean (3/more distinguishable clusters of data);
- Midhinhe (2 distinguishable clusters of data);
- Geometric Mean ( |low.. ... ... .. .... ... . . . . . . . . . . . .high| this kinda data); <- Exp law
- Harmonic Mean { |low. . . . . . . . . . . . . . .. . . .high| kinda data). <- Reciprocal law

Listen:
1) Don't hesitate using Standard Deviation with non-mean, like "Midhinge Standard Devition", despite what ol' stats gurus gonna say, it works when it's appropriate;
2) Don't check log space while using Geometric Mean & Geometric Standard Deviation, these 2 implement log stuff by design, I mean unless u wanna make it double xd
3) You can use this script, modify it how you want, ask me questions whatever, just make money using it;
4) Use Midrange & Midpoints in tandem when data follows ~addition law (like this . . . . . . . . . . . . . . . . . . . . .). <- just addition law

Look at the data, choose spread measure first, then choose central tendency measure, not vice versa.

!!!
Ain't gonna place ® sign on standard deviations like one B guy did in 1980s lmao, but if your wanna use Harmonic Deviations in science/write about/cite it/whatever, pls give me a lil credit at least, I've never seen it anywhere and unfortunately had to develop it by myself. it's useful when your data develops by reciprocals law (opposite to exponential).

Peace TW
릴리즈 노트
Thanks to midtownsk8rguy now the code has a switch to turn on/off Variance descriptor & Range/Deviation ratio. For some users who don't check "Scale price chart only" for some reason, the old version was distorting the overlay. The old version will be available here
릴리즈 노트
Now variance is calculated based on quadratic (Stdev) function only, no matter which Spread measure is chosen.
릴리즈 노트
Relative Standard Deviation (RSD) was added, along with Variance and Range/Spread ratio it might be used in order to decide whether 1sr or 2nd deviations should utilized as limits.
릴리즈 노트
Overlay issue was finally defeated by using "plotchar" for the last 3 descriptors, instead of just "plot"
Pine Script manual is the king
릴리즈 노트
Median deviation was added thanks to arrays support. It has an interesting property of minimizing variance when used with mid-hinge (who'd know, tho I found it accidentally in the depths of wiki).
...
trimmed L∞ norm statistics: for example, the midhinge (average of first and third quartiles) which minimizes the median absolute deviation of the whole distribution, also minimizes the maximum absolute deviation of the distribution after the top and bottom 25% have been trimmed off.

Source, "Minimization" paragraph

I still haven't figured out yet completely what's the real deal about mid-hidnge vs median, but seems like it has something to do with low kurtosis (big variance) value/bimodality.

Man I wish I know for real, if some1 reads it now and knows exactly when to use mid-hinge, pls hit me up.

릴리즈 노트
Long awaited update for the best script in the world. Now the code is shorter - less geeky/hipster and more real world oriented. The code contained a bug which was blocking it from calculating Geometric mean at all. I can't believe I noticed it, not you, after the whole year. I also tried my best to keep the plotting as much tolerant as possible, but be sure to make appropriate color changes while using a night theme.

Peace
릴리즈 노트
And the final touch...
릴리즈 노트
New:
- All data switch;
- OTF functionality.
absolutedeviationGEOMETRICmeanmedianmidhingeMoving AveragesspreadStandard DeviationtrimeanVolatility

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


또한 다음에서도:

면책사항