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 |

Help with Morales / Kacher Gap-up ATR Test Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Telework
Posted : Monday, March 11, 2013 3:05:05 PM
Registered User
Joined: 1/12/2011
Posts: 183

I'd like to build an indicator that tests whether a stock has a gap up and then whether it meets the requirement of being .075 of the 40-day Average True Range.

So first a gap up.

L > H1

And then I've been playing with some formulas I found on the forum but I think I have something wrong because it is not triggering in a Custom PCF % True Indicator. 

(L - H1) > 100 * ((AVGH40 - AVGL40) / 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) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21) + ABS(H22 - C23) + ABS(C23 - L22) + ABS(H23 - C24) + ABS(C24 - L23) + ABS(H24 - C25) + ABS(C25 - L24) + ABS(H25 - C26) + ABS(C26 - L25) + ABS(H26 - C27) + ABS(C27 - L26) + ABS(H27 - C28) + ABS(C28 - L27) + ABS(H28 - C29) + ABS(C29 - L28) + ABS(H29 - C30) + ABS(C30 - L29) + ABS(H30 - C31) + ABS(C31 - L30) + ABS(H31 - C32) + ABS(C32 - L31) + ABS(H32 - C33) + ABS(C33 - L32) + ABS(H33 - C34) + ABS(C34 - L33) + ABS(H34 - C35) + ABS(C35 - L34) + ABS(H35 - C36) + ABS(C36 - L35) + ABS(H36 - C37) + ABS(C37 - L36) + ABS(H37 - C38) + ABS(C38 - L37) + ABS(H38 - C39) + ABS(C39 - L38) + ABS(H39 - C40) + ABS(C40 - L39)) / 80) * 0.75

Also, I'm not sure how I can combine both indicators into a single boolean test that posts a dot on the screen (as an example) when the condition is met.

Any help greatly appreciated as always.

Josh

Bruce_L
Posted : Monday, March 11, 2013 3:15:26 PM


Worden Trainer

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

If you mean the gap up is greater than 0.075 times a 40-Period Simple Moving Average of True Range (or 7.5% of the ATR), then please try the following. Your current formula would seem to require the gap up to be 75 times the ATR.

L - H1 > .075 * ((AVGH40 - AVGL40) / 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) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21) + ABS(H22 - C23) + ABS(C23 - L22) + ABS(H23 - C24) + ABS(C24 - L23) + ABS(H24 - C25) + ABS(C25 - L24) + ABS(H25 - C26) + ABS(C26 - L25) + ABS(H26 - C27) + ABS(C27 - L26) + ABS(H27 - C28) + ABS(C28 - L27) + ABS(H28 - C29) + ABS(C29 - L28) + ABS(H29 - C30) + ABS(C30 - L29) + ABS(H30 - C31) + ABS(C31 - L30) + ABS(H31 - C32) + ABS(C32 - L31) + ABS(H32 - C33) + ABS(C33 - L32) + ABS(H33 - C34) + ABS(C34 - L33) + ABS(H34 - C35) + ABS(C35 - L34) + ABS(H35 - C36) + ABS(C36 - L35) + ABS(H36 - C37) + ABS(C37 - L36) + ABS(H37 - C38) + ABS(C38 - L37) + ABS(H38 - C39) + ABS(C39 - L38) + ABS(H39 - C40) + ABS(C40 - L39)) / 80)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bcochrane
Posted : Monday, March 11, 2013 7:31:07 PM
Registered User
Joined: 9/17/2010
Posts: 484

.75 of the 40 day ATR is the correct measure, from their book.

Of more importance, they say, is that Volume on that day be 1.5 times (or 150% of the 50 day moving average of daily trading Volume

I have found several such patterns using the TC2000 Gap Up With Momentum scan. It contains the Conditon "Range as a % of Avg Range > 150 - Daily" which I don't fully understand, but I guess it is looking for a Gap equal to or greater than 50% of ATR

Bruce, am I correct? If so, could it be modified for 40%?

Bruce_L
Posted : Tuesday, March 12, 2013 10:27:46 AM


Worden Trainer

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

Range as a % of Avg Range > 150 - Daily has nothing to do with volume, gaps or even average true range. It is checking for range (H - L) to be at least 50% greater than the 60-Period Simple Moving Average of Range (AVGH60 - AVGL60). An Indicator Formula for Range as a % of Avg Range would be:

100 * (H - L) / (AVGH60 - AVGL60)

And a Condition Formula checking for this to be greater than 150 would be:

100 * (H - L) / (AVGH60 - AVGL60) > 150

Checking for at least a 40% increase instead of more than a 50% increase would be:

100 * (H - L) / (AVGH60 - AVGL60) >= 140

But a better way to write this would be:

H - L >= 1.4 * (AVGH60 - AVGL60)

You indicated that .075 was the desired values in the text of your original post, but multiplied the ATR by both .75 and 100 in your original formula resulting in an actual multiplier of 75. If you want to use .75 and add a requirement that volume be at least 1.5 times the 50-Period Simple Moving Average of Volume, you would get:

V >= 1.5 * AVGV50 AND L - H1 > .75 * ((AVGH40 - AVGL40) / 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) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21) + ABS(H22 - C23) + ABS(C23 - L22) + ABS(H23 - C24) + ABS(C24 - L23) + ABS(H24 - C25) + ABS(C25 - L24) + ABS(H25 - C26) + ABS(C26 - L25) + ABS(H26 - C27) + ABS(C27 - L26) + ABS(H27 - C28) + ABS(C28 - L27) + ABS(H28 - C29) + ABS(C29 - L28) + ABS(H29 - C30) + ABS(C30 - L29) + ABS(H30 - C31) + ABS(C31 - L30) + ABS(H31 - C32) + ABS(C32 - L31) + ABS(H32 - C33) + ABS(C33 - L32) + ABS(H33 - C34) + ABS(C34 - L33) + ABS(H34 - C35) + ABS(C35 - L34) + ABS(H35 - C36) + ABS(C36 - L35) + ABS(H36 - C37) + ABS(C37 - L36) + ABS(H37 - C38) + ABS(C38 - L37) + ABS(H38 - C39) + ABS(C39 - L38) + ABS(H39 - C40) + ABS(C40 - L39)) / 80)

