Optuma Forums › Optuma Scripting › Valuewhen() › Reply To: Valuewhen()
December 21, 2020 at 8:46 am
#61827

- Topics: 32
- Replies: 1,648
- Posts: 1,680
Hi May,
Have a look at this article on using swing charts in scripting https://www.optuma.com/swing-scripting-1/
The issue is that SwingEnd() returns a swing list which does not line up with day by day bars. What you want to use is the following:
1 2 3 4 5 6 |
g1 = GANNSWING(SWINGCOUNT=2, DEFAULT=SwingList, METHOD=Use Next Bar); S0 = G1.SwingEnd; R0 = VALUEWHEN(RSI(BARS=14),S0); |
Hope that helps
Mathew