Reply To: Scripts for Relative Rotation Graphs (RRGs)

Optuma Forums Optuma Scripting Scripts for Relative Rotation Graphs (RRGs) Reply To: Scripts for Relative Rotation Graphs (RRGs)

#64301
Darren
  • Topics: 66
  • Replies: 634
  • Posts: 700

Using the Heading value we can define ranges to show the general RRG direction in a watchlist by splitting the 360° of the circle into eight equal 45° segments. For example, we can define those heading northeast as being between 22.5° and 67.5° i.e. both have increasing relative strength and momentum (good), whereas those moving in a southwest direction (between 202.5° and 247.5°) have the opposite (bad).

We can also break up the remainder of the ranges as follows:

North – between 337.5° and 22.5°
East – between 67.5° and 112.5°
Southeast – between 112.5° and 157.5°
South – between 157.5° and 202.5°
West – between 247.5° and 292.5°
Northwest – between 292.5° and 337.5°

These can be scripted as follows, and when the condition is true the IF() statement assigns a value, such as Southeast = 4, with the other IF statements being false (giving a result of zero):

When added as a watchlist column the values can then be used in the conditional formatting for labels and/or colours:

Capture

Pin It on Pinterest