Click here to Login





How to filter stocks in a market composite

Updated on 2012-02-25 03:26:37

Share |

If you have not yet created a composite, please read the following how-to article for instructions on how to create one:
How to create a composite index/indicator

Example:

Let us image a trader who wants to calculate the number of stocks trading above the moving average.
This trader wants also a composite based only on stocks whose volume is higher than 100,000 shares.


Solution:

In the "Formula" editor of the "Create Composite" form, we can use the "filter" variable.
Its role is to prevent the composite from using stocks or securities on bars where the filter value is FALSE (or equal to 0).

Formula:
composite = close > sma(30);
filter = volume > 100000;

The "filter" variable is calculated for each bar. This means that a Stock "Y" can be used in the composite in a particular bar/date; and then dismissed the next bar if its volume decreases below 100,000.
The number of stocks used by the composite or index will vary each day depending on the volume criterion.

Of course, you can use any indicator or combination of indicators to implement your filter variable.










no reviews (Log in)







Other how-to articles




How to get fundamental data for U.S. Stocks





How to plot put/call ratio of individual stocks





How to download earnings calendar data for various stocks





How to get stocks for a particular index using the global script





How to create a composite index/indicator





How to download EOD quotes for active and valid stocks only





How to quickly download the most recent EOD data for your stocks





How to display the number of stocks per day for different RSI groups





How to download and use U.S. stocks earnings data







QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright 2017 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



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.