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 |

Formula help Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
SILVERWESOKE
Posted : Thursday, August 2, 2018 7:56:50 PM
Gold Customer Gold Customer

Joined: 6/29/2005
Posts: 885

 HI Bruce.

 

I have this Boolean formula which returns a number of times a stock gaps up the next day after an previous up day (green) and the number of days in the period is 100. It gives me a nice running total to plot.

o>c1 and o1>c1

I would like to combine this with another formula so that not only can i see the number of days the stock gaps up after a "green" day but also includes  the number of green days there were in that 100 day period so that I can see what the % or ratio is  for the ones that gap up.

 For example if the stock gapped up 40 times in 100 days after a green day, and there were 80 green days, then I would like to see the 50% or .5 as  the number .displayed somehwere along the line.

thanks..

 

 

SILVERWESOKE
Posted : Thursday, August 2, 2018 7:57:46 PM
Gold Customer Gold Customer

Joined: 6/29/2005
Posts: 885

PS can you also direct me how to access this box for the boolean formula.. Cant recall where to find it from the library.. 

 

 

 

Bruce_L
Posted : Friday, August 3, 2018 11:59:29 AM


Worden Trainer

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

I am going to assume from your description that you have a Custom PCF Indicator on the chart. If so, you add like you would add other indicators by selecting Add Plot to Chart (the green + in the upper left corner of the chart) and choosing it from the list.

No you can get just a count of the number of times there was a green day during the period using the same technique (assuming the period is 100). Just use the following formula for the green day version. I am going take this part from your formula even though I think it would actually be counting red days.

O1 > C1

There is no way to then take a ratio of the two indicators however. What you can do instead is create a Custom PCF Indicator (with the period set to 1). In TC2000 v18, the formula would just be the following (you can leave off the 100 * if you want the decimal version instead of the percent version)..

100 * CountTrue(O > C1 AND O1 > C1, 100) / CountTrue(O1 > C1, 100)

Things get a lot more complicated in earlier versions of TC2000 however since they do not have the CountTrue() function.

