Weis Wave Volume
Author: sedelstein
Creation Date: 4/9/2019 5:25 PM
profile picture

sedelstein

#1
Haven't found code for this but has anyone tried this indicator in WL?

https://www.tradingview.com/script/QrCFs0K2-Weis-Wave-Volume/
profile picture

Eugene

#2
I put it on my TODO list of things for later.
profile picture

sedelstein

#3
Great. Thank you.
profile picture

Eugene

#4
Here it goes:

CODE:
Please log in to see this code.


At the moment I'm not sure if it's worth including it in Community Indicators, though.
profile picture

sedelstein

#5
Thanks. Will give this a look right away and happy to share insights (if any ;->)
profile picture

Eugene

#6
You're welcome. Note that I used different language versions for the translation rather than the one in your link:

https://usethinkscript.com/d/72-weis-wave-volume-indicator-for-thinkorswim
https://www.prorealcode.com/prorealtime-indicators/weis-wave-volume/
profile picture

superticker

#7
Appreciate the code solution above is design for readability, not efficiency. If garbage collector and cache-hit efficiency are a concern (for a production version), then mov, wave, and trend can be declared as integer (or even Boolean) arrays of two elements.
CODE:
Please log in to see this code.

And the modulo 2 divide would be better executed as an AND mask instead (since it's a power of 2), but that might be too cryptic for non-coders.

If you employ Boolean arrays (instead to integer arrays), then you can simply write the solution as Boolean equations, which would be fastest for the processor, although the understandability of it for this audience might suffer. Perhaps the integer implementation can be included as comments.
profile picture

Eugene

#8
@superticker

Appreciate your comment Mark. Indeed I choose to make the "mov" etc. a DataSeries for readability. The resulting code with arrays would be less manageable and/or intuitive as you point out. The tradeoff to this approach is a slightly higher memory footprint. If this becomes a concern the user can call Bars.Cache.Clear at the end of the Strategy to help free resources if his simulation consumes large amounts of data (e.g. intraday). Otherwise he shouldn't notice any practical impact.
profile picture

superticker

#9
QUOTE:
Indeed I choose to make the "mov" etc. a DataSeries for readability. The resulting code with arrays would be less manageable and/or intuitive as you point out.
I think the most instructive approach is the use a Rosetta Stone presentation. Recall scholars never understood Egyptian hieroglyphs until the discovery of the Rosetta Stone, which contained parallel translations to Greek. That cracked the Egyptian code.

So in a production version, I would include the Boolean equation implementation, but--in parallel--I would include the original long winded code as comments. Those motivated will study both "translations" and make parallels between them--and that's how we learned from the Rosetta Stone.

Also, the Boolean equations--which reduce the meaning into simplest terms--may reveal relationships we would not otherwise realize from the more verbose translation, which could be interesting.
profile picture

Eugene

#10
@sedelstein

Steve, have you had a chance to run the code and make sure it works as you expected?
profile picture

Eugene

#11
@sedelstein

fyi, Weis Wave Volume indicator is now part of Community Indicators v2019.06
profile picture

sedelstein

#12
Eugene

Sorry I missed your post #13. Not sure how it escaped notice.
Thanks for the help
profile picture

Eugene

#13
Steve,

You're welcome.
profile picture

t51k1606

#14
Trying to find Weis Wave Volume.

I did find the post by Eugene.

Eugene #11 5/30/2019 10:20 AM
@sedelstein

fyi, Weis Wave Volume indicator is now part of Community Indicators v2019.06

But, I'm not able to find the Community Indicators v2019.06.

Any help would be appreciated.

Best regards,
tk
profile picture

superticker

#15
From the WL Tools menu, start up Extension Manager. In the bottom right corner of the Extension Manager window is a link that says "More Extensions on the Wealth-Lab site". Click on that. In the browser window that opens, search for "community". Several possible downloads will appear. You want the Community.Indicators download.

It's Extension Manager's job to install the download. You'll need to restart WL afterwards.
profile picture

t51k1606

#16
Superticker,

Thank you so much for your help!

Best regards
tk

profile picture

Eugene

#17
To install Extensions you can visit the Extensions Finder. On how to install or update Wealth-Lab extensions, check out this illustrated tutorial and/or the Wealth-Lab User Guide > Extension Manager.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).