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

aroon oscillator in pcf condition Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
thallstd
Posted : Wednesday, January 23, 2013 12:07:55 AM
Registered User
Joined: 1/6/2013
Posts: 31

I want to create a condition that returns TRUE when a 5 period aroon oscillator value is either 40, 60 or 80.

I looked at the formulas in http://forums.worden.com/default.aspx?g=posts&t=53254 and am at a loss as to how to accomplish what I need.

I added the indicator to my watch list but would really like it as a condition.

Any help would be appreciated..

Thanks,

Ty

(if case number 9894 were implemented this would be a piece of cake...)

 

 

 

Bruce_L
Posted : Wednesday, January 23, 2013 8:57:38 AM


Worden Trainer

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

Please try the following Condition Formula:

ABS(20 * ((L1 = MINL6) * (L1 < L) + 2 * (L2 = MINL6) * (L2 < MINL2) + 3 * (L3 = MINL6) * (L3 < MINL3) + 4 * (L4 = MINL6) * (L4 < MINL4) + 5 * (L5 = MINL6) * (L5 < MINL5) - (H1 = MAXH6) * (H1 > H) - 2 * (H2 = MAXH6) * (H2 > MAXH2) - 3 * (H3 = MAXH6) * (H3 > MAXH3) - 4 * (H4 = MAXH6) * (H4 > MAXH4) - 5 * (H5 = MAXH6) * (H5 > MAXH5)) - 60) < 21



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thallstd
Posted : Wednesday, January 23, 2013 9:50:36 AM
Registered User
Joined: 1/6/2013
Posts: 31

Thanks Bruce.

Works fine except also retusn TRUE for 0.

Thanks,

Ty

Bruce_L
Posted : Wednesday, January 23, 2013 9:56:43 AM


Worden Trainer

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

Can you provide specific examples? There are currently 292 symbols in the US Common Stocks WatchList which return a value of 0 for a 5-Period Aroon Oscillator in TC2000 version 12.3 on my computer. The Condition Formula does not return true for any of them.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thallstd
Posted : Wednesday, January 23, 2013 10:04:43 AM
Registered User
Joined: 1/6/2013
Posts: 31

I know it was forex but didn't screen shot it.  Next time one pops up I'll get it and let you know.

It MAY also have been  a refresh problem but I don't think so.  Pretty sure I got all the columns clicked.

Which brings me to two other feature requests:

1) a single refresh button in the watchlist to refresh all columns

2) an optional, "additional cost" level of service to prioritize refresh.  those with this service would be at the beginning of the refresh queue (assuming there is such a thing)

Bruce_L
Posted : Wednesday, January 23, 2013 10:23:07 AM


Worden Trainer

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

The math is pretty straightforward, but long enough that I guess there could be a typo of some sort I'm not seeing (although the formula was generated in Excel instead of by hand).

I added a 5-Period Aroon Oscillator to the chart and added horizontal lines at 40 at 80 to make the visualization relatively simple. I then used the Condition Formula as a Custom PCF % True Indicator. I've looked at hundreds of symbols (including all of the Forex symbols) and haven't found a single case where the Aroon Indicator and Custom PCF % True indicator do not agree.

Thank you for your suggestion. It has been assigned case number 9952.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thallstd
Posted : Wednesday, January 23, 2013 1:18:49 PM
Registered User
Joined: 1/6/2013
Posts: 31

I ahven't had another 0 value appear in the symbols I'm watching so lets write that one off to operator error.

 

Thanks for your help,

Ty

thallstd
Posted : Wednesday, January 30, 2013 8:53:03 PM
Registered User
Joined: 1/6/2013
Posts: 31

Hi Again.

The formula you provided above works fine.  As I understand it, it uses the most recent 6 days for it's computation.  I am interested as well, not just in days 0 to 6 but, as a separate formula, days 3 to 9.

I took a stab at modifying it but have missed something.  It doesn't return TRUE when it should. Can you correct or otherwise provide the needed formula?

Thanks,

Ty

Here's what I ended up with:

 

ABS(20 * ((L4 = MINL9.3) * (L4 < L3) + 2 * (L5 = MINL9.3) * (L5 < MINL5.3) + 3 * (L6 = MINL9.3) * (L6 < MINL6.3) + 4 * (L7 = MINL9.3) * (L7 < MINL7.3) + 5 * (L8 = MINL9.3) * (L8 < MINL8.3) - (H4 = MAXH9.3) * (H4 > H3) - 2 * (H5 = MAXH9.3) * (H5 > MAXH5.3) - 3 * (H6 = MAXH9.3) * (H6 > MAXH6.3) - 4 * (H7 = MAXH9.3) * (H7 > MAXH7.3) - 5 * (H8 = MAXH9.3) * (H8 > MAXH8.3)) - 60) < 21
 
