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 |

Donchian channels Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
msbrown
Posted : Wednesday, February 20, 2008 10:06:18 PM
Registered User
Joined: 3/21/2005
Posts: 1
How can I put Donchian channels on my price chart?
diceman
Posted : Wednesday, February 20, 2008 10:31:10 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
If you are talking about MaxHigh and MinLow.
 
You would apply 2 custom indicators to price.
 
Top window
 
Select Plot using price scale.
---------------------------------------------
#1
 
MAXH20
 
---------------------------------------------
#2
 
MINL20
 
(these would be the highest high and lowest low
for 20 bars)
 
---------------------------------------------
You may be interested in this:
 
 
 
 
 
 
Thanks
diceman
scottnlena
Posted : Thursday, February 21, 2008 9:20:46 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
Diceman is it common for the two channels to get reversed?  where max H is below Min Low?
Bruce_L
Posted : Thursday, February 21, 2008 9:25:54 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
No, that should not occur at all. I suspect you do not have Plot using price scale checked for your Custom Indicators.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Thursday, February 21, 2008 10:27:29 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
Ahh ... much better thanks.
Bruce_L
Posted : Thursday, February 21, 2008 10:42:27 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Thursday, February 21, 2008 11:48:15 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
What sor of PCF or sort would be required to pull up the "Entry" candidates for these chanels.  I'm a litle uncertain if it's suposed to be when the upper chanel "turns up" or a close above the line .. but how would I scan for either condition?
diceman
Posted : Friday, February 22, 2008 12:00:06 AM
Registered User
Joined: 1/28/2005
Posts: 6,049
Try:


C>MAXH20.1


C<MINL20.1



Thanks
diceman
scottnlena
Posted : Saturday, February 23, 2008 8:06:02 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Those worked beautifully.

I ahd another idea.. could I get a pcf for price trading with in a percentage of its upper or lower Chanel as above?  Perhaps I'd need the range to be giving me lows or highs corespondingly  with in the percentage...for some number of days.

could I be any mroe vague?
diceman
Posted : Saturday, February 23, 2008 8:45:16 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
Where price is in relation to a channel is the
stochastic indicator.
 
When the Stoc is 50. It is halfway between the
upper and lower range it has reached in the time
period. (50%)
 
So you could use a Stoc of 20. Click on the
indicator and sort by actual value.
 
(to match the exact results you would use no
smoothing)
 
 
Thanks
diceman
scottnlena
Posted : Wednesday, February 27, 2008 10:43:44 PM

Registered User
Joined: 4/18/2005
Posts: 4,090

is there a way to write an indicator that measures the distance between the channels over time ? 

What i'm getting at specifficaly is that these may be what i'm looking for in another favorite strategy of mine.  I look for price trading in little narrow rectangels or boxes and enter a conditional order on the price break.  if you plot a symetrical 8 period chanel around GVHR then it kinda highlights the flat top.. I got in as price crossed the Donchian channel basically.

So I want to try to use them to find these tight small consolidations

Ideas are

price min max in that range for the past few days.. then visually I can take it back further

price trading with in that range and with in a certain percent of the top or bottom chanel?  The horizontial part is important to me.  So If I can put them in a scan Then sort by a visual slope of a linear regression line attached.

Thanks.
Scott.

diceman
Posted : Wednesday, February 27, 2008 11:42:09 PM
Registered User
Joined: 1/28/2005
Posts: 6,049
You could try this:
 
 
((MAXH20-MINL20)/((H+L)*.5))*100
 
 
This is the total range divided by the mid
point of the range. (to adjust for different
price levels.)
 
This will be like the diceman. Tight during
20 day consolidations and higher during
rally's and selloffs.
 
(of course you could change the 20's to measure
different ranges)
 
I would just sort by actual value.
 
 
Thanks
diceman
 
 
scottnlena
Posted : Friday, February 29, 2008 12:05:11 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
OYIE ! ! this is some of the closest I have ever come to defining this pattern accurately.  I've also come up with a version of my own .. perhaps the two can be used in tandem or something.  Mine I think needs a bit of work.  But I think I'm getting really close..

C < MAXH20 AND C > MINL20 AND (AVGH3-AVGL3) <=(AVGH10-AVGL10) AND C < MAXH8 

They are bringing up JAVA tonight and they worked like a charm on JAVA during late september consolidation.

I'm officialy taking a trading vacation.. but still playing withthis strategy components since the idea is fresh.
scottnlena
Posted : Friday, February 29, 2008 12:05:52 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
Thanks very much by the way.
scottnlena
Posted : Sunday, March 2, 2008 12:40:21 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
C < MAXH20 AND C > MINL20 AND (AVGH3 - AVGL3) <= (AVGH10 - AVGL10) AND C < MAXH8  

