Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF syntax for MIN ATR14 for the last 5 days. Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Hayniet4
Posted : Saturday, February 18, 2017 9:47:57 AM
Registered User
Joined: 4/19/2016
Posts: 41

Hi,

I'm trying to create a condition that requires the 14 period ATR to be above the 14 period ATR of the last 5 days.  I'm struggling with this syntax and not finding the files that explain this directly.  

(atr14>MINLatr14)

 

Thanks,

 

Bruce_L
Posted : Saturday, February 18, 2017 1:57:56 PM


Worden Trainer

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

The 14 period average true range being above its lowest value for the previous five bars can be written as follows in TC2000 v17.

ATR14 > MIN(ATR14.1, 5)

The 14 period average true range being below its lowest value for the previous five bars can be written as follows in TC2000 v17.

ATR14 < MIN(ATR14.1, 5)

The 14 period average true range being above its highest value for the previous five bars can be written as follows in TC2000 v17.

ATR14 > MAX(ATR14.1, 5)

The 14 period average true range being below its highest value for the previous five bars can be written as follows in TC2000 v17.

ATR14 < MAX(ATR14.1, 5)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Hayniet4
Posted : Saturday, February 18, 2017 9:03:35 PM
Registered User
Joined: 4/19/2016
Posts: 41

Thanks so much!

Hayniet4
Posted : Saturday, February 18, 2017 9:14:48 PM
Registered User
Joined: 4/19/2016
Posts: 41

Why does this happen?

BWA with Donchian Channels 10 period plotted with no offset.  Custom Boolean indicator 

(L1=MINL10 and c>o) OR (L=MINL10 and C>O) plotted.

I'm getting a spike on 12/20.  Why is that?  its the 2nd false spike i've seen.  12/19 isn't the lowest low of the last 10 bars.  

What am I missing?

Hayniet4
Posted : Sunday, February 19, 2017 8:35:06 AM
Registered User
Joined: 4/19/2016
Posts: 41

How would I do that for MACD?

(XAVGC12 - XAVGC26)>min(XAVGC12.1,5 - XAVGC26.1,5) gives an error.

 

diceman
Posted : Sunday, February 19, 2017 10:35:23 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

QUOTE (Hayniet4)

Why does this happen?

BWA with Donchian Channels 10 period plotted with no offset.  Custom Boolean indicator 

(L1=MINL10 and c>o) OR (L=MINL10 and C>O) plotted.

I'm getting a spike on 12/20.  Why is that?  its the 2nd false spike i've seen.  12/19 isn't the lowest low of the last 10 bars.  

What am I missing?

 

L1 does equal todays 10 day low.

Maybe you wanted L1 vs yesterdays 10 day low?

 

 

Like this:

(L1=MINL10.1 AND C>O) OR (L=MINL10 AND C>O)

 

 

Thanks

 

 

Bruce_L
Posted : Tuesday, February 21, 2017 11:50:23 AM


Worden Trainer

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

As diceman pointed out, the 12/20 daily bar does in fact meet the requirements of your formula.

If you want to check if either the current or previous bar touched the bottom Donchian Channel with the close above the open then this could be written as follows in TC2000 v17.

CountTrue(L = MINL10 AND C > O, 2) > 0

Or as follows in earlier versions of TC2000.

(L1 = MINL10.1 AND C1 > O1) OR (L = MINL10 AND C > O)

There should only be one ,5 in the MACD formula.

XAVGC12 - XAVGC26 > MIN(XAVGC12.1 - XAVGC26.1, 5)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Hayniet4
Posted : Sunday, March 5, 2017 12:19:24 PM
Registered User
Joined: 4/19/2016
Posts: 41

Thanks guys.  I see it above and the formula is working.  

I want to make that formula for Stochastics (worden preferably) and RSI.

Bruce_L
Posted : Monday, March 6, 2017 10:10:52 AM


Worden Trainer

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

The current worden stochastic 12, 3 %K being above its minimum value over the previous 5 bars can be written as follows in TC2000 v17.

WSTOC12.3 > MIN(WSTOC12.3.1, 5)

The current Wilder's RSI 14 being above its minimum value over the previous 5 bars can be written as follows in TC2000 v17.

WRSI14 > MIN(WRSI14.1, 5)



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