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 |

PCFs for Stochastics cross Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Gano
Posted : Friday, November 28, 2014 4:32:28 AM
Registered User
Joined: 8/23/2012
Posts: 59
Hi, need some help to create the following PCFs:
 
PCF_1:
-Stochastics K line crosses down D line
-Cross happens above SMA21
 
PCF_2:
-Stochastics K line crosses up D line
-Cross happens above SMA21
 
Note:
-SMA21 is calculated based on Stochastics K line
-Stochastics settings: 21, 3, 3
-Cross should happen between 1 and 2 bars ago (not current bar).
 
Thanks.
Bruce_L
Posted : Friday, November 28, 2014 10:35:49 AM


Worden Trainer

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

Please try the following for PCF_1:

(AVG(STOC21.3.1,21) < STOC21.3.1 AND STOC21.3.1 < AVG(STOC21.3.1,3) AND AVG(STOC21.3.2,3) <= STOC21.3.2) OR (AVG(STOC21.3.2,21) < STOC21.3.2 AND STOC21.3.2 < AVG(STOC21.3.2,3) AND AVG(STOC21.3.3,3) <= STOC21.3.3)

And the following for PCF_2:

(AVG(STOC21.3.1,21) > STOC21.3.1 AND STOC21.3.1 > AVG(STOC21.3.1,3) AND AVG(STOC21.3.2,3) >= STOC21.3.2) OR (AVG(STOC21.3.2,21) > STOC21.3.2 AND STOC21.3.2 > AVG(STOC21.3.2,3) AND AVG(STOC21.3.3,3) >= STOC21.3.3)

Understanding Stochastics



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gano
Posted : Saturday, November 29, 2014 5:48:58 AM
Registered User
Joined: 8/23/2012
Posts: 59

Hi Bruce, I tried the PCFs but are giving strange results.

I've changed to the following,

PCF_1:

STOC21.3.2 > AVG(STOC21.3.2,3) AND STOC21.3.1 < AVG(STOC21.3.1,3) AND STOC21.3.2 > AVG(STOC21.3.2,21) 

 

PCF_2:

STOC21.3.2 < AVG(STOC21.3.2,3) AND STOC21.3.1 > AVG(STOC21.3.1,3) AND STOC21.3.2 > AVG(STOC21.3.2,21) 

Is this correct ? You were also using Bar 3 why ?

Bruce_L
Posted : Monday, December 1, 2014 11:31:52 AM


Worden Trainer

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

I was checking for the cross happening either 1 or 2 bars ago (with the 2 bars ago version needing data from 3 bars ago) because of your statement that "Cross should happen between 1 and 2 bars ago (not current bar)."

I thought about the interepretation that "between 1 and 2 bars ago" meant the cross was just a 1 bar ago version but discarded this (apparently correct) interpretation because of the "(not current bar)" section which would have needed to be more like "(not between current bar and 1 bar ago)" to have a parallel construction consistent with this interpretation.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Gano
Posted : Monday, December 1, 2014 12:30:23 PM
Registered User
Joined: 8/23/2012
Posts: 59

Ok Bruce, got your point. I will test the PCFs and let you know the results.

Bruce_L
Posted : Monday, December 1, 2014 12:57:43 PM


Worden Trainer

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

I don't see any problems with your formulas, but I have noticed a slight difference though. My formulas checked for %K to be above or below the SMA21 on the second of the two bars involved in the cross while your formulas appear to check for this to be true on the first of the two bars involved in the cross.



-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.