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 |

Scan for price clearing multiple swing highs Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
john_f_damone
Posted : Friday, March 21, 2014 9:28:22 AM
Registered User
Joined: 5/15/2012
Posts: 7

Hello,

A while back you assisted me in creating swing highs and lows that plot on my charts based on the following criteria;

H3 * ABS(MAXH3 < H3 AND H3 > MAXH3.4)

 
L3 * ABS(MINL3 > L3 AND L3 < MINL3.4)
 
They work great by the way.
 
What I'm trying to do now is create a scan that would pick up stocks when price clears, or closes above the previous 2 swing highs.
 
Your help would be much appreciated.
 
Thanks,
 
John
Bruce_L
Posted : Friday, March 21, 2014 10:34:41 AM


Worden Trainer

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

I can think of a way to check for price being above the most recent swing high using the techniques given in the Days Since Last Peak (or other day-counting needs) topic as long as you limit the number of bars back you want to look for the swing high.

I cannot think of a way to check for price being above the two most recent swing highs which would result in a formula which is short and fast enough to be practical or post in the forums. The technique to check for being above the most recent swing high results in a long enough formula as it is.

The following version of a formula to check for price being above the most recent swing high checks back for the 60 most recent possible swing highs.

C > ABS(MAXH3.1 < H4 AND H4 > MAXH3.5) * H4 + ABS(MAXH3.1 >= H4 OR H4 <= MAXH3.5) * (ABS(MAXH3.2 < H5 AND H5 > MAXH3.6) * H5 + ABS(MAXH3.2 >= H5 OR H5 <= MAXH3.6) * (ABS(MAXH3.3 < H6 AND H6 > MAXH3.7) * H6 + ABS(MAXH3.3 >= H6 OR H6 <= MAXH3.7) * (ABS(MAXH3.4 < H7 AND H7 > MAXH3.8) * H7 + ABS(MAXH3.4 >= H7 OR H7 <= MAXH3.8) * (ABS(MAXH3.5 < H8 AND H8 > MAXH3.9) * H8 + ABS(MAXH3.5 >= H8 OR H8 <= MAXH3.9) * (ABS(MAXH3.6 < H9 AND H9 > MAXH3.10) * H9 + ABS(MAXH3.6 >= H9 OR H9 <= MAXH3.10) * (ABS(MAXH3.7 < H10 AND H10 > MAXH3.11) * H10 + ABS(MAXH3.7 >= H10 OR H10 <= MAXH3.11) * (ABS(MAXH3.8 < H11 AND H11 > MAXH3.12) * H11 + ABS(MAXH3.8 >= H11 OR H11 <= MAXH3.12) * (ABS(MAXH3.9 < H12 AND H12 > MAXH3.13) * H12 + ABS(MAXH3.9 >= H12 OR H12 <= MAXH3.13) * (ABS(MAXH3.10 < H13 AND H13 > MAXH3.14) * H13 + ABS(MAXH3.10 >= H13 OR H13 <= MAXH3.14) * (ABS(MAXH3.11 < H14 AND H14 > MAXH3.15) * H14 + ABS(MAXH3.11 >= H14 OR H14 <= MAXH3.15) * (ABS(MAXH3.12 < H15 AND H15 > MAXH3.16) * H15 + ABS(MAXH3.12 >= H15 OR H15 <= MAXH3.16) * (ABS(MAXH3.13 < H16 AND H16 > MAXH3.17) * H16 + ABS(MAXH3.13 >= H16 OR H16 <= MAXH3.17) * (ABS(MAXH3.14 < H17 AND H17 > MAXH3.18) * H17 + ABS(MAXH3.14 >= H17 OR H17 <= MAXH3.18) * (ABS(MAXH3.15 < H18 AND H18 > MAXH3.19) * H18 + ABS(MAXH3.15 >= H18 OR H18 <= MAXH3.19) * (ABS(MAXH3.16 < H19 AND H19 > MAXH3.20) * H19 + ABS(MAXH3.16 >= H19 OR H19 <= MAXH3.20) * (ABS(MAXH3.17 < H20 AND H20 > MAXH3.21) * H20 + ABS(MAXH3.17 >= H20 OR H20 <= MAXH3.21) * (ABS(MAXH3.18 < H21 AND H21 > MAXH3.22) * H21 + ABS(MAXH3.18 >= H21 OR H21 <= MAXH3.22) * (ABS(MAXH3.19 < H22 AND H22 > MAXH3.23) * H22 + ABS(MAXH3.19 >= H22 OR H22 <= MAXH3.23) * (ABS(MAXH3.20 < H23 AND H23 > MAXH3.24) * H23 + ABS(MAXH3.20 >= H23 OR H23 <= MAXH3.24) * (ABS(MAXH3.21 < H24 AND H24 > MAXH3.25) * H24 + ABS(MAXH3.21 >= H24 OR H24 <= MAXH3.25) * (ABS(MAXH3.22 < H25 AND H25 > MAXH3.26) * H25 + ABS(MAXH3.22 >= H25 OR H25 <= MAXH3.26) * (ABS(MAXH3.23 < H26 AND H26 > MAXH3.27) * H26 + ABS(MAXH3.23 >= H26 OR H26 <= MAXH3.27) * (ABS(MAXH3.24 < H27 AND H27 > MAXH3.28) * H27 + ABS(MAXH3.24 >= H27 OR H27 <= MAXH3.28) * (ABS(MAXH3.25 < H28 AND H28 > MAXH3.29) * H28 + ABS(MAXH3.25 >= H28 OR H28 <= MAXH3.29) * (ABS(MAXH3.26 < H29 AND H29 > MAXH3.30) * H29 + ABS(MAXH3.26 >= H29 OR H29 <= MAXH3.30) * (ABS(MAXH3.27 < H30 AND H30 > MAXH3.31) * H30 + ABS(MAXH3.27 >= H30 OR H30 <= MAXH3.31) * (ABS(MAXH3.28 < H31 AND H31 > MAXH3.32) * H31 + ABS(MAXH3.28 >= H31 OR H31 <= MAXH3.32) * (ABS(MAXH3.29 < H32 AND H32 > MAXH3.33) * H32 + ABS(MAXH3.29 >= H32 OR H32 <= MAXH3.33) * (ABS(MAXH3.30 < H33 AND H33 > MAXH3.34) * H33 + ABS(MAXH3.30 >= H33 OR H33 <= MAXH3.34) * (ABS(MAXH3.31 < H34 AND H34 > MAXH3.35) * H34 + ABS(MAXH3.31 >= H34 OR H34 <= MAXH3.35) * (ABS(MAXH3.32 < H35 AND H35 > MAXH3.36) * H35 + ABS(MAXH3.32 >= H35 OR H35 <= MAXH3.36) * (ABS(MAXH3.33 < H36 AND H36 > MAXH3.37) * H36 + ABS(MAXH3.33 >= H36 OR H36 <= MAXH3.37) * (ABS(MAXH3.34 < H37 AND H37 > MAXH3.38) * H37 + ABS(MAXH3.34 >= H37 OR H37 <= MAXH3.38) * (ABS(MAXH3.35 < H38 AND H38 > MAXH3.39) * H38 + ABS(MAXH3.35 >= H38 OR H38 <= MAXH3.39) * (ABS(MAXH3.36 < H39 AND H39 > MAXH3.40) * H39 + ABS(MAXH3.36 >= H39 OR H39 <= MAXH3.40) * (ABS(MAXH3.37 < H40 AND H40 > MAXH3.41) * H40 + ABS(MAXH3.37 >= H40 OR H40 <= MAXH3.41) * (ABS(MAXH3.38 < H41 AND H41 > MAXH3.42) * H41 + ABS(MAXH3.38 >= H41 OR H41 <= MAXH3.42) * (ABS(MAXH3.39 < H42 AND H42 > MAXH3.43) * H42 + ABS(MAXH3.39 >= H42 OR H42 <= MAXH3.43) * (ABS(MAXH3.40 < H43 AND H43 > MAXH3.44) * H43 + ABS(MAXH3.40 >= H43 OR H43 <= MAXH3.44) * (ABS(MAXH3.41 < H44 AND H44 > MAXH3.45) * H44 + ABS(MAXH3.41 >= H44 OR H44 <= MAXH3.45) * (ABS(MAXH3.42 < H45 AND H45 > MAXH3.46) * H45 + ABS(MAXH3.42 >= H45 OR H45 <= MAXH3.46) * (ABS(MAXH3.43 < H46 AND H46 > MAXH3.47) * H46 + ABS(MAXH3.43 >= H46 OR H46 <= MAXH3.47) * (ABS(MAXH3.44 < H47 AND H47 > MAXH3.48) * H47 + ABS(MAXH3.44 >= H47 OR H47 <= MAXH3.48) * (ABS(MAXH3.45 < H48 AND H48 > MAXH3.49) * H48 + ABS(MAXH3.45 >= H48 OR H48 <= MAXH3.49) * (ABS(MAXH3.46 < H49 AND H49 > MAXH3.50) * H49 + ABS(MAXH3.46 >= H49 OR H49 <= MAXH3.50) * (ABS(MAXH3.47 < H50 AND H50 > MAXH3.51) * H50 + ABS(MAXH3.47 >= H50 OR H50 <= MAXH3.51) * (ABS(MAXH3.48 < H51 AND H51 > MAXH3.52) * H51 + ABS(MAXH3.48 >= H51 OR H51 <= MAXH3.52) * (ABS(MAXH3.49 < H52 AND H52 > MAXH3.53) * H52 + ABS(MAXH3.49 >= H52 OR H52 <= MAXH3.53) * (ABS(MAXH3.50 < H53 AND H53 > MAXH3.54) * H53 + ABS(MAXH3.50 >= H53 OR H53 <= MAXH3.54) * (ABS(MAXH3.51 < H54 AND H54 > MAXH3.55) * H54 + ABS(MAXH3.51 >= H54 OR H54 <= MAXH3.55) * (ABS(MAXH3.52 < H55 AND H55 > MAXH3.56) * H55 + ABS(MAXH3.52 >= H55 OR H55 <= MAXH3.56) * (ABS(MAXH3.53 < H56 AND H56 > MAXH3.57) * H56 + ABS(MAXH3.53 >= H56 OR H56 <= MAXH3.57) * (ABS(MAXH3.54 < H57 AND H57 > MAXH3.58) * H57 + ABS(MAXH3.54 >= H57 OR H57 <= MAXH3.58) * (ABS(MAXH3.55 < H58 AND H58 > MAXH3.59) * H58 + ABS(MAXH3.55 >= H58 OR H58 <= MAXH3.59) * (ABS(MAXH3.56 < H59 AND H59 > MAXH3.60) * H59 + ABS(MAXH3.56 >= H59 OR H59 <= MAXH3.60) * (ABS(MAXH3.57 < H60 AND H60 > MAXH3.61) * H60 + ABS(MAXH3.57 >= H60 OR H60 <= MAXH3.61) * (ABS(MAXH3.58 < H61 AND H61 > MAXH3.62) * H61 + ABS(MAXH3.58 >= H61 OR H61 <= MAXH3.62) * (ABS(MAXH3.59 < H62 AND H62 > MAXH3.63) * H62 + ABS(MAXH3.59 >= H62 OR H62 <= MAXH3.63) * (ABS(MAXH3.60 < H63 AND H63 > MAXH3.64) * H63 + ABS(MAXH3.60 >= H63 OR H63 <= MAXH3.64) * (
H + 1))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))


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