100 * ABS((O > C1 AND O1 > C1) + (O1 > C2 AND O2 > C2) + (O2 > C3 AND O3 > C3) + (O3 > C4 AND O4 > C4) + (O4 > C5 AND O5 > C5) + (O5 > C6 AND O6 > C6) + (O6 > C7 AND O7 > C7) + (O7 > C8 AND O8 > C8) + (O8 > C9 AND O9 > C9) + (O9 > C10 AND O10 > C10) + (O10 > C11 AND O11 > C11) + (O11 > C12 AND O12 > C12) + (O12 > C13 AND O13 > C13) + (O13 > C14 AND O14 > C14) + (O14 > C15 AND O15 > C15) + (O15 > C16 AND O16 > C16) + (O16 > C17 AND O17 > C17) + (O17 > C18 AND O18 > C18) + (O18 > C19 AND O19 > C19) + (O19 > C20 AND O20 > C20) + (O20 > C21 AND O21 > C21) + (O21 > C22 AND O22 > C22) + (O22 > C23 AND O23 > C23) + (O23 > C24 AND O24 > C24) + (O24 > C25 AND O25 > C25) + (O25 > C26 AND O26 > C26) + (O26 > C27 AND O27 > C27) + (O27 > C28 AND O28 > C28) + (O28 > C29 AND O29 > C29) + (O29 > C30 AND O30 > C30) + (O30 > C31 AND O31 > C31) + (O31 > C32 AND O32 > C32) + (O32 > C33 AND O33 > C33) + (O33 > C34 AND O34 > C34) + (O34 > C35 AND O35 > C35) + (O35 > C36 AND O36 > C36) + (O36 > C37 AND O37 > C37) + (O37 > C38 AND O38 > C38) + (O38 > C39 AND O39 > C39) + (O39 > C40 AND O40 > C40) + (O40 > C41 AND O41 > C41) + (O41 > C42 AND O42 > C42) + (O42 > C43 AND O43 > C43) + (O43 > C44 AND O44 > C44) + (O44 > C45 AND O45 > C45) + (O45 > C46 AND O46 > C46) + (O46 > C47 AND O47 > C47) + (O47 > C48 AND O48 > C48) + (O48 > C49 AND O49 > C49) + (O49 > C50 AND O50 > C50) + (O50 > C51 AND O51 > C51) + (O51 > C52 AND O52 > C52) + (O52 > C53 AND O53 > C53) + (O53 > C54 AND O54 > C54) + (O54 > C55 AND O55 > C55) + (O55 > C56 AND O56 > C56) + (O56 > C57 AND O57 > C57) + (O57 > C58 AND O58 > C58) + (O58 > C59 AND O59 > C59) + (O59 > C60 AND O60 > C60) + (O60 > C61 AND O61 > C61) + (O61 > C62 AND O62 > C62) + (O62 > C63 AND O63 > C63) + (O63 > C64 AND O64 > C64) + (O64 > C65 AND O65 > C65) + (O65 > C66 AND O66 > C66) + (O66 > C67 AND O67 > C67) + (O67 > C68 AND O68 > C68) + (O68 > C69 AND O69 > C69) + (O69 > C70 AND O70 > C70) + (O70 > C71 AND O71 > C71) + (O71 > C72 AND O72 > C72) + (O72 > C73 AND O73 > C73) + (O73 > C74 AND O74 > C74) + (O74 > C75 AND O75 > C75) + (O75 > C76 AND O76 > C76) + (O76 > C77 AND O77 > C77) + (O77 > C78 AND O78 > C78) + (O78 > C79 AND O79 > C79) + (O79 > C80 AND O80 > C80) + (O80 > C81 AND O81 > C81) + (O81 > C82 AND O82 > C82) + (O82 > C83 AND O83 > C83) + (O83 > C84 AND O84 > C84) + (O84 > C85 AND O85 > C85) + (O85 > C86 AND O86 > C86) + (O86 > C87 AND O87 > C87) + (O87 > C88 AND O88 > C88) + (O88 > C89 AND O89 > C89) + (O89 > C90 AND O90 > C90) + (O90 > C91 AND O91 > C91) + (O91 > C92 AND O92 > C92) + (O92 > C93 AND O93 > C93) + (O93 > C94 AND O94 > C94) + (O94 > C95 AND O95 > C95) + (O95 > C96 AND O96 > C96) + (O96 > C97 AND O97 > C97) + (O97 > C98 AND O98 > C98) + (O98 > C99 AND O99 > C99) + (O99 > C100 AND O100 > C100)) / ABS((O1 > C1) + (O2 > C2) + (O3 > C3) + (O4 > C4) + (O5 > C5) + (O6 > C6) + (O7 > C7) + (O8 > C8) + (O9 > C9) + (O10 > C10) + (O11 > C11) + (O12 > C12) + (O13 > C13) + (O14 > C14) + (O15 > C15) + (O16 > C16) + (O17 > C17) + (O18 > C18) + (O19 > C19) + (O20 > C20) + (O21 > C21) + (O22 > C22) + (O23 > C23) + (O24 > C24) + (O25 > C25) + (O26 > C26) + (O27 > C27) + (O28 > C28) + (O29 > C29) + (O30 > C30) + (O31 > C31) + (O32 > C32) + (O33 > C33) + (O34 > C34) + (O35 > C35) + (O36 > C36) + (O37 > C37) + (O38 > C38) + (O39 > C39) + (O40 > C40) + (O41 > C41) + (O42 > C42) + (O43 > C43) + (O44 > C44) + (O45 > C45) + (O46 > C46) + (O47 > C47) + (O48 > C48) + (O49 > C49) + (O50 > C50) + (O51 > C51) + (O52 > C52) + (O53 > C53) + (O54 > C54) + (O55 > C55) + (O56 > C56) + (O57 > C57) + (O58 > C58) + (O59 > C59) + (O60 > C60) + (O61 > C61) + (O62 > C62) + (O63 > C63) + (O64 > C64) + (O65 > C65) + (O66 > C66) + (O67 > C67) + (O68 > C68) + (O69 > C69) + (O70 > C70) + (O71 > C71) + (O72 > C72) + (O73 > C73) + (O74 > C74) + (O75 > C75) + (O76 > C76) + (O77 > C77) + (O78 > C78) + (O79 > C79) + (O80 > C80) + (O81 > C81) + (O82 > C82) + (O83 > C83) + (O84 > C84) + (O85 > C85) + (O86 > C86) + (O87 > C87) + (O88 > C88) + (O89 > C89) + (O90 > C90) + (O91 > C91) + (O92 > C92) + (O93 > C93) + (O94 > C94) + (O95 > C95) + (O96 > C96) + (O97 > C97) + (O98 > C98) + (O99 > C99) + (O100 > C100))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
SILVERWESOKE
Posted : Friday, August 3, 2018 1:37:51 PM
Gold Customer Gold Customer

Joined: 6/29/2005
Posts: 885

Im using version 12.6... so no way to do it then?

Bruce_L
Posted : Friday, August 3, 2018 2:11:55 PM


Worden Trainer

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

I knew you were using 12.6, which is why I provided the big long formula for "earlier versions of TC2000".



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