What could I do to make shure that we are dealing with a low range horizontal consolidation of short term to the above formula.. it often triggers where i want it and all kinds of other places.
diceman
Posted : Sunday, March 2, 2008 8:14:15 AM
Registered User
Joined: 1/28/2005
Posts: 6,049
Have you seen this?:
 
 
 
 
 
 
 
 
Thanks
diceman
 
bustermu
Posted : Sunday, March 2, 2008 11:51:41 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (scottnlena)
C < MAXH20 AND C > MINL20 AND (AVGH3-AVGL3) <=(AVGH10-AVGL10) AND C < MAXH8


Scott,

I would appreciate you describing what you intended the first two factors:

C < MAXH20 AND C > MINL20

to accomplish.

The reason I ask is that you may have intended that the Close not be outside the Donchian ChanneI.  If this is the case, Then the first portion of your PCF should be replaced by:

C <= MAXH20.1 AND C >= MINL20.1

A similar argument would cause the final factor in your PCF:
 
C < MAXH8

to become:

C <= MAXH8.1

With these modifications, your PCF becomes:

C <= MAXH20.1 AND C >= MINL20.1 AND (AVGH3-AVGL3) <= (AVGH10-AVGL10) AND C <= MAXH8.1

or, equivalently:

C >= MINL20.1 AND (AVGH3-AVGL3) <= (AVGH10-AVGL10) AND C <= MAXH8.1

Thanks,
Jim Murphy
scottnlena
Posted : Sunday, March 2, 2008 4:37:52 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
ESA from 2/14 -2/28 is a good example of what i'm trying to catch....thanks Jim Murphy ..well spotted.  it still fires off at times that I'm not intending it to.. if you plot it as a %true indicator...you'll see what i'm talking about...
Bruce_L
Posted : Monday, March 3, 2008 1:36:36 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
ESA? The symbol isn't coming up for me, so I haven't been able to see an example of what you want.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Saturday, March 8, 2008 6:09:03 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Could I ask for  

((MAXH20-MINL20)/((H+L)*.5))*100 as a Block item for strategy testing?

Thanks.
scottnlena
Posted : Saturday, March 8, 2008 6:19:07 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
maybee teh time periods could be adjustable as well.  Thanks.
Bruce_L
Posted : Monday, March 10, 2008 12:28:19 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
Please download the attached .scond file to:

\My Documents\Blocks Files\Tool Parts\Strategy Conditions

Once downloaded, you should be able to select Add Condition | My Computer when adding a Strategy Condition to access it.

You can use QuickEdit to adjust the settings or view the Block Diagrams.

Attachments:
Range to Mid Price Ratio.scond - 7 KB, downloaded 530 time(s).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Thursday, March 13, 2008 10:36:43 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Bruce thanks.

How would I express price trading for several days (4?) with in a narrow percentage of the MINL period (say 10?) as a PCF?  Take the individual ranges or could the be grouped togeather?

prime Example FFC from 12/19/07 to 12/31/07 if you plot MAXH10 and MINL10 you'll see it is creating a cluster of candles/bars very close to it's MINL10 line.
scottnlena
Posted : Friday, March 14, 2008 12:31:38 AM

Registered User
Joined: 4/18/2005
Posts: 4,090

lets start with Price with in 2% of the MINL 20.  Then maybee it won't be necessary to add in the ranges of multiple days.

Bruce_L
Posted : Friday, March 14, 2008 8:33:17 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
Please try one or more of the following:

Price within 2% of MINL20:

ABS(C / MINL20 - 1) <= .02

Entire Price Bar within 2% of MINL20:

ABS(H / MINL20 - 1) <= .02 AND ABS(L / MINL20 -1) <= .02

Part of Price Bar within 2% of MINL20:

ABS(H / MINL20 - 1) <= .02 OR ABS(L / MINL20 -1) <= .02 OR (H >= MINL20 AND MINL20 >= L)

You may wish to review the following:

PCF Formula Descriptions
How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Saturday, March 15, 2008 4:58:54 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Great. thanks .. you guys are the greatest !
Bruce_L
Posted : Monday, March 17, 2008 2:04:30 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Monday, March 24, 2008 11:12:14 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
Is it possible to write a PCF that says The MINl what ever or MAXH whatever is unchanged for X period of time?
Bruce_L
Posted : Tuesday, March 25, 2008 6:57:50 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
Please try adjusting one of the following to meet your needs:

MINL10 unchanged for 5-Periods:

MIN(MINL10,5) = MAX(MINL10,5)

MAXL10 unchanged for 5-Periods:

MIN(MAXH10,5) = MAX(MAXH10,5)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Tuesday, March 25, 2008 9:41:28 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (Bruce_L)
Price within 2% of MINL20:

ABS(C / MINL20 - 1) <= .02

Entire Price Bar within 2% of MINL20:

ABS(H / MINL20 - 1) <= .02 AND ABS(L / MINL20 -1) <= .02

Part of Price Bar within 2% of MINL20:

ABS(H / MINL20 - 1) <= .02 OR ABS(L / MINL20 -1) <= .02 OR (H >= MINL20 AND MINL20 >= L)


Bruce,

All of the above is correct.  It is. however, a bit of an overkill.

Let A be any strictly positive number.  Then:

Price within 2% of A:

ABS(C/A -1) <= 0.02

Entire Price Bar within 2% of A:

H/A -1 <= 0.02 AND L/A -1 >= 0.02

Part of Price Bar within 2% of A:

H/A -1 >= 0.02 AND L/A -1 <= 0.02

If A = MINL10 then L >= MINL20, and the above reduce to:

Price within 2% of MINL20:

C/MINL20 -1 <= 0.02

Entire Price Bar within 2% of MINL20:

H/MINL20 -1 <= 0.02

Part of Price Bar within 2% of MINL20:

L/MINL20 -1 <= 0.02

Do you see any errors in the above?

Thanks,
Jim Murphy
bustermu
Posted : Tuesday, March 25, 2008 9:47:01 AM
Registered User
Joined: 1/1/2005
Posts: 2,645
QUOTE (Bruce_L)
MINL10 unchanged for 5-Periods:

MIN(MINL10,5) = MAX(MINL10,5)

MAXL10 unchanged for 5-Periods:

MIN(MAXH10,5) = MAX(MAXH10,5)


Bruce,

Since my previous post is a bit critical, let me compliment you on this result.

I did it with a bunch of equalities.

Thanks,
Jim Murphy
Bruce_L
Posted : Tuesday, March 25, 2008 9:51:58 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
I do not see any errors in your optimizations.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Tuesday, March 25, 2008 10:07:17 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
Thanks guys.
Bruce_L
Posted : Tuesday, March 25, 2008 10:12:44 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Sunday, April 6, 2008 2:06:42 PM

Registered User
Joined: 4/18/2005
Posts: 4,090
QUOTE (Bruce_L)
scottnlena,

Please try one or more of the following:



Price within 2% of MINL20:



ABS(C / MINL20 - 1) <= .02



Entire Price Bar within 2% of MINL20:



ABS(H / MINL20 - 1) <= .02 AND ABS(L / MINL20 -1) <= .02



Part of Price Bar within 2% of MINL20:



ABS(H / MINL20 - 1) <= .02 OR ABS(L / MINL20 -1) <= .02 OR (H >= MINL20 AND MINL20 >= L)



You may wish to review the following:



PCF Formula Descriptions

How to create a Personal Criteria Forumula (PCF)

Handy PCF example formulas to help you learn the syntax of PCFs!


ha ha found it !  ABS(C / MINL20 - 1) <= .02  
I'm using this one obviously if I wanted the close YESTERDAY then this would become ABS(C1 / MINL20 - 1) <= .02 Correct?
Bruce_L
Posted : Monday, April 7, 2008 8:45:43 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
Yes, although if you want to compare it the Minimum Low over the 20-Periods ending yesterday instead of today, you would need to adjust the MINL20 portion as well:

ABS(C1 / MINL20.1 - 1) <= .02

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
scottnlena
Posted : Monday, April 7, 2008 9:16:39 AM

Registered User
Joined: 4/18/2005
Posts: 4,090
QUOTE (Bruce_L)
scottnlena,

Yes, although if you want to compare it the Minimum Low over the 20-Periods ending yesterday instead of today, you would need to adjust the MINL20 portion as well:



ABS(C1 / MINL20.1 - 1) <= .02


Strane that only seems to make a minor difference in the location of the flags.

Ok.. so then 
(L1 < MINL10.2 OR ABS(C1 / MINL10.1 - 1) <= .02 AND C > O)  should be the logicaly correct version of what i'm going for. which is yesterday was a new low or closed with in 2% of the MINL 10 and today was an up day in that it closed higher than it's open?

Thanks.
Bruce_L
Posted : Monday, April 7, 2008 9:19:57 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
scottnlena,
Your formula would appear to reflect your stated intent.

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