You could use the following Custom PCF Indicator plotted in the same pane and scale as the Price History indicator to plot a dot at the bottom of the price bar when the above is true.

- Plot Style: Dots
- Plot Color: Up to you.
- Period: 1
- Average Type: Simple
- Formula: L * ABS(V >= 1.5 * AVGV50 AND L - H1 > .75 * ((AVGH40 - AVGL40) / 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) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21) + ABS(H22 - C23) + ABS(C23 - L22) + ABS(H23 - C24) + ABS(C24 - L23) + ABS(H24 - C25) + ABS(C25 - L24) + ABS(H25 - C26) + ABS(C26 - L25) + ABS(H26 - C27) + ABS(C27 - L26) + ABS(H27 - C28) + ABS(C28 - L27) + ABS(H28 - C29) + ABS(C29 - L28) + ABS(H29 - C30) + ABS(C30 - L29) + ABS(H30 - C31) + ABS(C31 - L30) + ABS(H31 - C32) + ABS(C32 - L31) + ABS(H32 - C33) + ABS(C33 - L32) + ABS(H33 - C34) + ABS(C34 - L33) + ABS(H34 - C35) + ABS(C35 - L34) + ABS(H35 - C36) + ABS(C36 - L35) + ABS(H36 - C37) + ABS(C37 - L36) + ABS(H37 - C38) + ABS(C38 - L37) + ABS(H38 - C39) + ABS(C39 - L38) + ABS(H39 - C40) + ABS(C40 - L39)) / 80))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Telework
Posted : Tuesday, March 12, 2013 11:36:57 AM
Registered User
Joined: 1/12/2011
Posts: 183

Hi Bruce,

I actually meant to post 0.75. Sorry for the confusion in my original post. Your correction to the formula is working nicely.

I created both an indicator that works in conjuction with ATR and as a scan condition.

Thanks!

Telework
Posted : Thursday, April 25, 2013 12:34:52 PM
Registered User
Joined: 1/12/2011
Posts: 183

I'm editing the formula above to scan for gap ups that happened yesterday. Can you please double check?  Still not sure if AVGH40.1 & AVGL40.1 are the proper way to describe yesterdays averages.

 

L1 - H2 > .075 * ((AVGH40.1 - AVGL40.1) / 2 + 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) + ABS(H13 - C14) + ABS(C14 - L13) + ABS(H14 - C15) + ABS(C15 - L14) + ABS(H15 - C16) + ABS(C16 - L15) + ABS(H16 - C17) + ABS(C17 - L16) + ABS(H17 - C18) + ABS(C18 - L17) + ABS(H18 - C19) + ABS(C19 - L18) + ABS(H19 - C20) + ABS(C20 - L19) + ABS(H20 - C21) + ABS(C21 - L20) + ABS(H21 - C22) + ABS(C22 - L21) + ABS(H22 - C23) + ABS(C23 - L22) + ABS(H23 - C24) + ABS(C24 - L23) + ABS(H24 - C25) + ABS(C25 - L24) + ABS(H25 - C26) + ABS(C26 - L25) + ABS(H26 - C27) + ABS(C27 - L26) + ABS(H27 - C28) + ABS(C28 - L27) + ABS(H28 - C29) + ABS(C29 - L28) + ABS(H29 - C30) + ABS(C30 - L29) + ABS(H30 - C31) + ABS(C31 - L30) + ABS(H31 - C32) + ABS(C32 - L31) + ABS(H32 - C33) + ABS(C33 - L32) + ABS(H33 - C34) + ABS(C34 - L33) + ABS(H34 - C35) + ABS(C35 - L34) + ABS(H35 - C36) + ABS(C36 - L35) + ABS(H36 - C37) + ABS(C37 - L36) + ABS(H37 - C38) + ABS(C38 - L37) + ABS(H38 - C39) + ABS(C39 - L38) + ABS(H39 - C40) + ABS(C40 - L39) + (ABS(H40 - C41) + ABS(C41 - L40)) / 80)

Bruce_L
Posted : Thursday, April 25, 2013 12:46:49 PM


Worden Trainer

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

It looks correct to me. Everything appears to be properly incremented.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Telework
Posted : Thursday, April 25, 2013 1:02:55 PM
Registered User
Joined: 1/12/2011
Posts: 183

Great, thanks Bruce.

Bruce_L
Posted : Thursday, April 25, 2013 1:03:47 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.