Bruce_L
Posted : Thursday, January 31, 2013 9:21:22 AM


Worden Trainer

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

Please try the following instead (I'm editing this by hand, so fingers crossed):

ABS(20 * ((L4 = MINL6.3) * (L4 < L3) + 2 * (L5 = MINL6.3) * (L5 < MINL2.3) + 3 * (L6 = MINL6.3) * (L6 < MINL3.3) + 4 * (L7 = MINL6.3) * (L7 < MINL4.3) + 5 * (L8 = MINL6.3) * (L8 < MINL5.3) - (H4 = MAXH6.3) * (H4 > H3) - 2 * (H5 = MAXH6.3) * (H5 > MAXH2.3) - 3 * (H6 = MAXH6.3) * (H6 > MAXH3.3) - 4 * (H7 = MAXH6.3) * (H7 > MAXH4.3) - 5 * (H8 = MAXH6.3) * (H8 > MAXH5.3)) - 60) < 21



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thallstd
Posted : Thursday, January 31, 2013 1:07:28 PM
Registered User
Joined: 1/6/2013
Posts: 31

Hi Bruce,

Thanks for the formula.  However, there's a problem somewhere.  

I created a watchlist with 3 columns - The aroons5 indicator from a chart, and two pcf conditions - the first one you provide above on Jan 23 (that returns TRUE for valus 40, 60 or 80) and the 2nd one from today that should return TRUE for values 40, 60 or 80 when computed from 3 periods ago).  All columns are based on a 15 minute time frame.  All cols are on manual refresh.  

Every 15 minutes from 10 AM to 12:45 I refreshed the cols then took a screen shot of the watchlist checking to see that the checkmarks in the 3rd column (arroon-5 from 3 pds ago) matched the checkmarks in the 2nd column (current aroons-5) from 3 periods age. So col 3 at 10:45 should have the same symbols flagged as column 2 at 10:00.

Out of 9 comparions, 4 matched, 5 didn't.  The comparisons break down as follows:

10:45 - 10:00: doesn't match

11:00 - 10:15: matches

11:15 - 10:30: doesn't match

11:30 - 10:45: matches

11:45 - 11:00: doesn't match

12:00 - 11:15: matches

12:15 - 11:30: matches

12:30 - 11:45: doesn't match

12:45 - 12:00: doesn't match
 

A screenshot of the results is here:

http://www.tyhallsted.com/Aroons3pdsAgoProblem.JPG

I looked at your formula and didn't see any inconsistencies in the changes.  You can probably duplicate these results more quickly with a 5 minute time frame.  I haven't tried that but don't see any reason why it wouldn't have similar results.

Ty

Bruce_L
Posted : Thursday, January 31, 2013 1:23:16 PM


Worden Trainer

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

At first glance, your test would appear to be a relatively good way to determine if the 3-bars ago version of the formula matches the current version of the formula. It does not actually work however because the 3-bars ago version is constructed based on completely formed price bars while the most recent price bar in the current version is still forming and will not be completely formed until the next bar starts forming.

A better way to test if the formulas match is to use both of them as Custom PCF % True Indicators. If the formulas match, then the 3-bars ago version should match the current version with the exception of being 3-bars late.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thallstd
Posted : Thursday, January 31, 2013 1:51:45 PM
Registered User
Joined: 1/6/2013
Posts: 31

I follow the part about the current version using incomplete bars and throwing off the comparison.  

I don't understand your recommended alternative though.  What is a PCF % True Indicator as opposed to a PCF Condition?

Thanks,

Ty

Bruce_L
Posted : Thursday, January 31, 2013 1:58:53 PM


Worden Trainer

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

A Custom PCF % True Indicator actually plots the results of a condition on the screen. It returns 100 when true and 0 when false. If you set the Period of the Custom PCF % True Indicator to something other than 1, then the Custom PCF % True Indicator plots a moving average of this series of 100s and 0s using the Average Type of the Custom PCF % True Indicator.

So if the Average Type is Simple, the value of the Custom PCF % True Indicator will be the percentage of the time that its Boolean Formula returned true over the number of bars specified in the Period setting.

The fact that this is visualized on the chart is what allows you to directly compare the results of the two formulas. If the bars ago version of the formula is correct, it will have exactly the same shape as the non-bars ago version of the formula but will be offset.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thallstd
Posted : Thursday, January 31, 2013 2:31:23 PM
Registered User
Joined: 1/6/2013
Posts: 31

