date show bar

I’m trying to write a script to show a specific date on a chart. I’ve been using bardate function with no luck. Can you help?

Thanks Peter

Hi Peter,

This is how i would mark a specific date on the chart using scripting:

V1 = STRDATE(DATE=2020-02-13) ;
BARDATE() == V1

Green arrow shows the bar that passes the script criteria (in this case the 13th of Feb 2020).

Ex4

Is it possible to add multiple dates by using and function.

Hi,

You wouldn’t use the AND operator, you’d have to use the OR operator to mark multiple dates. For example…

V1 = STRDATE(DATE=2020-02-13) ;
V2 = STRDATE(DATE=2020-02-27) ;
BARDATE() == V1 or BARDATE() == V2

Hi,

is it possible to continue them into the future on the chart? with arrow or vertical lines … I mean specific dates.

Thanks

Hi,

Not currently, scripts will stop at the last bar (unless they are referencing Astro based functions). You can manually place a vertical line on a chart and adjust the date in the tools properties to a future date, to place a line past the last bar.

Hi,

and e.g. can I get back the info to a variable which was my last used date? Maybe I could use this.

(If I have a list of dates from past and futures and its is changig which is the last actual date.)

Thanks

Edith

Hi,

is there a way to “attach” a text note in the script and this text note as well as the arrow is shown on the bar that passes the script criteria?

Thanks

Thomas

Hi,

Since v1.5 of Optuma was released the Show Bar tool allows for a number of different display styles, including a Text label. Please refer to the Optuma v1.5 Update section on the following article for more information:

https://help.optuma.com/kb/faq.php?id=719