- This topic has 2 replies, 2 voices, and was last updated 1 week ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Optex Show Bar Script
Tagged: Optex Show Bar Script
Hi,
Using this very simple Optex script but it is not showing expected results as highlighted in the attached screen shot, expecting upturns in the red circles to be highlighted by the Show Bar.
1 2 3 4 5 6 7 8 |
//In lower band and turns up //Use as Show Bar V1 = OPTEX(); C1 = V1.Ratio < V1.25Lower; C2 = V1.Ratio TurnsUp; C1 and C2 |
Thanks Tim.
It’s because the the TurnsUp signal will always be a day after the bottom, and in your example the day after the turn the V1.Ratio is above V1.25Lower, so the C1 condition is false, hence no signal.
You can see when we do get a signal that the day after the turn is still within the band:
All you need to do to fix the formula is look at the C1 condition on the previous day, when the low was within the band. Use this as the last line, where [1] is the
previous day.
C1[1] and C2
Changing the Show Bar to a line over all views now captures those signals:
Hi Darren,
Thanks. I hadn’t come across this condition before in my scripting, well worth knowing.
Tim
Cookie | Duration | Description |
---|---|---|
cname | 14 days | This cookie is set by Optuma. The cookies is used to store the users campaign selection for selecting the correct version of Optuma to trial and is "Necessary". |
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |