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

Draw Horizontal Lines at Support Resistence 10 BAR Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
one100mil2016
Posted : Sunday, September 11, 2016 7:59:43 AM
Registered User
Joined: 7/18/2016
Posts: 13

Hi Bruce,

 

I am new to TC2000 and was browsing through topics.

Following is the PCF to find 10 Day Bar Low. 

ABS(C < C9 AND C < C8 AND C < C7 AND C < C6 AND C < C5 AND C < C4 AND C < C3 AND C < C2 AND C < C1)*L

Is it possible to draw a horiontal line(using PCF) at each 10 Bar Low and 10 Bar High ?

 

Thanks

 

 

Bruce_L
Posted : Monday, September 12, 2016 1:16:04 PM


Worden Trainer

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

We create Formulas to use in Custom PCF Indicators plotted in the same pane and scale as price (what you are probably doing now with your existing formula) using the techniques explored in the Days Since Last Peak (or other day-counting needs) topic.

The following formula for plotting support looks back 100 bars.

ABS(C < MINC9.1) * L + ABS(C >= MINC9.1) * (ABS(C1 < MINC9.2) * L1 + ABS(C1 >= MINC9.2) * (ABS(C2 < MINC9.3) * L2 + ABS(C2 >= MINC9.3) * (ABS(C3 < MINC9.4) * L3 + ABS(C3 >= MINC9.4) * (ABS(C4 < MINC9.5) * L4 + ABS(C4 >= MINC9.5) * (ABS(C5 < MINC9.6) * L5 + ABS(C5 >= MINC9.6) * (ABS(C6 < MINC9.7) * L6 + ABS(C6 >= MINC9.7) * (ABS(C7 < MINC9.8) * L7 + ABS(C7 >= MINC9.8) * (ABS(C8 < MINC9.9) * L8 + ABS(C8 >= MINC9.9) * (ABS(C9 < MINC9.10) * L9 + ABS(C9 >= MINC9.10) * (ABS(C10 < MINC9.11) * L10 + ABS(C10 >= MINC9.11) * (ABS(C11 < MINC9.12) * L11 + ABS(C11 >= MINC9.12) * (ABS(C12 < MINC9.13) * L12 + ABS(C12 >= MINC9.13) * (ABS(C13 < MINC9.14) * L13 + ABS(C13 >= MINC9.14) * (ABS(C14 < MINC9.15) * L14 + ABS(C14 >= MINC9.15) * (ABS(C15 < MINC9.16) * L15 + ABS(C15 >= MINC9.16) * (ABS(C16 < MINC9.17) * L16 + ABS(C16 >= MINC9.17) * (ABS(C17 < MINC9.18) * L17 + ABS(C17 >= MINC9.18) * (ABS(C18 < MINC9.19) * L18 + ABS(C18 >= MINC9.19) * (ABS(C19 < MINC9.20) * L19 + ABS(C19 >= MINC9.20) * (ABS(C20 < MINC9.21) * L20 + ABS(C20 >= MINC9.21) * (ABS(C21 < MINC9.22) * L21 + ABS(C21 >= MINC9.22) * (ABS(C22 < MINC9.23) * L22 + ABS(C22 >= MINC9.23) * (ABS(C23 < MINC9.24) * L23 + ABS(C23 >= MINC9.24) * (ABS(C24 < MINC9.25) * L24 + ABS(C24 >= MINC9.25) * (ABS(C25 < MINC9.26) * L25 + ABS(C25 >= MINC9.26) * (ABS(C26 < MINC9.27) * L26 + ABS(C26 >= MINC9.27) * (ABS(C27 < MINC9.28) * L27 + ABS(C27 >= MINC9.28) * (ABS(C28 < MINC9.29) * L28 + ABS(C28 >= MINC9.29) * (ABS(C29 < MINC9.30) * L29 + ABS(C29 >= MINC9.30) * (ABS(C30 < MINC9.31) * L30 + ABS(C30 >= MINC9.31) * (ABS(C31 < MINC9.32) * L31 + ABS(C31 >= MINC9.32) * (ABS(C32 < MINC9.33) * L32 + ABS(C32 >= MINC9.33) * (ABS(C33 < MINC9.34) * L33 + ABS(C33 >= MINC9.34) * (ABS(C34 < MINC9.35) * L34 + ABS(C34 >= MINC9.35) * (ABS(C35 < MINC9.36) * L35 + ABS(C35 >= MINC9.36) * (ABS(C36 < MINC9.37) * L36 + ABS(C36 >= MINC9.37) * (ABS(C37 < MINC9.38) * L37 + ABS(C37 >= MINC9.38) * (ABS(C38 < MINC9.39) * L38 + ABS(C38 >= MINC9.39) * (ABS(C39 < MINC9.40) * L39 + ABS(C39 >= MINC9.40) * (ABS(C40 < MINC9.41) * L40 + ABS(C40 >= MINC9.41) * (ABS(C41 < MINC9.42) * L41 + ABS(C41 >= MINC9.42) * (ABS(C42 < MINC9.43) * L42 + ABS(C42 >= MINC9.43) * (ABS(C43 < MINC9.44) * L43 + ABS(C43 >= MINC9.44) * (ABS(C44 < MINC9.45) * L44 + ABS(C44 >= MINC9.45) * (ABS(C45 < MINC9.46) * L45 + ABS(C45 >= MINC9.46) * (ABS(C46 < MINC9.47) * L46 + ABS(C46 >= MINC9.47) * (ABS(C47 < MINC9.48) * L47 + ABS(C47 >= MINC9.48) * (ABS(C48 < MINC9.49) * L48 + ABS(C48 >= MINC9.49) * (ABS(C49 < MINC9.50) * L49 + ABS(C49 >= MINC9.50) * (ABS(C50 < MINC9.51) * L50 + ABS(C50 >= MINC9.51) * (ABS(C51 < MINC9.52) * L51 + ABS(C51 >= MINC9.52) * (ABS(C52 < MINC9.53) * L52 + ABS(C52 >= MINC9.53) * (ABS(C53 < MINC9.54) * L53 + ABS(C53 >= MINC9.54) * (ABS(C54 < MINC9.55) * L54 + ABS(C54 >= MINC9.55) * (ABS(C55 < MINC9.56) * L55 + ABS(C55 >= MINC9.56) * (ABS(C56 < MINC9.57) * L56 + ABS(C56 >= MINC9.57) * (ABS(C57 < MINC9.58) * L57 + ABS(C57 >= MINC9.58) * (ABS(C58 < MINC9.59) * L58 + ABS(C58 >= MINC9.59) * (ABS(C59 < MINC9.60) * L59 + ABS(C59 >= MINC9.60) * (ABS(C60 < MINC9.61) * L60 + ABS(C60 >= MINC9.61) * (ABS(C61 < MINC9.62) * L61 + ABS(C61 >= MINC9.62) * (ABS(C62 < MINC9.63) * L62 + ABS(C62 >= MINC9.63) * (ABS(C63 < MINC9.64) * L63 + ABS(C63 >= MINC9.64) * (ABS(C64 < MINC9.65) * L64 + ABS(C64 >= MINC9.65) * (ABS(C65 < MINC9.66) * L65 + ABS(C65 >= MINC9.66) * (ABS(C66 < MINC9.67) * L66 + ABS(C66 >= MINC9.67) * (ABS(C67 < MINC9.68) * L67 + ABS(C67 >= MINC9.68) * (ABS(C68 < MINC9.69) * L68 + ABS(C68 >= MINC9.69) * (ABS(C69 < MINC9.70) * L69 + ABS(C69 >= MINC9.70) * (ABS(C70 < MINC9.71) * L70 + ABS(C70 >= MINC9.71) * (ABS(C71 < MINC9.72) * L71 + ABS(C71 >= MINC9.72) * (ABS(C72 < MINC9.73) * L72 + ABS(C72 >= MINC9.73) * (ABS(C73 < MINC9.74) * L73 + ABS(C73 >= MINC9.74) * (ABS(C74 < MINC9.75) * L74 + ABS(C74 >= MINC9.75) * (ABS(C75 < MINC9.76) * L75 + ABS(C75 >= MINC9.76) * (ABS(C76 < MINC9.77) * L76 + ABS(C76 >= MINC9.77) * (ABS(C77 < MINC9.78) * L77 + ABS(C77 >= MINC9.78) * (ABS(C78 < MINC9.79) * L78 + ABS(C78 >= MINC9.79) * (ABS(C79 < MINC9.80) * L79 + ABS(C79 >= MINC9.80) * (ABS(C80 < MINC9.81) * L80 + ABS(C80 >= MINC9.81) * (ABS(C81 < MINC9.82) * L81 + ABS(C81 >= MINC9.82) * (ABS(C82 < MINC9.83) * L82 + ABS(C82 >= MINC9.83) * (ABS(C83 < MINC9.84) * L83 + ABS(C83 >= MINC9.84) * (ABS(C84 < MINC9.85) * L84 + ABS(C84 >= MINC9.85) * (ABS(C85 < MINC9.86) * L85 + ABS(C85 >= MINC9.86) * (ABS(C86 < MINC9.87) * L86 + ABS(C86 >= MINC9.87) * (ABS(C87 < MINC9.88) * L87 + ABS(C87 >= MINC9.88) * (ABS(C88 < MINC9.89) * L88 + ABS(C88 >= MINC9.89) * (ABS(C89 < MINC9.90) * L89 + ABS(C89 >= MINC9.90) * (ABS(C90 < MINC9.91) * L90 + ABS(C90 >= MINC9.91) * (ABS(C91 < MINC9.92) * L91 + ABS(C91 >= MINC9.92) * (ABS(C92 < MINC9.93) * L92 + ABS(C92 >= MINC9.93) * (ABS(C93 < MINC9.94) * L93 + ABS(C93 >= MINC9.94) * (ABS(C94 < MINC9.95) * L94 + ABS(C94 >= MINC9.95) * (ABS(C95 < MINC9.96) * L95 + ABS(C95 >= MINC9.96) * (ABS(C96 < MINC9.97) * L96 + ABS(C96 >= MINC9.97) * (ABS(C97 < MINC9.98) * L97 + ABS(C97 >= MINC9.98) * (ABS(C98 < MINC9.99) * L98 + ABS(C98 >= MINC9.99) * (ABS(C99 < MINC9.100) * L99 + ABS(C99 >= MINC9.100) * (ABS(C100 < MINC9.101) * L100 + ABS(C100 >= MINC9.101) * MINL110))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

As does the following formula for resistance.

ABS(C > MAXC9.1) * H + ABS(C <= MAXC9.1) * (ABS(C1 > MAXC9.2) * H1 + ABS(C1 <= MAXC9.2) * (ABS(C2 > MAXC9.3) * H2 + ABS(C2 <= MAXC9.3) * (ABS(C3 > MAXC9.4) * H3 + ABS(C3 <= MAXC9.4) * (ABS(C4 > MAXC9.5) * H4 + ABS(C4 <= MAXC9.5) * (ABS(C5 > MAXC9.6) * H5 + ABS(C5 <= MAXC9.6) * (ABS(C6 > MAXC9.7) * H6 + ABS(C6 <= MAXC9.7) * (ABS(C7 > MAXC9.8) * H7 + ABS(C7 <= MAXC9.8) * (ABS(C8 > MAXC9.9) * H8 + ABS(C8 <= MAXC9.9) * (ABS(C9 > MAXC9.10) * H9 + ABS(C9 <= MAXC9.10) * (ABS(C10 > MAXC9.11) * H10 + ABS(C10 <= MAXC9.11) * (ABS(C11 > MAXC9.12) * H11 + ABS(C11 <= MAXC9.12) * (ABS(C12 > MAXC9.13) * H12 + ABS(C12 <= MAXC9.13) * (ABS(C13 > MAXC9.14) * H13 + ABS(C13 <= MAXC9.14) * (ABS(C14 > MAXC9.15) * H14 + ABS(C14 <= MAXC9.15) * (ABS(C15 > MAXC9.16) * H15 + ABS(C15 <= MAXC9.16) * (ABS(C16 > MAXC9.17) * H16 + ABS(C16 <= MAXC9.17) * (ABS(C17 > MAXC9.18) * H17 + ABS(C17 <= MAXC9.18) * (ABS(C18 > MAXC9.19) * H18 + ABS(C18 <= MAXC9.19) * (ABS(C19 > MAXC9.20) * H19 + ABS(C19 <= MAXC9.20) * (ABS(C20 > MAXC9.21) * H20 + ABS(C20 <= MAXC9.21) * (ABS(C21 > MAXC9.22) * H21 + ABS(C21 <= MAXC9.22) * (ABS(C22 > MAXC9.23) * H22 + ABS(C22 <= MAXC9.23) * (ABS(C23 > MAXC9.24) * H23 + ABS(C23 <= MAXC9.24) * (ABS(C24 > MAXC9.25) * H24 + ABS(C24 <= MAXC9.25) * (ABS(C25 > MAXC9.26) * H25 + ABS(C25 <= MAXC9.26) * (ABS(C26 > MAXC9.27) * H26 + ABS(C26 <= MAXC9.27) * (ABS(C27 > MAXC9.28) * H27 + ABS(C27 <= MAXC9.28) * (ABS(C28 > MAXC9.29) * H28 + ABS(C28 <= MAXC9.29) * (ABS(C29 > MAXC9.30) * H29 + ABS(C29 <= MAXC9.30) * (ABS(C30 > MAXC9.31) * H30 + ABS(C30 <= MAXC9.31) * (ABS(C31 > MAXC9.32) * H31 + ABS(C31 <= MAXC9.32) * (ABS(C32 > MAXC9.33) * H32 + ABS(C32 <= MAXC9.33) * (ABS(C33 > MAXC9.34) * H33 + ABS(C33 <= MAXC9.34) * (ABS(C34 > MAXC9.35) * H34 + ABS(C34 <= MAXC9.35) * (ABS(C35 > MAXC9.36) * H35 + ABS(C35 <= MAXC9.36) * (ABS(C36 > MAXC9.37) * H36 + ABS(C36 <= MAXC9.37) * (ABS(C37 > MAXC9.38) * H37 + ABS(C37 <= MAXC9.38) * (ABS(C38 > MAXC9.39) * H38 + ABS(C38 <= MAXC9.39) * (ABS(C39 > MAXC9.40) * H39 + ABS(C39 <= MAXC9.40) * (ABS(C40 > MAXC9.41) * H40 + ABS(C40 <= MAXC9.41) * (ABS(C41 > MAXC9.42) * H41 + ABS(C41 <= MAXC9.42) * (ABS(C42 > MAXC9.43) * H42 + ABS(C42 <= MAXC9.43) * (ABS(C43 > MAXC9.44) * H43 + ABS(C43 <= MAXC9.44) * (ABS(C44 > MAXC9.45) * H44 + ABS(C44 <= MAXC9.45) * (ABS(C45 > MAXC9.46) * H45 + ABS(C45 <= MAXC9.46) * (ABS(C46 > MAXC9.47) * H46 + ABS(C46 <= MAXC9.47) * (ABS(C47 > MAXC9.48) * H47 + ABS(C47 <= MAXC9.48) * (ABS(C48 > MAXC9.49) * H48 + ABS(C48 <= MAXC9.49) * (ABS(C49 > MAXC9.50) * H49 + ABS(C49 <= MAXC9.50) * (ABS(C50 > MAXC9.51) * H50 + ABS(C50 <= MAXC9.51) * (ABS(C51 > MAXC9.52) * H51 + ABS(C51 <= MAXC9.52) * (ABS(C52 > MAXC9.53) * H52 + ABS(C52 <= MAXC9.53) * (ABS(C53 > MAXC9.54) * H53 + ABS(C53 <= MAXC9.54) * (ABS(C54 > MAXC9.55) * H54 + ABS(C54 <= MAXC9.55) * (ABS(C55 > MAXC9.56) * H55 + ABS(C55 <= MAXC9.56) * (ABS(C56 > MAXC9.57) * H56 + ABS(C56 <= MAXC9.57) * (ABS(C57 > MAXC9.58) * H57 + ABS(C57 <= MAXC9.58) * (ABS(C58 > MAXC9.59) * H58 + ABS(C58 <= MAXC9.59) * (ABS(C59 > MAXC9.60) * H59 + ABS(C59 <= MAXC9.60) * (ABS(C60 > MAXC9.61) * H60 + ABS(C60 <= MAXC9.61) * (ABS(C61 > MAXC9.62) * H61 + ABS(C61 <= MAXC9.62) * (ABS(C62 > MAXC9.63) * H62 + ABS(C62 <= MAXC9.63) * (ABS(C63 > MAXC9.64) * H63 + ABS(C63 <= MAXC9.64) * (ABS(C64 > MAXC9.65) * H64 + ABS(C64 <= MAXC9.65) * (ABS(C65 > MAXC9.66) * H65 + ABS(C65 <= MAXC9.66) * (ABS(C66 > MAXC9.67) * H66 + ABS(C66 <= MAXC9.67) * (ABS(C67 > MAXC9.68) * H67 + ABS(C67 <= MAXC9.68) * (ABS(C68 > MAXC9.69) * H68 + ABS(C68 <= MAXC9.69) * (ABS(C69 > MAXC9.70) * H69 + ABS(C69 <= MAXC9.70) * (ABS(C70 > MAXC9.71) * H70 + ABS(C70 <= MAXC9.71) * (ABS(C71 > MAXC9.72) * H71 + ABS(C71 <= MAXC9.72) * (ABS(C72 > MAXC9.73) * H72 + ABS(C72 <= MAXC9.73) * (ABS(C73 > MAXC9.74) * H73 + ABS(C73 <= MAXC9.74) * (ABS(C74 > MAXC9.75) * H74 + ABS(C74 <= MAXC9.75) * (ABS(C75 > MAXC9.76) * H75 + ABS(C75 <= MAXC9.76) * (ABS(C76 > MAXC9.77) * H76 + ABS(C76 <= MAXC9.77) * (ABS(C77 > MAXC9.78) * H77 + ABS(C77 <= MAXC9.78) * (ABS(C78 > MAXC9.79) * H78 + ABS(C78 <= MAXC9.79) * (ABS(C79 > MAXC9.80) * H79 + ABS(C79 <= MAXC9.80) * (ABS(C80 > MAXC9.81) * H80 + ABS(C80 <= MAXC9.81) * (ABS(C81 > MAXC9.82) * H81 + ABS(C81 <= MAXC9.82) * (ABS(C82 > MAXC9.83) * H82 + ABS(C82 <= MAXC9.83) * (ABS(C83 > MAXC9.84) * H83 + ABS(C83 <= MAXC9.84) * (ABS(C84 > MAXC9.85) * H84 + ABS(C84 <= MAXC9.85) * (ABS(C85 > MAXC9.86) * H85 + ABS(C85 <= MAXC9.86) * (ABS(C86 > MAXC9.87) * H86 + ABS(C86 <= MAXC9.87) * (ABS(C87 > MAXC9.88) * H87 + ABS(C87 <= MAXC9.88) * (ABS(C88 > MAXC9.89) * H88 + ABS(C88 <= MAXC9.89) * (ABS(C89 > MAXC9.90) * H89 + ABS(C89 <= MAXC9.90) * (ABS(C90 > MAXC9.91) * H90 + ABS(C90 <= MAXC9.91) * (ABS(C91 > MAXC9.92) * H91 + ABS(C91 <= MAXC9.92) * (ABS(C92 > MAXC9.93) * H92 + ABS(C92 <= MAXC9.93) * (ABS(C93 > MAXC9.94) * H93 + ABS(C93 <= MAXC9.94) * (ABS(C94 > MAXC9.95) * H94 + ABS(C94 <= MAXC9.95) * (ABS(C95 > MAXC9.96) * H95 + ABS(C95 <= MAXC9.96) * (ABS(C96 > MAXC9.97) * H96 + ABS(C96 <= MAXC9.97) * (ABS(C97 > MAXC9.98) * H97 + ABS(C97 <= MAXC9.98) * (ABS(C98 > MAXC9.99) * H98 + ABS(C98 <= MAXC9.99) * (ABS(C99 > MAXC9.100) * H99 + ABS(C99 <= MAXC9.100) * (ABS(C100 > MAXC9.101) * H100 + ABS(C100 <= MAXC9.101) * MAXH110))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
sgia
Posted : Monday, November 28, 2016 9:37:31 PM
Registered User
Joined: 3/2/2005
Posts: 120

Great Stuff Bruce .love it

sga

bcochrane
Posted : Tuesday, November 29, 2016 5:58:22 PM
Registered User
Joined: 9/17/2010
Posts: 484

I may be a bit dense about what is being asked for, but wouldn't a 10 period Donchian channel draw a 10 day high & low?

diceman
Posted : Tuesday, November 29, 2016 10:28:35 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

QUOTE (bcochrane)

I may be a bit dense about what is being asked for, but wouldn't a 10 period Donchian channel draw a 10 day high & low?

 

It doesnt require the down days to be in a row.

 

 

Thanks

Aces4Me
Posted : Wednesday, November 30, 2016 8:17:44 AM
Registered User
Joined: 4/30/2015
Posts: 197

For someone looking to plot something similar to what Bruce has above,  I develop something with Bruce help along time ago that will plot the line at the high points but it will remain long and flat to the right after the plot for a longer period of time.  I LIKE TO KNOW WHEN I REVISIT THE OLD HIGH OR LOW.

I plot the following and have them on all time frames.

CREATE "Custom PCF indicator" for each  (seems like alot - you will love them)

MAXH78  MAXH78.39 MAXH156  MAXH156.78 MAXH312 MAXH312.156 

(Color Green small dotted line)

MINL78  MINL78.39 MINL156  MINL156.78  MINL312  MINL312.156

(Color Pink or light red dotted line)

Aces4Me
Posted : Wednesday, November 30, 2016 8:24:23 AM
Registered User
Joined: 4/30/2015
Posts: 197

Bruce i am still hung up on the fact that we do not have automatic trendlines.  When we draw trendlines we have a Begin Point and a End Point and a extension.

 

All we need is Indicator with Setting for Begin and End

Exampe Begin MAXH78.78 End MAXH78

sgia
Posted : Friday, December 9, 2016 9:56:09 PM
Registered User
Joined: 3/2/2005
Posts: 120

QUOTE (Aces4Me)

Bruce i am still hung up on the fact that we do not have automatic trendlines.  When we draw trendlines we have a Begin Point and a End Point and a extension.

 

All we need is Indicator with Setting for Begin and End

Exampe Begin MAXH78.78 End MAXH78

Great stuff.

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.