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 |

Stoch indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jackmanjls
Posted : Thursday, January 10, 2013 7:41:48 PM
Registered User
Joined: 9/28/2009
Posts: 135

Using the stoch 10 %K 3, E xp %D 5 I want to create a condition that is true when the following is met.

if today's %K > today's %D AND

    if  at least 1 of the bars for the previous 4 days has the %K < %D AND

        if  at lease 1 of the bars for the same 4 days the %K and %D has been < 30  then

            the condition if true.

Any ideas?

jackmanjls
Posted : Friday, January 11, 2013 5:39:56 AM
Registered User
Joined: 9/28/2009
Posts: 135

Re: TC12.3.

After viewing the help vids I've determined how to do: "if today's %K > today's %D AND"

I still haven't figured out the balance of my q, ie,

if  at least 1 of the bars for the previous 4 days has the %K < %D AND

        if  at lease 1 of the bars for the same 4 days the %K and %D has been < 30  then

            the condition if true.

At this point I think the issue is how do I look back at the 4 previous bars. Once I get that resolved I can complete the scan.

 

Bruce_L
Posted : Friday, January 11, 2013 8:06:37 AM


Worden Trainer

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

Please try the following Indicator Formula (it assumes the %K and %D are both Exponential since the only specification given was Exp):

XAVG(STOC10,3) > XAVG(STOC10,5) AND (XAVG(STOC10.1.1,3) < XAVG(STOC10.1.1,5) OR XAVG(STOC10.1.2,3) < XAVG(STOC10.1.2,5) OR XAVG(STOC10.1.3,3) < XAVG(STOC10.1.3,5) OR XAVG(STOC10.1.4,3) < XAVG(STOC10.1.4,5)) AND ((2 * XAVG(STOC10.1.1,5) - XAVG(STOC10.1.1,3) < 30 AND XAVG(STOC10.1.1,3) < 30) OR (2 * XAVG(STOC10.1.2,5) - XAVG(STOC10.1.2,3) < 30 AND XAVG(STOC10.1.2,3) < 30) OR (2 * XAVG(STOC10.1.3,5) - XAVG(STOC10.1.3,3) < 30 AND XAVG(STOC10.1.3,3) < 30) OR (2 * XAVG(STOC10.1.4,5) - XAVG(STOC10.1.4,3) < 30 AND XAVG(STOC10.1.4,3) < 30))

Understanding Stochastics



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jackmanjls
Posted : Friday, January 11, 2013 8:18:13 AM
Registered User
Joined: 9/28/2009
Posts: 135

Bruce can you verify that this is good approach or is there a better approach?

The code is as follows:

if  at least 1 of the bars for the previous 4 days has the %K < %D AND

stoc10.3.1 < xavg(stoc10.3.1,5) or

stoc10.3.2 < xavg(stoc10.3.2,5) or

stoc10.3.3 < xavg(stoc10.3.3,5) or

stoc10.3.4 < xavg(stoc10.3.4,5)

if  at lease 1 of the bars for the same 4 days the %K and %D has been < 30  then

stoc10.3.1 < 30 or xavg(stoc10.3.1,5) <30 or

stoc10.3.2 < 30 or xavg(stoc10.3.2,5) <30 or

stoc10.3.3 < 30 or xavg(stoc10.3.3,5) <30 or

stoc10.3.4 < 30 or xavg(stoc10.3.4,5) <30

I have verified that the above is valid.

Bruce_L
Posted : Friday, January 11, 2013 8:39:52 AM


Worden Trainer

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

Assuming the %K is Simple and the %D is Exponential, then your first section would appear to be correct, but the second section would seem to require four of the ORs to be change to AND as well as the addition of some parentheses to force the ANDs to be evaluated prior to the ORs:

(STOC10.3.1 < 30 AND XAVG(STOC10.3.1,5) < 30) OR (STOC10.3.2 < 30 AND XAVG(STOC10.3.2,5) < 30) OR (STOC10.3.3 < 30 AND XAVG(STOC10.3.3,5) < 30) OR (STOC10.3.4 < 30 AND XAVG(STOC10.3.4,5) < 30)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jackmanjls
Posted : Friday, January 11, 2013 6:28:02 PM
Registered User
Joined: 9/28/2009
Posts: 135

Bruce...nice catch. That explains why every so often I'm getting unexpected results.

Good job.

Bruce_L
Posted : Monday, January 14, 2013 8:44:04 AM


Worden Trainer

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

You're welcome.



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