This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
Get dividends information for US companies. The data is parsed from an RSS feed and is inserted into a database whose name is 'dividends_rss'. This database has a date and a title column. The title generally contains useful information about the dividend being paid by the company. It also usually contains the dividend amount.
This amount could be extracted using regular expressions. In Pre-Scripting you can add the formula described below to extract this dividend value. You also need to create a new numeric field in this dividend database, so that the extracted value will be associated to the newly created field.
Go to the 'database editor', select the 'dividends_rss' database then create a new numeric (double) field. Update the current downloader item, select the first URL (there is only one URL) and click on 'Settings'. In the new form, click on 'Next', create a new column, assign it to the new field then click on 'Pre-Script'. Add the following formula inside the loop, then assign the variable 'dividendValue' to 'Content.Rows[i].Data[index] ' where index is the column index of the newly created field.
var match : System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(Content.Rows[i].Data[1], '[$]([0-9|.])+');
var dividendValue : String = match.Value.ToString().Replace('$', '');
Example of dividends comments:
28/07/2009 11:42 - Cherokee (CHKE) Maintains $0.50 Qtr. Distribution, Yielding 10.29%
28/07/2009 11:42 - Wyndham Worldwide (WYN) Approves Qtr. Dividend of $0.04, Yielding 1.27%
If you had applied the regular expression formula, the extract dividend values would be: 0.50 for the first row and 0.04 for the second one.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.