Perfect.  Thanks.  Without your help I wouldn't be able to tap into half the power of this software.

Thanks again,

Ty

diceman
Posted : Friday, February 15, 2013 2:54:29 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

Id like a 5 period Aroon Osc. crossing zero today.

 

 

 

Thanks

 

 

Bruce_L
Posted : Friday, February 15, 2013 3:04:12 PM


Worden Trainer

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

Maybe something like the following?

SGN((L1 = MINL6) * (L1 < L) + 2 * (L2 = MINL6) * (L2 < MINL2) + 3 * (L3 = MINL6) * (L3 < MINL3) + 4 * (L4 = MINL6) * (L4 < MINL4) + 5 * (L5 = MINL6) * (L5 < MINL5) - (H1 = MAXH6) * (H1 > H) - 2 * (H2 = MAXH6) * (H2 > MAXH2) - 3 * (H3 = MAXH6) * (H3 > MAXH3) - 4 * (H4 = MAXH6) * (H4 > MAXH4) - 5 * (H5 = MAXH6) * (H5 > MAXH5)) <> SGN((L2 = MINL6.1) * (L2 < L1) + 2 * (L3 = MINL6.1) * (L3 < MINL2.1) + 3 * (L4 = MINL6.1) * (L4 < MINL3.1) + 4 * (L5 = MINL6.1) * (L5 < MINL4.1) + 5 * (L6 = MINL6.1) * (L6 < MINL5.1) - (H2 = MAXH6.1) * (H2 > H1) - 2 * (H3 = MAXH6.1) * (H3 > MAXH2.1) - 3 * (H4 = MAXH6.1) * (H4 > MAXH3.1) - 4 * (H5 = MAXH6.1) * (H5 > MAXH4.1) - 5 * (H6 = MAXH6.1) * (H6 > MAXH5.1))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
Posted : Monday, February 18, 2013 12:19:24 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

Whooops I meant crossing zero positive today.

 

That being said it doesnt look like the one suppled does whats intended.

 

 

 

 

Thanks

Bruce_L
Posted : Monday, February 18, 2013 12:35:50 PM


Worden Trainer

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

It seems to do exactly what I intended when I wrote it. It returns true under the following circumstances. The 5-Period Aroon Oscillator was below zero during previous bar and is at or above zero during the current bar. The 5-Period Aroon Oscillator was above zero during the previous bar and is at or below zero during the current bar. The 5-Period Aroon Oscillator was at zero during the previous bar and is no longer zero during the current bar.

For a Condition Formula which only returns true when the 5-Period Aroon Oscillator was at or below zero during the previous bar and is above zero during the current bar, please try the following instead:

(L1 = MINL6) * (L1 < L) + 2 * (L2 = MINL6) * (L2 < MINL2) + 3 * (L3 = MINL6) * (L3 < MINL3) + 4 * (L4 = MINL6) * (L4 < MINL4) + 5 * (L5 = MINL6) * (L5 < MINL5) - (H1 = MAXH6) * (H1 > H) - 2 * (H2 = MAXH6) * (H2 > MAXH2) - 3 * (H3 = MAXH6) * (H3 > MAXH3) - 4 * (H4 = MAXH6) * (H4 > MAXH4) - 5 * (H5 = MAXH6) * (H5 > MAXH5) > 0 AND (L2 = MINL6.1) * (L2 < L1) + 2 * (L3 = MINL6.1) * (L3 < MINL2.1) + 3 * (L4 = MINL6.1) * (L4 < MINL3.1) + 4 * (L5 = MINL6.1) * (L5 < MINL4.1) + 5 * (L6 = MINL6.1) * (L6 < MINL5.1) - (H2 = MAXH6.1) * (H2 > H1) - 2 * (H3 = MAXH6.1) * (H3 > MAXH2.1) - 3 * (H4 = MAXH6.1) * (H4 > MAXH3.1) - 4 * (H5 = MAXH6.1) * (H5 > MAXH4.1) - 5 * (H6 = MAXH6.1) * (H6 > MAXH5.1) <= 0



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
Posted : Monday, February 18, 2013 1:19:19 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

If you look at LEN for example there is a trigger on 1-24-13.

 

 

 

 

 

Thanks

Bruce_L
Posted : Monday, February 18, 2013 1:28:31 PM


Worden Trainer

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

There was an L7 in the formula in one of the instances where there should have been an L6. It has been corrected above.



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