Registered User Joined: 3/21/2005 Posts: 1
|
How can I put Donchian channels on my price chart?
|
|
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
|
|
 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?
|
|

 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
|
|
 Registered User Joined: 4/18/2005 Posts: 4,090
|
Ahh ... much better thanks.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
scottnlena,
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
 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?
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Try:
C>MAXH20.1
C<MINL20.1
Thanks
diceman
|
|
 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?
|
|
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
|
|
 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.
|
|
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
|
|
 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.
|
|
 Registered User Joined: 4/18/2005 Posts: 4,090
|
Thanks very much by the way.
|
|
 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.
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Have you seen this?:
Thanks
diceman
|
|
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
|
|
 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...
|
|

 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
|
|
 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.
|
|
 Registered User Joined: 4/18/2005 Posts: 4,090
|
maybee teh time periods could be adjustable as well. Thanks.
|
|

 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 592 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
 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.
|
|
 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.
|
|

 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
|
|
 Registered User Joined: 4/18/2005 Posts: 4,090
|
Great. thanks .. you guys are the greatest !
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
scottnlena,
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
 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?
|
|

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

 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
|
|
 Registered User Joined: 4/18/2005 Posts: 4,090
|
Thanks guys.
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
scottnlena,
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
 Registered User Joined: 4/18/2005 Posts: 4,090
|
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?
|
|

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

 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
|
|
Guest-1 |