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 |

pcf Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
peter3
Posted : Saturday, April 1, 2017 10:11:21 AM
Registered User
Joined: 10/20/2010
Posts: 36

I have not used worden for a long time but am signing up today. i used to use the gold package and would have a pcf that I used to scan. I guess  iwill be using the tc2000 version now but I need help with creating a pcf and scanning stcks with this. Here are the conditions.

1. Yesterday’s closing price must be above 10.
2. Average Volume for the past 20 days must be at least 100,000
shares.
3. Yesterday’s close of the stock must be down.
4. Yesterday’s close of the stock must be below it's open.
5. Range-Yesterday’s high minus its low must be at least 1.1 times
greater than its previous 10 days Average True Range
6. Yesterday’s 100-day Historical Volatility must be above 20
7. The 2-period smoothed RSI must be less than 50
8. Today's open must be at least 3% less than the previous days close.

Thanks

peter3
Posted : Saturday, April 1, 2017 12:07:01 PM
Registered User
Joined: 10/20/2010
Posts: 36

Can you also help me with a seperate PCF for #8 above that shows the price is at least 3% lower sometime that day (meaning, doesn't have to gap down 3% like above), just is down at least 3% from the previous day's close.

Bruce_L
Posted : Monday, April 3, 2017 9:32:18 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If you are using TC2000 v17 based on the open.

C1 > 10 AND AVGV21.1 >= 100000 AND C < C1 AND C < O AND H1 - L1 >= 1.1 * ATR10.2 AND 1600 * ABS((SUM(LOG(C1 / C2) ^ 2, 100) - LOG(C1 / C101) ^ 2 / 100) / 100) ^ .5 > 20 AND WRSI2 < 50 AND O <= .97 * C1

If you are using TC2000 v17 base on the low.

C1 > 10 AND AVGV21.1 >= 100000 AND C < C1 AND C < O AND H1 - L1 >= 1.1 * ATR10.2 AND 1600 * ABS((SUM(LOG(C1 / C2) ^ 2, 100) - LOG(C1 / C101) ^ 2 / 100) / 100) ^ .5 > 20 AND WRSI2 < 50 AND L <= .97 * C1

Historical Volatility and HV Ratio



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Monday, April 3, 2017 9:33:34 AM
Registered User
Joined: 10/20/2010
Posts: 36

Thnaks Bruce, can you pint me to the videos where I input the code above to scan? And where I input the code to see prior occurences where this happened for individual stocks?

Bruce_L
Posted : Monday, April 3, 2017 9:41:13 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

There really isn't much in the way of videos on creating formulas (and this was done in TC2000 v12, not TC2000 v17).

But adding a Custom PCF Indicator to the chart to plot things is pretty much the same as adding any other indicator to the chart.

Add and edit indicators on your chart - (1:49)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Monday, April 3, 2017 9:19:36 PM
Registered User
Joined: 10/20/2010
Posts: 36

Thanks Bruce, One last question, the last pcf you wrote

 

C1 > 10 AND AVGV21.1 >= 100000 AND C < C1 AND C < O AND H1 - L1 >= 1.1 * ATR10.2 AND 1600 * ABS((SUM(LOG(C1 / C2) ^ 2, 100) - LOG(C1 / C101) ^ 2 / 100) / 100) ^ .5 > 20 AND WRSI2 < 50 AND L <= .97 * C1

 

is there anyway to show this where it happened on the price bar? For example, when price is down say 3% for that bar, can it show visually on the bar - like a dot or something at that mark? so I know where it was? Price might have fallen another 5% but I want to see where that 3% mark was on the bar.

peter3
Posted : Monday, April 3, 2017 9:25:59 PM
Registered User
Joined: 10/20/2010
Posts: 36

also, how do I write a pcf where it shows that price closed lower at least 2 days in a row?

Bruce_L
Posted : Tuesday, April 4, 2017 8:53:20 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Try plotting this as a Custom PCF Indicator (not the % True version) set to use the Dot Plot Style in the same pane and scale as price.

(.97 * C1) / ABS(C1 > 10 AND AVGV21.1 >= 100000 AND C < C1 AND C < O AND H1 - L1 >= 1.1 * ATR10.2 AND 1600 * ABS((SUM(LOG(C1 / C2) ^ 2, 100) - LOG(C1 / C101) ^ 2 / 100) / 100) ^ .5 > 20 AND WRSI2 < 50 AND L <= .97 * C1)

