Custom Dates

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,

Jeff

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.

Cheers

Trevor

Hi,

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:

Ex8

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: https://help.optuma.com/kb/faq.php?id=672

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

Ex10

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: https://help.optuma.com/kb/faq.php?id=719

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:

V1 = GETDATA(CODE=ExampleDates:CSV 1) ; 
V1 > 0

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

Ex9

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.

Hii In custom dates if a day is coming when trading day is not there the results are not coming in signal tester. Is there a reason why

Also one more thing this is not working on symbol lists surprisingly. So if i use this with nifty 50 stocks with ismember the results are erroneous.

can anyone tell why its not working with ismember