Optuma Forums › Optuma Scripting › BBand Script › Reply To: BBand Script
April 16, 2021 at 12:01 am
#63511
- Topics: 70
- Replies: 832
- Posts: 902
Hi Dan,
You can use the WITHINRANGE() function. Here’s an example for 1% on the 20 day BB:
1 2 3 4 5 6 7 |
LL1 = BB(BARS=20).LowerLine; UL1 = BB(BARS=20).UpperLine; WITHINRANGE(CLOSE(), LL1, PERCENT=1.00) or WITHINRANGE(CLOSE(), UL1, PERCENT=1.00) |
Attached is a workbook that you can download and open which has the areas shaded red for within 1% of the upper line, and green for lower line.