https://usethinkscript.com/threads/...rre-zigzag-for-thinkorswim.20823/#post-157866
Because this zigzag doesn't repaint, I'm really curious if you could put anchored VWAPs at the close of the apex points.
Something like the 5 most recent apexes track a VWAP until the oldest one rolls off and resets to the most recent apex. It might be better to explain the idea as the chart always containing a VWAP that is 1, 2, 3, 4, and 5 apexes old. Whatever can be codified to work within the Thinkscript constraints.
Maybe you could even make the VWAP tracking ignore the gray zone (chop) like the trading strategy does. It might make this idea have a better signal to noise ratio.
Another idea could be looking at the absolute value of the difference between two apexes, taking that as a percentage of the close of the more recent apex, then using that value to analyze how "strong" the VWAP it generates might be. This can be standardized across assets by converting those "VWAP strength" readings to a Z-score. From here arises the potential to scan for assets approaching the highest "VWAP strength Z-score" for mean reversion plays.
Instead of just looking at the most recent apexes you could change the VWAP tracking approach to look at something like 20 of the most recent "VWAP strength Z-score" values and always have a VWAP anchored to the top 5 of those values. Your VWAP lines become "VWAP strength Z score rank 1, 2..."
Aside from just drawing VWAPs, trading strategy wise, only taking the trade if the "VWAP strength Z score rank" (which would just be a measure of trend length because we aren't putting a VWAP on it) is top 5 could be an improvement.
These are just some ideas, I haven't touched Thinkscript in a very long time and am curious if any of this is doable.
Because this zigzag doesn't repaint, I'm really curious if you could put anchored VWAPs at the close of the apex points.
Something like the 5 most recent apexes track a VWAP until the oldest one rolls off and resets to the most recent apex. It might be better to explain the idea as the chart always containing a VWAP that is 1, 2, 3, 4, and 5 apexes old. Whatever can be codified to work within the Thinkscript constraints.
Maybe you could even make the VWAP tracking ignore the gray zone (chop) like the trading strategy does. It might make this idea have a better signal to noise ratio.
Another idea could be looking at the absolute value of the difference between two apexes, taking that as a percentage of the close of the more recent apex, then using that value to analyze how "strong" the VWAP it generates might be. This can be standardized across assets by converting those "VWAP strength" readings to a Z-score. From here arises the potential to scan for assets approaching the highest "VWAP strength Z-score" for mean reversion plays.
Instead of just looking at the most recent apexes you could change the VWAP tracking approach to look at something like 20 of the most recent "VWAP strength Z-score" values and always have a VWAP anchored to the top 5 of those values. Your VWAP lines become "VWAP strength Z score rank 1, 2..."
Aside from just drawing VWAPs, trading strategy wise, only taking the trade if the "VWAP strength Z score rank" (which would just be a measure of trend length because we aren't putting a VWAP on it) is top 5 could be an improvement.
These are just some ideas, I haven't touched Thinkscript in a very long time and am curious if any of this is doable.
Last edited by a moderator: