Reply To: Percent Swing – Script to Show Highs and Lows on Chart

Optuma Forums Optuma Scripting Percent Swing – Script to Show Highs and Lows on Chart Reply To: Percent Swing – Script to Show Highs and Lows on Chart

#66859
Darren
  • Topics: 69
  • Replies: 742
  • Posts: 811

Thanks Jon – are you looking to get the values of the swings? Use the PERCENTWING() function, set to your preference, eg 5%.

Then use the SWINGEND() function to get the value of the last swing:

Use the square bracket offsets for the previous swings, eg the previous swing value:

Note that the offset values will depend on the direction of the current swing, so if the swing is down (as in your example of XAO) then the odd numbered offsets will be high swings, and even numbered will be the lows. If the current swing is down, then it will be the opposite.

I’m planning on doing some blog posts over the next few weeks on swing scripts because it can get quite tricky. Sign up here if you haven’t already, and you’ll be notified on the weekend when they are published (see the last article on identifying swing trends):

http://www.optuma.com/blog

Pin It on Pinterest