Reply To: Exclude a signal over a date range

Optuma Forums Optuma Scripting Exclude a signal over a date range Reply To: Exclude a signal over a date range

#41935
Darren
  • Topics: 66
  • Replies: 682
  • Posts: 748

Hi Dean,

For entire years you can use the YEARNUM() function, so in your example you could use the following:

V1 = LOW() < BB(DEFAULT=LowerLine, BARS=20);
V1 and (YEARNUM() < 2015 or YEARNUM() > 2016)

For specific dates you can use the BARDATE() function, but you would need to know the value which we specify for each date. The best way to see this value for each bar is to add a custom label to your tool tip label – see video here:

How to Add Custom Tooltip Labels

The function to add to the label is simply BARDATE(), and then when you mouse over each bar it will give you the value, eg June 27th 2016 was 42,548:

 

Capture

 

This can then be used in a formula as per this example to exclude results between that date and February 7th 2017 (42,773):

V1 = LOW() < BB(DEFAULT=LowerLine, BARS=20);
V1 and (BARDATE() < 42548 or BARDATE() > 42773)

 

 

Pin It on Pinterest