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

ATR condition Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
profitkeeper
Posted : Saturday, March 21, 2015 3:40:20 PM
Registered User
Joined: 5/3/2013
Posts: 2

I'm trying to set up a simple condition without much luck.

I want:

ATR(14)  > C*.025

Hope you can help.

jackmerz
Posted : Saturday, March 21, 2015 7:48:31 PM
Registered User
Joined: 12/2/2004
Posts: 17

try the following: 

((H-L + ABS(H-C1) + ABS(L-C1)) /2) > C * 0.25 

 

jackmerz
Posted : Saturday, March 21, 2015 7:54:11 PM
Registered User
Joined: 12/2/2004
Posts: 17

I made one mistake in the formula just posted for the ATR condition.   The last part of the formula should be  C * 0.025 which is what you wanted.  Instead I put C * 0.25.  Sorry for the mistake.

diceman
Posted : Sunday, March 22, 2015 8:23:31 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

QUOTE (jackmerz)

try the following: 

((H-L + ABS(H-C1) + ABS(L-C1)) /2) > C * 0.25 

 

 

Thats not a 14 period ATR.

 

 

Thanks

 

jackmerz
Posted : Sunday, March 22, 2015 3:40:01 PM
Registered User
Joined: 12/2/2004
Posts: 17

Your right the formula specified was not a 14 period ATR.  It's the base formula for the ATR indicator.

Before we can create the scan condition, we first have to iterate the basic ATR formula for 14 periods. Then we can setup the condition ...... ATR(14) > C * 0.025.  

The formula after we do that  will be as follows: 

((((H-L+ABS(H-C1)+ABS(L-C1))/2) + ((H1-L1+ABS(H1-C2)+ABS(L1-C2))/2) + ((H2-L2+ABS(H2-C3)+ ABS(L2-C3))/2) + ((H3-L3+ABS(H3-C4)+ABS(L3- C4))/2) + ((H4-L4+ABS(H4-C5)+ABS(L4-C5))/2) + ((H5-L5+ABS(H5-C6)+ABS(L5-C6))/2) + ((H6-L6+ABS(H6-C7)+ABS(L6-C7))/2) + ((H7-L7+ABS(H7-C8)+ABS(L7-C8))/2) + ((H8-L8+ABS(H8-C9)+ABS(L8-C9))/2) + ((H9-L9+ABS(H9-C10)+ABS(L9-C10))/2) + ((H10-L10+ABS(H10-C11)+ABS(L10-C11))/2) + ((H11-L11+ABS(H11-C12)+ABS(L11-C12))/2) + ((H12-L12+ABS(H12-C13)+ABS(L12-C13))/2) + ((H13-L13+ABS(H13-C14)+ABS(L13-C14))/2))/14) > (C*0.025) 

To make this a scan condition go to the Library menu & initiate the Conditions menu. Under that menu choose "New Condition Formula".  When the "Edit PFC" box pops up, paste the above formula into the box. Test the formula to make sure it works. Fill in the Name box to name your condition. Then save it. 

You now have the condition you want to put into a scan.

 

 

profitkeeper
Posted : Monday, March 23, 2015 2:39:03 PM
Registered User
Joined: 5/3/2013
Posts: 2

Many thanks jackmerz.

It worked like a charm.

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.