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

Plotting ATR distance from price Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Putt4Dough
Posted : Thursday, July 28, 2016 3:37:42 PM

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.

 

Bruce_L
Posted : Thursday, July 28, 2016 3:47:27 PM


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
Putt4Dough
Posted : Thursday, July 28, 2016 3:53:02 PM

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?

Bruce_L
Posted : Thursday, July 28, 2016 4:00:03 PM


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
Putt4Dough
Posted : Thursday, July 28, 2016 4:05:57 PM

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 ?

Bruce_L
Posted : Thursday, July 28, 2016 4:06:48 PM


Worden Trainer

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

Exactly.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Putt4Dough
Posted : Thursday, July 28, 2016 4:09:55 PM

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

Telework
Posted : Friday, July 29, 2016 12:51:34 PM
Registered User
Joined: 1/12/2011
Posts: 183

Keltner Channels

Bruce_L
Posted : Friday, July 29, 2016 1:03:38 PM


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
Putt4Dough
Posted : Friday, July 29, 2016 1:22:52 PM

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

 

Bruce_L
Posted : Friday, July 29, 2016 1:29:52 PM


Worden Trainer

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

Happy Friday!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
diceman
Posted : Friday, July 29, 2016 2:14:37 PM
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

 

Putt4Dough
Posted : Friday, July 29, 2016 6:48:24 PM

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! :)

 

diceman
Posted : Saturday, July 30, 2016 8:34:01 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

Looks like a buy to me! :)

 

Putt4Dough
Posted : Saturday, July 30, 2016 1:14:03 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

QUOTE (diceman)
Looks like a buy to me! :)

Your eyes are better than mine. LOL!

Putt4Dough
Posted : Tuesday, August 9, 2016 4:45:28 PM

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!

Bruce_L
Posted : Tuesday, August 9, 2016 4:47:09 PM


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
Putt4Dough
Posted : Tuesday, August 9, 2016 5:00:04 PM

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.

tspara
Posted : Friday, August 26, 2016 3:22:16 PM
Gold Customer Gold Customer

Joined: 12/15/2004
Posts: 34

QUOTE (Bruce_L)

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


 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?
 

Bruce_L
Posted : Friday, August 26, 2016 3:36:23 PM


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
donv98
Posted : Wednesday, February 15, 2017 1:39:06 PM
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

Bruce_L
Posted : Wednesday, February 15, 2017 1:45:50 PM


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
donv98
Posted : Wednesday, February 15, 2017 2:03:53 PM
Registered User
Joined: 7/29/2010
Posts: 417

Bruce,

   Thank you very much!

Don

 

Bruce_L
Posted : Wednesday, February 15, 2017 2:09:33 PM


Worden Trainer

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

You're welcome.



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