Login Page - Create Account

Support Board


Date/Time: Sat, 27 Jul 2024 01:18:49 +0000



[Programming Help] - MOBO Bands

View Count: 340

[2023-11-08 18:59:24]
User509820 - Posts: 69
Hello, I am trying to create a tweak using the bollinger bands. For the alert condition having a alert when price breakouts of the bb to the upside, and will only create alert again when price breakouts to the downside. Attached is a example of this.
Date Time Of Last Edit: 2023-11-20 06:15:23
imageScreenshot 2023-11-08 105113.png / V - Attached On 2023-11-08 18:58:15 UTC - Size: 242.56 KB - 76 views
[2023-11-20 06:14:20]
User509820 - Posts: 69
Any help?
[2023-11-20 14:58:22]
Sawtooth - Posts: 4051
You need to create a persistent TRUE in each direction, then find the transitions.

1. Add the Spreadsheet Formula study, and use a formula like this in its Formula field:
=IF(CROSSFROMBELOW(C,ID1.SG1),1,IF(CROSSFROMABOVE(C,ID1.SG3),-1,ID2.SG1[-1]))
where ID1 is the BB study, and ID2 is this Spreadsheet Formula study.
Hide this study.

2. Add the Color Bar Based On Alert Condition study,
- Set 'Output When Condition True' to Use Input Data
- Set 'Input Data' to High
- Set the DrawStyle to Arrow Up
- Use a formula like this on its Alerts tab:
=AND(ID2.SG1[-1]=-1,ID2.SG1=1)

3. Duplicate the color bar study.
- Set 'Input Data' to Low
- Set the DrawStyle to Arrow Down
- Use a formula like this on its Alerts tab:
=AND(ID2.SG1[-1]=1,ID2.SG1=-1)
Date Time Of Last Edit: 2023-11-20 15:07:42

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account