- This topic has 4 replies, 2 voices, and was last updated 6 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Highlight After A Signal
Tagged: OFFSET, timesincesignal, shading
Hi,
I am using a Show Bar tool. It is set to line and shades over the bar when a specific signal occurs. I would like the line to shade the chart forward, say 100 bars from the initial signal. How would I do this?
Here is the signal:
1 2 3 4 |
V1 = BREADTHDATA(BREADTHSOURCE=Custom, BREADTHTYPE=20DHIGHS) ; V1 >= 55 |
thank you,
Hi Louis,
You can offset the results using square brackets eg for 100 bars:
1 2 3 4 5 |
V1 = BREADTHDATA(BREADTHSOURCE=Custom, BREADTHTYPE=20DHIGHS); V2 = V1 >= 55; V2[100] |
Hi Darren. Thank you. My apologies for not being clear.
I am looking for a signal to be visible on the chart the day it is triggered and the following following 99 days.
Please see the attached picture. The green line is the initial signal from the show bar tool. The green box is the time I would like be shaded in addition to the shading on the day of each signal. I hope that helps. I can’t find anything in the forum. Sorry, and thank you.
You must be logged in to access attached files.
Thanks Louis. To shade the area use this TimeSinceSignal formula in a Show View, and then drag it over the price chart:
1 2 3 4 5 |
V1 = BREADTHDATA(BREADTHSOURCE=Custom, BREADTHTYPE=20DHIGHS); V2 = V1 CrossesAbove 55; TIMESINCESIGNAL(V2)<=100 |
It will count from every time the signal was true, so there may be overlaps if the signals occurred within 100 days of each other. As such, it will extend 100 bars from the last signal:
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. |