WarEagle
New member
Well, I'm no coding genius but here is my attempt to modify the existing ZigZagHighLow indicator from TOS. This is my first time to work with thinkScript so while I removed obvious items like unnecessary inputs this is not as efficient as it could be. I simply edited the conditions of the Uptrend and Downtrend states and let the ZigZag code do the rest.
As it stands this will only plot a 2 day swing. Gann initially wrote in his rules to use a 3 day swing chart but then later, as documented by Robert Krausz in his book "A WD Gann Treasure Discovered", he changed that recommendation to a 2 day swing chart. I find the 2 day works perfectly for me. An input could be added to allow the user to select the number of consecutive highs or lows required but I did not do that here since it would take more time in code edits and I don't really need it personally. If anyone would like to improve on this by adding that feature then that would be great.
The best I can tell it is working correctly. If you use this and see a problem then let me know.
https://usethinkscript.com/threads/optuma-gann-swing-for-thinkorswim.14574/
Cheers
As it stands this will only plot a 2 day swing. Gann initially wrote in his rules to use a 3 day swing chart but then later, as documented by Robert Krausz in his book "A WD Gann Treasure Discovered", he changed that recommendation to a 2 day swing chart. I find the 2 day works perfectly for me. An input could be added to allow the user to select the number of consecutive highs or lows required but I did not do that here since it would take more time in code edits and I don't really need it personally. If anyone would like to improve on this by adding that feature then that would be great.
The best I can tell it is working correctly. If you use this and see a problem then let me know.
https://usethinkscript.com/threads/optuma-gann-swing-for-thinkorswim.14574/
Cheers
Last edited by a moderator: