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 |

Combining formulas in PCFs Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
grimmer01
Posted : Monday, March 19, 2012 3:10:41 PM
Registered User
Joined: 2/24/2005
Posts: 58

Hello Trainers, quick question for you all:

I wrote a PCF with the following and then made it an Indicator on my 5 minute chart and it works great!

MaxC5 > XAVGC8 and
MaxC5 = MaxC48 and
MaxC5 > AVGC200 and
MaxC5 >= MinC24*1.015 and
(MaxC5+0.05) >= Maxh4 and
AVGC20 > AVGC50 and
(C1 < O1 or C2 < O2 or C3 < O3) and
C < MaxC5 and
C >= XAVGC8 and
O <= XAVGC8*1.005 and
((MaxO3/MinC3)-1 > 0.004)
 
 
I then wrote this PCF and then made it an indicator on my 5 minute chart in it works great too:
 
(((C / (O'03/19/12'))-1)*100) > 2.5
 
 
However, when i try to combine these two PCF's into 1 (see below), I keep getting an error.  I can't understand why they work sepearetely but not together...
 
MaxC5 > XAVGC8 and
MaxC5 = MaxC48 and
MaxC5 > AVGC200 and
MaxC5 >= MinC24*1.015 and
(MaxC5+0.05) >= Maxh4 and
AVGC20 > AVGC50 and
(C1 < O1 or C2 < O2 or C3 < O3) and
C < MaxC5 and
C >= XAVGC8 and
O <= XAVGC8*1.005 and
((MaxO3/MinC3)-1 > 0.004) and
(((C / (O'03/19/12'))-1)*100) > 2.5
 
 
any help would be greatly appreciated.
 
thx.
 
 
Will Grimmer
 
 
 
Bruce_L
Posted : Monday, March 19, 2012 3:22:41 PM


Worden Trainer

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

I don't know what is wrong. I get an errror when I copy and paste your formula. But if I reformat it slightly, it seems to work:

MAXC5 > XAVGC8 AND MAXC5 = MAXC48 AND MAXC5 > AVGC200 AND MAXC5 >= MINC24 * 1.015 AND MAXC5 + .05 >= MAXH4 AND AVGC20 > AVGC50 AND (C1 < O1 OR C2 < O2 OR C3 < O3) AND C < MAXC5 AND C >= XAVGC8 AND O <= XAVGC8 * 1.005 AND MAXO3 / MINC3 - 1 > .004 AND (C / O'03/19/12' - 1) * 100 > 2.5



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
grimmer01
Posted : Monday, March 19, 2012 3:48:01 PM
Registered User
Joined: 2/24/2005
Posts: 58

Thx Bruce.

That Worked.  Weird though.

Bruce_L
Posted : Monday, March 19, 2012 3:50:51 PM


Worden Trainer

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

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
grimmer01
Posted : Monday, March 19, 2012 5:40:45 PM
Registered User
Joined: 2/24/2005
Posts: 58

Hi Bruce, another question for you.

If I were to take the revised PCF you gave me and I wanted the Scan to pass for stocks 1 bar ago, would this be the correct PCF:

MAXC5.1 > XAVGC8.1 AND
MAXC5.1 = MAXC48.1 AND
MAXC5.1 > AVGC200.1 AND
MAXC5.1 >= MINC24.1 * 1.015 AND
MAXC5.1 + .05 >= MAXH4.1 AND
AVGC20.1 > AVGC50.1 AND
(C1.1 < O1.1 OR C2.1 < O2.1 OR C3.1 < O3.1) AND
C.1 < MAXC5.1 AND
C.1 >= XAVGC8.1 AND
O.1 <= XAVGC8.1 * 1.005 AND
MAXO3.1 / MINC3.1 - 1 > .004 AND
(C.1 / O'03/19/12' - 1) * 100 > 2.5
 
Since I want to keep the O'03/19.12' the same price throughout the day when i run the scan, I'm assuming I can leave it alone. 
 
thx Bruce.
 
 
Will
Bruce_L
Posted : Tuesday, March 20, 2012 9:18:13 AM


Worden Trainer

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

Not quite. Some sections require adding .1 to the end and some sections require adding 1 to the already existing bars ago parameter. In addition, the correct syntax for C.1 would be C1 as the bars ago parameter is the first parameter. So the formula would be:

MAXC5.1 > XAVGC8.1 AND MAXC5.1 = MAXC48.1 AND MAXC5.1 > AVGC200.1 AND MAXC5.1 >= MINC24.1 * 1.015 AND MAXC5.1 + .05 >= MAXH4.1 AND AVGC20.1 > AVGC50.1 AND (C2 < O2 OR C3 < O3 OR C4 < O4) AND C1 < MAXC5.1 AND C1 >= XAVGC8.1 AND O1 <= XAVGC8.1 * 1.005 AND MAXO3.1 / MINC3.1 - 1 > .004 AND (C1 / O'03/19/12' - 1) * 100 > 2.5

PCF Formula Descriptions



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
grimmer01
Posted : Thursday, March 22, 2012 10:51:12 AM
Registered User
Joined: 2/24/2005
Posts: 58

thanks Bruce!

jas0501
Posted : Thursday, March 22, 2012 11:05:45 AM
Registered User
Joined: 12/31/2005
Posts: 2,499

QUOTE (Bruce_L)

Not quite. Some sections require adding .1 to the end and some sections require adding 1 to the already existing bars ago parameter. In addition, the correct syntax for C.1 would be C1 as the bars ago parameter is the first parameter. So the formula would be:

MAXC5.1 > XAVGC8.1 AND MAXC5.1 = MAXC48.1 AND MAXC5.1 > AVGC200.1 AND MAXC5.1 >= MINC24.1 * 1.015 AND MAXC5.1 + .05 >= MAXH4.1 AND AVGC20.1 > AVGC50.1 AND (C2 < O2 OR C3 < O3 OR C4 < O4) AND C1 < MAXC5.1 AND C1 >= XAVGC8.1 AND O1 <= XAVGC8.1 * 1.005 AND MAXO3.1 / MINC3.1 - 1 > .004 AND (C.1 / O'03/19/12' - 1) * 100 > 2.5

PCF Formula Descriptions

C1

instead

jas0501
Posted : Thursday, March 22, 2012 11:07:56 AM
Registered User
Joined: 12/31/2005
Posts: 2,499

Oops. Hightlghted the quote but it doesn't display correctly when posted. C.1 should bhe C1

 

MAXC5.1 > XAVGC8.1 AND MAXC5.1 = MAXC48.1 AND MAXC5.1 > AVGC200.1 AND MAXC5.1 >= MINC24.1 * 1.015 AND MAXC5.1 + .05 >= MAXH4.1 AND AVGC20.1 > AVGC50.1 AND (C2 < O2 OR C3 < O3 OR C4 < O4) AND C1 < MAXC5.1 AND C1 >= XAVGC8.1 AND O1 <= XAVGC8.1 * 1.005 AND MAXO3.1 / MINC3.1 - 1 > .004 AND (C.1 / O'03/19/12' - 1) * 100 > 2.5

jas0501
Posted : Thursday, March 22, 2012 11:09:10 AM
Registered User
Joined: 12/31/2005
Posts: 2,499

So why doesn't font color change and fill display when posted?

jas0501
Posted : Thursday, March 22, 2012 11:10:21 AM
Registered User
Joined: 12/31/2005
Posts: 2,499

QUOTE (jas0501)

Oops. Hightlghted the quote but it doesn't display correctly when posted. C.1 should bhe C1

 

MAXC5.1 > XAVGC8.1 AND MAXC5.1 = MAXC48.1 AND MAXC5.1 > AVGC200.1 AND MAXC5.1 >= MINC24.1 * 1.015 AND MAXC5.1 + .05 >= MAXH4.1 AND AVGC20.1 > AVGC50.1 AND (C2 < O2 OR C3 < O3 OR C4 < O4) AND C1 < MAXC5.1 AND C1 >= XAVGC8.1 AND O1 <= XAVGC8.1 * 1.005 AND MAXO3.1 / MINC3.1 - 1 > .004 AND (C.1 / O'03/19/12' - 1) * 100 > 2.5

jas0501
Posted : Thursday, March 22, 2012 11:16:24 AM
Registered User
Joined: 12/31/2005
Posts: 2,499

This demos that I did format and it doesn't display:

 

grimmer01
Posted : Thursday, March 22, 2012 12:03:57 PM
Registered User
Joined: 2/24/2005
Posts: 58

thanks Jas!

 

Will

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.