Print Page | Close Window

Ex-Dividend date?

Printed From: BullCharts Forum
Category: BullCharts
Forum Name: BullScript
Forum Discription: Technical discussion related specifically to the BullScript programming language.
URL: http://www.bullcharts.com.au/forum/forum_posts.asp?TID=132
Printed Date: 20 May 2024 at 10:00am
Software Version: Web Wiz Forums 9.69 - http://www.webwizforums.com


Topic: Ex-Dividend date?
Posted By: kneighbour
Subject: Ex-Dividend date?
Date Posted: 14 Feb 2005 at 7:15pm

I would like to display a vertical line on the chart for the Ex dividend date for all securiteis.

I tried this

[target=Price]
security.ExDate

While this compiles - when I try to add this as an indicator, it comes up with an error message. No doubt I am doing it wrong. I suspect that I am mixing two scales - price and time, and that this method is not possible.

Any ideas how i can do this?

 




Replies:
Posted By: Peter
Date Posted: 15 Feb 2005 at 9:52am
You can achieve this with:

[target=Price; name=ExDate]
[
linestyle=marker; marker=type1]
security.ExDate<=now and
  not hist(security.ExDate<=now,1);


A few notes:
  1. The next version of BullCharts will have a linestyle=verticalmarker
  2. The formula you had wasn't working because you were returning a date instead of a true/false (boolean).
  3. The above formula could also have been written as just security.ExDate=Now, except the above handles the situation where there is no bar on the ExDate for some reason.
  4. Unfortunately you will only see the marker if it has already passed. This is because BullScript, like most charting packages, only calculates on bars that have price data.


Posted By: kneighbour
Date Posted: 15 Feb 2005 at 6:26pm

That is excellent. The verticalmarker linestyle will be better, but that suits me just fine for now.

Thanks.



Posted By: Peter
Date Posted: 17 Feb 2005 at 3:29pm
You might find this helpful as well. It'll display the date of the ExDate at the end of the chart.

[target=Price]
[linestyle=text]
[textalign=Above,Right]
"Ex:" + DayOfMonth(Security.ExDate) + "/" + Month(Security.ExDate) + "/" + Year(Security.ExDate);
if(barnumber=lastvalue(barnumber),hhv(H,5),undefined);




Print Page | Close Window

Bulletin Board Software by Web Wiz Forums® version 9.69 - http://www.webwizforums.com
Copyright ©2001-2010 Web Wiz - http://www.webwiz.co.uk