Click here to Login




How to detect stocks trading near all time highs

Updated on 2012-04-28





Stocks that hit new all-time highs are very interesting for several reasons. These stocks are trending up by definition and they have no overhead resistance, which means that investors owning these stocks are making profits.

All-time highs can be detected using the "hhv" function (highest value over a specified period). In this case, the period is infinite and we just need to pass a very high period value.

Stocks trading at all time highs:

a = hhv(close, 1000000);

In the above function, the highest value is calculated based on the stock price time-series ("close" variable).
This function returns the all-time highs level for each trading day.

Screener:

a = hhv(close, 1000000);
filter = (close == a);

Chart:

- Right click on a chart, select "Edit Formula" then type the following formula:

a = hhv(close, 1000000);
plot(a, "Stocks trading At All Time Highs");





Stocks trading NEAR all time highs:

a = hhv(close, 100000);
b = ((a / close) - 1) * 100;


The variable "b" returns the distance, in percentage, between the stock's price and the all time high level. A value of zero indicates that the analyzed stock hits a new all time high.




Screener:

a = hhv(close, 100000);
b = ((a / close) - 1) * 100;
filter = b < 1; // Near all time highs


To detect stocks trading at all time lows simply replace the "hhv" function by "llv" (lowest value over a period).








one comment (Log in)

Back







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 © 2024 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.