Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: vpi63
About
User Name: vpi63
Groups: Gold User, Member, Platinum User, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Tuesday, March 15, 2005
Last Visit: Friday, August 11, 2017 10:00:01 AM
Number of Posts: 33
[0.01% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: How can I sort using 2 criteria
Posted: Wednesday, January 8, 2014 7:20:08 PM

E.g., Williams % crossing up from 20 AND SMA>20

 

TIA for any help.

Topic: Help with Creating Multiple Filters
Posted: Saturday, April 17, 2010 12:35:44 AM
Bruce,

Nevermind, I got it!

You are the man!!

Thanks and and take care,

VPI63
Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 11:46:48 PM
Bruce,

I tried your code by copying and pasting it in a real code rule and right clicked as directed.

I my stock universe was US Stocks.

Unfortunately I did not get a graph of either the raw data or the %>than X.

For my purposes, I used a 10% gain or higher, a look back of 10 days and a price <=10.

Although, I don't have the same universe in TC2000 (I have a universe of US stocks + ETFs), the number that I get for this scan in TC2000 for Friday, April 16, 2010, is 78.

So something is not right. I am not getting anything from this code.

Are you sure that the code is not filtering all stocks that do not meet a 10% gain exactly?  That might explain why I am not getting a number or a graph over time.

Thanks in advance for any help.

Take care,

VPI63

Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 5:12:47 PM
Bruce,

I think I have it.

Thanks so much for yoiur help.

Take care,

VPI63

Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 4:35:44 PM
Bruce,

Thanks once again for your prompt response.

So I think I am on track, sorta of. :)

How is this 2nd expression:

" Price.Last / Price.Last(Period) >= 1 + MinPercRise / 100"

picking up stocks that have risen greater than 10%?

Thanks once again for your patience.

Take care,

VPI63
Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 4:10:52 PM
Bruce,

Thanks one again for your prompt response and your patience.

I guess Friday is one of my dense days.

If I may reiterate my last question.

Why wouldn't :

"Price.Last / Price.Last(Period) >= 1" satisfy the criteria:

2)      Stock price must have risen at least Y% over the last Z trading days

if the % increase is 10%?

Thanks again for your help.

Take care,

VPI63


Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 3:48:03 PM
Bruce,

Thanks once again for a prompt response.

The following explanation of your code is confusing to me :

"In the case where MinPercRise = 10, then 1 + MinPercRise / 100 = 1.1 and Price.Last / Price.Last(Period) needs to be greater than or equal to 1.1 for the expression to be True."

If  "Price.Last / Price.Last(Period) >= 1" were tue, that is evauates to 1.1 or higher, why
would you need the 2nd expression :

"1 + MinPercRise / 100 " to satisfy the criteria:

2)      Stock price must have risen at least Y% over the last Z trading days

It seems to me like that:

"Price.Last / Price.Last(Period) >= 1"

says that,  if true, (1.1 or greater) the price today is 10% or greater than 90 days ago, which is what (2) above requires.


What is the value added of the 2nd piece of code:

"1 + MinPercRise / 100 "  ?

Obviously, I am missing something.

Thanks again for your help,

Take care,

VPI63
Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 1:17:45 PM
Bruce,

Thanks for your prompt response.

I'm not at my PC, so I'll have to  wait until I get home to try this out.

In the meantime, please let me know if I have the interpretation of your code correct.

For this piece:

Price.Last / Price.Last(Period) >= 1 ?

It looks like that this code divides the last price by the price 90 days ago and sets it to GTE to 1.

So this ensures that the price is higher than 90 days ago.

So if ture, then:

MinPercRise / 100

sets the other criteria to ensure that the price is 10% or higher than 90 days ago, and both act as a logical AND?

{It looks like the code is evaluating "1(or greater)+10%" to me. Should "# MinPercRise = UserInput.Single = 10 " be "# MinPercRise = UserInput.Single >= 10" instead?}.

If both are true, then the code satisfies this condition:

2)      Stock price must have risen at least Y% over the last Z trading days

and the code counts the number that pass all criteria for a given day.

Is this correct?

If so, how do I get it to plot this raw # over time? Does it do so just by creating the indicator?

Finally, I'm not sure how I create the all stocks minus the ETFs universe of securies using the

"Custom Index for the US Common Stocks WatchList".

One last question, I see that this was created with version 5.0, and I have the latest version of 4.0, so is this code good to go with my version?

I'm sure if I was at my PC, I probably could answer most of this myself, but I won't be home to much later tonight, and with the weekend upon us, I'm not sure that I could get an aswer so quickly.

Again I thank you for time. 

Take care,

VPI63
Topic: Help with Creating Multiple Filters
Posted: Friday, April 16, 2010 11:22:06 AM

I am trying to put together a scan of a universe of securities that consists of all stocks less ETFs that filters by the following criteria:

 

  1. 1)      Stock price must be less or equal to $X

  1. 2)      Stock price must have risen at least Y% over the last Z trading days

  1. 3)      I want to be able to plot the raw output of this filter over time

  1. 4)      I want to be able to normalize the raw output of this filter by dividing the raw output number by the number of stocks in the universe, which consist of my original scan (universe of securities that consists of all stocks less ETFs), and plot this as a  % over time.

 

Any help with putting this procedure and/or code together will be most appreciated.

 

Thanks and take care,

 

VPI63

Topic: Scan for Price and TSV divergence either in blocks and/or TC2000
Posted: Sunday, May 4, 2008 9:24:29 PM

Your notes were more than helful.

Thanks so much.

I diid have a problemn with the time it took to sort for the best performing stocks in the best performing industries.

Seems like the coding for this needs to be optimized.

Thanks again,

Walker