Registered User Joined: 7/30/2007 Posts: 1,072
|
Suffering from a bit of information overload; I'm sure there's a simple answer, but ... what's the easiest/best way to plot a certain number of ATR's (for example lets say 2x ATR) from price?
Using the simulated trading in v16 I wanted to try plotting a line that's 2x the ATR and use that as a stop.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Add a Custom PCF Indicator to the chart with a formula starting with C - 2 * and then a formula for ATR inside of parentheses at the end.
So for a using 10 period average true range you could use the following formula.
C - 2 * ((AVGH10 - AVGL10) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9)) / 20)
Please provide a description and PCF for calculating an ATR value to be used as a stop loss value
Sir Old Viking Trader and PCFs
20-Day Average True Range
ATR for PCF
5 day Average True Range
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
That's pretty easy. I should've mentioned I usually use a 13-period ATR. Can you write or point me to a ATR(13) PCF?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following for the simple ATR:
(AVGH13 - AVGL13) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12)) / 26
Or the following for the stop:
C - 2 * ((AVGH13 - AVGL13) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12)) / 26)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Some day I want a peek at your spreadsheets ;)
Since the stop PCF starts with C - 2 I'm assuming it plots below price and is the stop for long trades. If I'm going short, I take it I just change C - 2 to C + 2 ?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Exactly.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Cool. There's hope for me yet. I'll try and give you Friday off.
No guarantees. ;)
|
|
Registered User Joined: 1/12/2011 Posts: 183
|
Keltner Channels
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Keltner Channels kind of do this, but not exactly. While the upper and lower channels are a multiple of ATR above and below the center line, the value of the centerline is not price. The center line of Keltner Channels is a moving average of typical price ((H + L + C) / 3).
Keltner Channels
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Exactly! Not exactly...
Keltner Channels centerline is "typical price" not the close. I'm entering a trade and setting a stop based on the close rather than the typical price. So, ...
Bruce 1, Telework 0. :)
Happy Friday!!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Happy Friday!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
QUOTE (Putt4Dough)
Suffering from a bit of information overload; I'm sure there's a simple answer, but ... what's the easiest/best way to plot a certain number of ATR's (for example lets say 2x ATR) from price?
Using the simulated trading in v16 I wanted to try plotting a line that's 2x the ATR and use that as a stop.
Have you tried the indicator: "Volatility Stop?"
Thanks
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Hi diceman.
Yeah, Volatility Stop, Parabolic SAR, Elder's Safe Zone, Chandelier Stops, ATR Stops ... did I forget any? I've played a little with Volatility Stops; I'm aware they use a True Range multiple. But that's about it.
Maybe I should plot all the different stops on one chart, and if I can still see Price, trying paper trading. LOL! :)
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Looks like a buy to me! :)
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
QUOTE (diceman) Looks like a buy to me! :)
Your eyes are better than mine. LOL!
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Hi Bruce,
I like the ATR channels, but I'd also like to try channels based on percentage of price. What if I wanted to plot bands, for example, 1.5% above and below price?
Thanks!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Add Envelope Channels with the Period set to 1 and the Width (%) setting set to 1.50.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/30/2007 Posts: 1,072
|
Cool. Figured it would be simpler than an ATR, but didn't want to assume.
Btw, we need to get PCFs added to the next Olympics!! Go for the gold!!!
Thanks, Bruce.
|
|
Gold Customer
Joined: 12/15/2004 Posts: 34
|
Tried to cut and paste this forumla into a PCF, and get a syntax error. I've checked it over but cannot detect the error. Can you help?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There doesn't appear to be anything wrong with the formula itself.
If you are using Edge or Internet Explorer you might want to try copying and pasting using Chrome instead.
Another thing to try would be to copy and paste into a text editor such as Notepad and then copy and paste from the text editor into TC2000.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/29/2010 Posts: 417
|
QUOTE (Bruce_L)
Please try the following for the simple ATR:
(AVGH13 - AVGL13) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12)) / 26
Or the following for the stop:
C - 2 * ((AVGH13 - AVGL13) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4) + ABS(H5 - C6) + ABS(C6 - L5) + ABS(H6 - C7) + ABS(C7 - L6) + ABS(H7 - C8) + ABS(C8 - L7) + ABS(H8 - C9) + ABS(C9 - L8) + ABS(H9 - C10) + ABS(C10 - L9) + ABS(H10 - C11) + ABS(C11 - L10) + ABS(H11 - C12) + ABS(C12 - L11) + ABS(H12 - C13) + ABS(C13 - L12)) / 26)
Bruce,
I am trying to replicate the above pcf for 5 periods and keep getting a syntax error.
C - 2 * ((AVGH5 - AVGL5) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4)) / 10)
Any help is much appreciated.
Don
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In TC2000 v17 the 5 period ATR itself would just be the following.
ATR5
And price minus two times the ATR would be the following.
C - 2 * ATR5
But in earlier versions of TC2000 the 5 period ATR is quite a bit longer.
(AVGH5 - AVGL5) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4)) / 10
As is price minus two timen the ATR.
C - 2 * ((AVGH5 - AVGL5) / 2 + (ABS(H - C1) + ABS(C1 - L) + ABS(H1 - C2) + ABS(C2 - L1) + ABS(H2 - C3) + ABS(C3 - L2) + ABS(H3 - C4) + ABS(C4 - L3) + ABS(H4 - C5) + ABS(C5 - L4)) / 10)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/29/2010 Posts: 417
|
Bruce,
Thank you very much!
Don
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |