StockFetcher Forums · General Discussion · Script for "angle" search<< >>Post Follow-up
glgene
534 posts
msg #96768
Ignore glgene
10/5/2010 11:34:03 PM

Is there a way to build a script that would do the following:

1) Find stocks whose % increase has increased greater than at a rate of 45 degee angle over the past 1 month

.........1a) Stocks must have increased in at least 5 of the past 10 days

.....................1b) Sort, descending, on stocks with the greatest angle incline.

stocktrader
293 posts
msg #96771
Ignore stocktrader
10/6/2010 12:24:32 AM

Posted this 3 years ago:


Slope Angle in Degrees


Get you started.

glgene
534 posts
msg #96774
Ignore glgene
10/6/2010 1:01:26 AM

Thanks, Stocktrader, for your prompt reply.

I tried to replace the 2s in your script with 10s, and got 0 finds. Your initial script was for a 2-day angle. I tried for a 10-day angle, and got zilch.

Did I do something wrong? Do any of the other lines need changed, to compensate from going to 10 days from 2?



stocktrader
293 posts
msg #96781
Ignore stocktrader
10/6/2010 10:52:55 AM

I think it is possible. Using trig like in this code. Just need the price today and the price 10 days ago for the hypotenuse and opposite, apply this to incremental time for adjacent.

Be sure to read all that thread. I posted 5-day and 20-day. From there you could figure it out quite easily.

Thanks.

Kevin_in_GA
4,552 posts
msg #96782
Ignore Kevin_in_GA
10/6/2010 12:54:45 PM

Not really - angle calculations like sine, cosine, and tangent (SOA,CAH, TOA) rely on the the units of measurement to be the same both both axes.

Think about it - the x axis is in days, and the y-axis is in dollars. Also, a $1 stock moving $1 in 10 days is different than a $50 stock making the same move. Therefore one would be better off simply using percent change rather than incorrectly calculating an angle based on different units of measure for each axis.

Perhaps you should use rate-of-change instead of angle? After all, that's what you really are trying to measure, and using ROC let's you directly compare stocks independent of their price.

stocktrader
293 posts
msg #96786
Ignore stocktrader
10/6/2010 10:13:41 PM

It would be helpful if you read and understood the thread(s) before posting. Thanks.

glgene
534 posts
msg #96788
Ignore glgene
10/6/2010 11:52:01 PM

Is it possible to convert ROC, as Kevin suggests, into degrees of angle? To be applied with the same measurement so one stock can be compared on the same basis with another stock?

Why do I want to consider an angle examination? Because I believe that any stock price growth in excess of a 45 degree angle cannot maintain that projectory. Example: A stock growing at 60 degree angle is going to come back down (I believe) and, thus, might be ripe for shorting. The 45 degree rule is just my belief. I have never read that to be a fact.

My question is what would be the days in length to measure the angle? 10, 30, ???

I'm not into trig, sine, cosine, etc. Sorry. Just simple SF calculations.

Thanks to Stocktrader and Kevin so far with replies. Just trying to get a handle on this.



StockFetcher Forums · General Discussion · Script for "angle" search<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus