New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
Rank by column doesn't come up
When I run this scan (with or without the brackets) it seems as if the rank by request is ignored.
[type is stock] and [country = us]
and [market cap > 12000] // ---- Todays 925 highest capitalized stocks
and [108 month ago monthly close > 124 month ago monthly close] // ---- Appreciated from top to bottom of 2007-2009 decline
rank by [108 month ago monthly close/124 month ago monthly close]
The documentation doesn't say so explicitly, but "rank by" will not correctly evaluate anything with an operator like +, -, *, / etc. (except maybe by chance). But, the syntax checker does not flag complex expressions as errors with rank by statements if they are syntactically correct.
' rank by [ [ [0 day ago close/2 day ago close]*100] -100 ]
was successful in turning the division into a percentage.
I never investigated the accuracy of the division though.
Interesting.. I just changed my rank by to
rank by [ [[108 month ago monthly close/124 month ago monthly close]*100] -100 ]
and it worked. I may try some easier data to track to check the arithmetic - but need to go now.
"It was designed to accept a single scan expression, and has been updated to accept expressions with simple—very simple—mathematical operations... it isn't designed to handle sophisticated operations like the one you created.
It will try, but our developers tell me the results can be hit or miss. ... At this point, the feature is not supposed to perform elaborate sequences (although that is clearly where we are headed with it). It's unclear if it can perform the operations as written in its current state (I think "as written" refers to my rank by that didn't work). So, it's best to limit Rank By to basic expressions and math for now."
So, it will in fact do "simple" operations. But I'm not sure how far you can stretch "simple".
It might be helpful (and I realize it may be asking too much) if you shared your rank by expression, so I (and whoever else is following this) could see something that didn't work.
And I just can't help but wonder why it would accept
' [ [[108 month ago monthly close/124 month ago monthly close]*100] -100 ] '
' [108 month ago monthly close/124 month ago monthly close] '
I'm not sure what would happen to this forum if you quit being so active. But thanks one more time.
Here's one version that didn't work:
rank by [Fast Stoch %K(251,1) * 4] + [Fast Stoch %K(63,1) * 3] + [Fast Stoch %K(21,1) * 2] + Fast Stoch %K(10,1)
This was an attempt to order a list by weighting symbols by their position in each price channel (of the length corresponding to the Fast K parameter). It was an experiment. I expected it would put better performing stocks over longer time frames on top. At the time my thought was that SCTR seemed to over-weight current performance so I wanted to see if there was another way to go about it. The result was symbols in alpha order. I haven't re-tested it.
Re your wondering, I guess that's what they mean about "hit and miss". Maybe try some superfluous brackets and multiply by 1?
Here's something I did to accomplish something similar. This doesn't rank, but I scan within the chartlist using other parameters. As simple as this is, I'm a little uncomfortable sharing it publicly.
##__ 0080a _______ LTP__ Find the Long Term Growth Stocks ____________________________
Scan text removed at the request of the user.