The following critical lines of the original WWV_LB script determine when a wave reverses, both the true and the confirmation point:mov = close>close ? 1 : close<close ? -1 : 0
trend= ( mov != 0) and ( mov != mov) ? mov : nz (trend)
isTrending = rising(close, trendDetectionLength) or falling(close, trendDetectionLength)
wave=(trend != nz (wave)) and isTrending ? trend : nz (wave) These original script lines are replicated in lines 62 to 65 of my script and are used to define wave reversal bars and wave reversal confirmation bars. The original WWV_LB script does not track potential or actual bars. The information can be extracted and tracked from the original script and then used to plot the actual reversal bars. This allows the to be tracked from the actual/true bars.Instead of "trendDetectionLength" I have inserted "Trend Detection Length" in the dialogue boxes. You can of course change the descriptor to what you wish by editing script line 33 to the original term or whatever you wish. You might also wish to set the default to the value "2" as per the original script. I have set the default to "3".
If you use a dark background I suggest you edit script line 4 from blackr=black to something such as blackr=yellow The values are shown in a vertical column of 3 numbers. Given the limitations of Pinescript Version 3 relative to V4, they are plotted at the point where the wave reversal is confirmed as opposed to the true . The lines plot the true . The plot location of numbers could be improved in Pinescript Version 4. I explain below why I have not published the Pinescript version 4 scripThe values plotted on the chart are calculated to be relative numbers. The script is limited to showing only three numbers vertically. Only the highest three values of a number are shown. For example, if the highest recent pip value is 12,345 only the first 3 numerals would be displayed ie 123. But suppose there is a recent value of 691. It would not be helpful to display 691 if the other wave size is shown as 123. To give the appropriate relative value the script will show a value of 7 instead of 691. This informs you of the relative magnitude of the values. This is done automatically within the script. There is likely no need to manually override the automatically calculated value. I will create a video that demonstrates the manual override method.
Should you update to Pinescript version 4? You could but if you do you will need to change the "plotchar" criteria since this script will exceed the 64 plot limit when converted to version 4. Version 4 would also allow the zigzags lines to be straight lines. However, the 50 label and line plot limit (Pinescript calls this resource sparing feature "garbage collection") significantly truncates the screen available information provided on screen. This algo optionally allows the plotting of zigzags as calculated by the original WWV_LB script. Toggling between the two script versions allows you to see the plot differences. I have also made some modifications to the original WWV_LB histogram script to adjust the .This script should be used in conjunction with the "WWV_LB fix histogram jayy" shown in the panel below the main screen. Here is a link to the original LazyBear histogram script which can be used for comparison. The differences are subtle, however, the histograms will regularly be different by a bar or two:
The lowest panel has the original LazyBear WWV_LB script for comparison. All three scripts have been set to a Trend Detection Length of 3.
이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.