BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Ex-Dividend date?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Ex-Dividend date?

 Post Reply Post Reply
Author
Message / View First Unread Post
kneighbour View Drop Down
Regular
Regular
Avatar

Joined: 12 Feb 2005
Location: Australia
Posts: 57
Post Options Post Options   Quote kneighbour Quote  Post ReplyReply Direct Link To This Post Topic: Ex-Dividend 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?

 

Back to Top
Peter View Drop Down
BullCharts Staff
BullCharts Staff
Avatar

Joined: 09 Sep 2004
Location: Australia
Posts: 241
Post Options Post Options   Quote Peter Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
kneighbour View Drop Down
Regular
Regular
Avatar

Joined: 12 Feb 2005
Location: Australia
Posts: 57
Post Options Post Options   Quote kneighbour Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Peter View Drop Down
BullCharts Staff
BullCharts Staff
Avatar

Joined: 09 Sep 2004
Location: Australia
Posts: 241
Post Options Post Options   Quote Peter Quote  Post ReplyReply Direct Link To This Post 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);

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz