- This topic has 0 replies, 1 voice, and was last updated 3 years ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Using BARDATE() to display when a condition last happened
Combine the BARDATE() function with a true/false condition to show when that event last occurred in a watchlist, chart header, or Chart Element. For example, the date of the highest high price:
1 2 3 4 |
SIG1 = HIGH() == HIGHESTHIGH(RANGE=All Time); BARDATE(SIG1) |
When the latest closing price was this high:
1 2 3 4 |
D1=LAST(CLOSE()); BARDATE(CLOSE()>D1) |
To count the number of days since the event use the TIMESINCESIGNAL() function:
1 2 3 4 |
D1=LAST(CLOSE()); TIMESINCESIGNAL(CLOSE()>D1, UNIT=Days) |
In this example, NXT on the ASX had its highest close since July 3rd 2018 (569 days ago).
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. |