For price closing lower 2 bars in a row.

C < C1 AND C1 < C2

Or (in TC2000 v17 only):

TrueInRow(C < C1, 2) = 2

That second may not be useful in this case, but when you are checking for lots of somthing in a row, that format can be quite useful.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Tuesday, April 4, 2017 9:24:30 AM
Registered User
Joined: 10/20/2010
Posts: 36

Thanks Bruce, one last question, if I want i to show for 5%, would I just change the 97 to 95? It didnt work and i also wanted to add that price needs to be above exponential moving average 100 but when I added C>XAVGC100 it didnt work as well.

Bruce_L
Posted : Tuesday, April 4, 2017 9:33:51 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You should just be able to change the .97 to .95. There would be one place to do this in the basic Condition Formula, but two place to change this in the Formula being used in the Custom PCF Indicator if you want to plot a dot on the chart.

What steps have you taken and what are the results when you say, "It didn't work."?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Tuesday, April 4, 2017 10:26:29 PM
Registered User
Joined: 10/20/2010
Posts: 36

Hi Bruce,

 

One more thing, I'm trying to add the formula of bars lower 2 days in a row and then plot the dot on the bar when the next day is down at least 3% so I used this...

 

Try plotting this as a Custom PCF Indicator (not the % True version) set to use the Dot Plot Style in the same pane and scale as price.

(.97 * C1) / ABS(C1 > 10 AND AVGV21.1 >= 100000 AND C < C1 AND C < O AND H1 - L1 >= 1.1 * ATR10.2 AND 1600 * ABS((SUM(LOG(C1 / C2) ^ 2, 100) - LOG(C1 / C101) ^ 2 / 100) / 100) ^ .5 > 20 AND WRSI2 < 50 AND L <= .97 * C1)

But I also added C < C1 AND C1 < C2

and it did not work.

So I just want to simplify the code a bit...

can you write the code where Ican plot the dot on the bar? All I want is the stock closes lower 2 days in a row and is above its 100 day exponential moving average and for the day is down at least 3% and Average Volume for the past 20 days must be at least 100,000

 

Thanks

Bruce_L
Posted : Wednesday, April 5, 2017 9:06:52 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Thank you for writing. The following Condition Formula should work in TC2000 v17 (but not in earlier versions of TC2000).

(.97 * C1) / ABS(L <= .97 * C1 AND TrueInRow(C < C1, 2) = 2 AND C > XAVGC100 AND AVGV20.1 >= 100000)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Wednesday, April 5, 2017 9:43:10 AM
Registered User
Joined: 10/20/2010
Posts: 36

thx Bruce, one last one, I promise :) How do i write a custom pcf true for that?

Bruce_L
Posted : Wednesday, April 5, 2017 9:58:26 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

It is the part inside the ABS() function.

L <= .97 * C1 AND TrueInRow(C < C1, 2) = 2 AND C > XAVGC100 AND AVGV20.1 >= 100000



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Thursday, April 6, 2017 9:10:56 AM
Registered User
Joined: 10/20/2010
Posts: 36

Hi Bruce, this is how you write down 2 days in a row?

TrueInRow(C < C1, 2) = 2

How do you write 3 in a row?

Bruce_L
Posted : Thursday, April 6, 2017 9:17:02 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Please try the following.

TrueInRow(C < C1, 3) = 3

The TrueInRow(C < C1, 3) portion checks for up to 3 bars in a row and will return 0, 1, 2 or 3 depending on how many bars there are in a row. It will max out at 3 however and will not return 4 even if there are 4 bars in a row.

The = 3 part checks for there being 3 bars in a row to make the formula return true or false instead of a numeric value.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
peter3
Posted : Thursday, April 6, 2017 9:30:53 AM
Registered User
Joined: 10/20/2010
Posts: 36

Bruce, thanks. So how would I write that there must be at least 3 bars in a row but max out at 5 in a  row.

Bruce_L
Posted : Thursday, April 6, 2017 9:43:22 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You could write it as follows using two TrueInRow() functions.

3 = TrueInRow(C < C1, 3) AND TrueInRow(C < C1, 6) < 6

But I would probably write it as follows (although it is a bit less intuitive).

ABS(TrueInRow(C < C1, 6) - 4) <= 1



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.