Custom Dates

Optuma Forums Optuma Scripting Custom Dates

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #65471
    • Topics: 13
    • Replies: 4
    • Posts: 17

    Hello Optuma friends,

    I would like to have an arrow or vertical line plotted on the chart on very specific dates (100+ dates). What is the best way to enter these dates so that I can apply them on several charts by just applying the one tool instead of manually entering each date on multiple charts?

    I assume this would require a showbar script but I can’t seem to find an appropriate code.

    Thanks as always,


    Trevor R
    • Topics: 124
    • Replies: 358
    • Posts: 482

    Hi Jeff,

    One simple way would be to create a Layer with all the dates you want applied as vertical lines. You can then export/import the Layer to any chart you desire. The beauty of using vertical lines is that you can have the date shown against the line. A drawback though, is that the saved Layer would need to have the Vertical Lines set to Extend Up and Extend Down, otherwise if applied to a chart a significantly different price scale without the Extend Up/Down set the lines may not be visible.



    • Topics: 5
    • Replies: 625
    • Posts: 630


    If you have 100 dates you want to mark, and want the ability to add / remove dates (without needing to reapply the lines manually), i would suggest using a CSV file.

    Setup a CSV with all the dates you wish to mark in one column, and a 1 as the second, so it looks like this:


    Once you have all dates listed in the CSV file, save it (making sure the dates are all using the same dd/mm/yyyy) format.  Once saved, import it into Optuma using the steps outlined here:

    Once imported, open the chart, setting the properties to Date, Close when prompted.


    Once open the chart will look odd, but we will have what we need to be able to plot the dates on other charts.

    To do this, open the chart you wish to see the lines on, and apply a Show Bar tool:

    Adjust the script so that it uses a GETDATA() function to reference the CSV you just imported.  Once done all you need to do is add a Boolean to look for instances where it is greater than zero.  Here is my example:

    You can then adjust the Show Bar tool to display as Arrows or Lines.


    Finally, for quick access in the future you can add the Show Bar indicator to your custom tool bar, which can then be used to add the same dates to other charts.

    If you want to add / remove any dates to the list, simple edit the CSV.  When you re-open the charts the adjustments will be applied automatically.

    2 users thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest