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 |

Moving Linear Regression Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
joginder
Posted : Friday, December 9, 2016 3:30:04 PM
Gold Customer Gold Customer

Joined: 9/26/2005
Posts: 22

I need syntax for the following conditions.

1.    Close today < moving linear regression 190

2.    Close today < moving linear regression 135

3.    Moving linear regression 135 < moving linear regression 190

 

Many thanks.

Bruce_L
Posted : Friday, December 9, 2016 3:38:33 PM


Worden Trainer

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

There will be much shorter ways to write these soon. In TC2000 v12/v16/v17 I would just add the indicatorrs to the chart and then click on them to select Create Scan Condition to create the conditions.

QUOTE (joginder)
Close today < moving linear regression 190

C < AVGC190 + 94.5 * (94.5 * C + 93.5 * C1 + 92.5 * C2 + 91.5 * C3 + 90.5 * C4 + 89.5 * C5 + 88.5 * C6 + 87.5 * C7 + 86.5 * C8 + 85.5 * C9 + 84.5 * C10 + 83.5 * C11 + 82.5 * C12 + 81.5 * C13 + 80.5 * C14 + 79.5 * C15 + 78.5 * C16 + 77.5 * C17 + 76.5 * C18 + 75.5 * C19 + 74.5 * C20 + 73.5 * C21 + 72.5 * C22 + 71.5 * C23 + 70.5 * C24 + 69.5 * C25 + 68.5 * C26 + 67.5 * C27 + 66.5 * C28 + 65.5 * C29 + 64.5 * C30 + 63.5 * C31 + 62.5 * C32 + 61.5 * C33 + 60.5 * C34 + 59.5 * C35 + 58.5 * C36 + 57.5 * C37 + 56.5 * C38 + 55.5 * C39 + 54.5 * C40 + 53.5 * C41 + 52.5 * C42 + 51.5 * C43 + 50.5 * C44 + 49.5 * C45 + 48.5 * C46 + 47.5 * C47 + 46.5 * C48 + 45.5 * C49 + 44.5 * C50 + 43.5 * C51 + 42.5 * C52 + 41.5 * C53 + 40.5 * C54 + 39.5 * C55 + 38.5 * C56 + 37.5 * C57 + 36.5 * C58 + 35.5 * C59 + 34.5 * C60 + 33.5 * C61 + 32.5 * C62 + 31.5 * C63 + 30.5 * C64 + 29.5 * C65 + 28.5 * C66 + 27.5 * C67 + 26.5 * C68 + 25.5 * C69 + 24.5 * C70 + 23.5 * C71 + 22.5 * C72 + 21.5 * C73 + 20.5 * C74 + 19.5 * C75 + 18.5 * C76 + 17.5 * C77 + 16.5 * C78 + 15.5 * C79 + 14.5 * C80 + 13.5 * C81 + 12.5 * C82 + 11.5 * C83 + 10.5 * C84 + 9.5 * C85 + 8.5 * C86 + 7.5 * C87 + 6.5 * C88 + 5.5 * C89 + 4.5 * C90 + 3.5 * C91 + 2.5 * C92 + 1.5 * C93 + 0.5 * C94 - 0.5 * C95 - 1.5 * C96 - 2.5 * C97 - 3.5 * C98 - 4.5 * C99 - 5.5 * C100 - 6.5 * C101 - 7.5 * C102 - 8.5 * C103 - 9.5 * C104 - 10.5 * C105 - 11.5 * C106 - 12.5 * C107 - 13.5 * C108 - 14.5 * C109 - 15.5 * C110 - 16.5 * C111 - 17.5 * C112 - 18.5 * C113 - 19.5 * C114 - 20.5 * C115 - 21.5 * C116 - 22.5 * C117 - 23.5 * C118 - 24.5 * C119 - 25.5 * C120 - 26.5 * C121 - 27.5 * C122 - 28.5 * C123 - 29.5 * C124 - 30.5 * C125 - 31.5 * C126 - 32.5 * C127 - 33.5 * C128 - 34.5 * C129 - 35.5 * C130 - 36.5 * C131 - 37.5 * C132 - 38.5 * C133 - 39.5 * C134 - 40.5 * C135 - 41.5 * C136 - 42.5 * C137 - 43.5 * C138 - 44.5 * C139 - 45.5 * C140 - 46.5 * C141 - 47.5 * C142 - 48.5 * C143 - 49.5 * C144 - 50.5 * C145 - 51.5 * C146 - 52.5 * C147 - 53.5 * C148 - 54.5 * C149 - 55.5 * C150 - 56.5 * C151 - 57.5 * C152 - 58.5 * C153 - 59.5 * C154 - 60.5 * C155 - 61.5 * C156 - 62.5 * C157 - 63.5 * C158 - 64.5 * C159 - 65.5 * C160 - 66.5 * C161 - 67.5 * C162 - 68.5 * C163 - 69.5 * C164 - 70.5 * C165 - 71.5 * C166 - 72.5 * C167 - 73.5 * C168 - 74.5 * C169 - 75.5 * C170 - 76.5 * C171 - 77.5 * C172 - 78.5 * C173 - 79.5 * C174 - 80.5 * C175 - 81.5 * C176 - 82.5 * C177 - 83.5 * C178 - 84.5 * C179 - 85.5 * C180 - 86.5 * C181 - 87.5 * C182 - 88.5 * C183 - 89.5 * C184 - 90.5 * C185 - 91.5 * C186 - 92.5 * C187 - 93.5 * C188 - 94.5 * C189) / 571567.5

QUOTE (joginder)
Close today < moving linear regression 135

C < AVGC135 + 67 * (67 * C + 66 * C1 + 65 * C2 + 64 * C3 + 63 * C4 + 62 * C5 + 61 * C6 + 60 * C7 + 59 * C8 + 58 * C9 + 57 * C10 + 56 * C11 + 55 * C12 + 54 * C13 + 53 * C14 + 52 * C15 + 51 * C16 + 50 * C17 + 49 * C18 + 48 * C19 + 47 * C20 + 46 * C21 + 45 * C22 + 44 * C23 + 43 * C24 + 42 * C25 + 41 * C26 + 40 * C27 + 39 * C28 + 38 * C29 + 37 * C30 + 36 * C31 + 35 * C32 + 34 * C33 + 33 * C34 + 32 * C35 + 31 * C36 + 30 * C37 + 29 * C38 + 28 * C39 + 27 * C40 + 26 * C41 + 25 * C42 + 24 * C43 + 23 * C44 + 22 * C45 + 21 * C46 + 20 * C47 + 19 * C48 + 18 * C49 + 17 * C50 + 16 * C51 + 15 * C52 + 14 * C53 + 13 * C54 + 12 * C55 + 11 * C56 + 10 * C57 + 9 * C58 + 8 * C59 + 7 * C60 + 6 * C61 + 5 * C62 + 4 * C63 + 3 * C64 + 2 * C65 + C66 - C68 - 2 * C69 - 3 * C70 - 4 * C71 - 5 * C72 - 6 * C73 - 7 * C74 - 8 * C75 - 9 * C76 - 10 * C77 - 11 * C78 - 12 * C79 - 13 * C80 - 14 * C81 - 15 * C82 - 16 * C83 - 17 * C84 - 18 * C85 - 19 * C86 - 20 * C87 - 21 * C88 - 22 * C89 - 23 * C90 - 24 * C91 - 25 * C92 - 26 * C93 - 27 * C94 - 28 * C95 - 29 * C96 - 30 * C97 - 31 * C98 - 32 * C99 - 33 * C100 - 34 * C101 - 35 * C102 - 36 * C103 - 37 * C104 - 38 * C105 - 39 * C106 - 40 * C107 - 41 * C108 - 42 * C109 - 43 * C110 - 44 * C111 - 45 * C112 - 46 * C113 - 47 * C114 - 48 * C115 - 49 * C116 - 50 * C117 - 51 * C118 - 52 * C119 - 53 * C120 - 54 * C121 - 55 * C122 - 56 * C123 - 57 * C124 - 58 * C125 - 59 * C126 - 60 * C127 - 61 * C128 - 62 * C129 - 63 * C130 - 64 * C131 - 65 * C132 - 66 * C133 - 67 * C134) / 205020

QUOTE (joginder)
Moving linear regression 135 < moving linear regression 190

AVGC135 + 67 * (67 * C + 66 * C1 + 65 * C2 + 64 * C3 + 63 * C4 + 62 * C5 + 61 * C6 + 60 * C7 + 59 * C8 + 58 * C9 + 57 * C10 + 56 * C11 + 55 * C12 + 54 * C13 + 53 * C14 + 52 * C15 + 51 * C16 + 50 * C17 + 49 * C18 + 48 * C19 + 47 * C20 + 46 * C21 + 45 * C22 + 44 * C23 + 43 * C24 + 42 * C25 + 41 * C26 + 40 * C27 + 39 * C28 + 38 * C29 + 37 * C30 + 36 * C31 + 35 * C32 + 34 * C33 + 33 * C34 + 32 * C35 + 31 * C36 + 30 * C37 + 29 * C38 + 28 * C39 + 27 * C40 + 26 * C41 + 25 * C42 + 24 * C43 + 23 * C44 + 22 * C45 + 21 * C46 + 20 * C47 + 19 * C48 + 18 * C49 + 17 * C50 + 16 * C51 + 15 * C52 + 14 * C53 + 13 * C54 + 12 * C55 + 11 * C56 + 10 * C57 + 9 * C58 + 8 * C59 + 7 * C60 + 6 * C61 + 5 * C62 + 4 * C63 + 3 * C64 + 2 * C65 + C66 - C68 - 2 * C69 - 3 * C70 - 4 * C71 - 5 * C72 - 6 * C73 - 7 * C74 - 8 * C75 - 9 * C76 - 10 * C77 - 11 * C78 - 12 * C79 - 13 * C80 - 14 * C81 - 15 * C82 - 16 * C83 - 17 * C84 - 18 * C85 - 19 * C86 - 20 * C87 - 21 * C88 - 22 * C89 - 23 * C90 - 24 * C91 - 25 * C92 - 26 * C93 - 27 * C94 - 28 * C95 - 29 * C96 - 30 * C97 - 31 * C98 - 32 * C99 - 33 * C100 - 34 * C101 - 35 * C102 - 36 * C103 - 37 * C104 - 38 * C105 - 39 * C106 - 40 * C107 - 41 * C108 - 42 * C109 - 43 * C110 - 44 * C111 - 45 * C112 - 46 * C113 - 47 * C114 - 48 * C115 - 49 * C116 - 50 * C117 - 51 * C118 - 52 * C119 - 53 * C120 - 54 * C121 - 55 * C122 - 56 * C123 - 57 * C124 - 58 * C125 - 59 * C126 - 60 * C127 - 61 * C128 - 62 * C129 - 63 * C130 - 64 * C131 - 65 * C132 - 66 * C133 - 67 * C134) / 205020 < AVGC190 + 94.5 * (94.5 * C + 93.5 * C1 + 92.5 * C2 + 91.5 * C3 + 90.5 * C4 + 89.5 * C5 + 88.5 * C6 + 87.5 * C7 + 86.5 * C8 + 85.5 * C9 + 84.5 * C10 + 83.5 * C11 + 82.5 * C12 + 81.5 * C13 + 80.5 * C14 + 79.5 * C15 + 78.5 * C16 + 77.5 * C17 + 76.5 * C18 + 75.5 * C19 + 74.5 * C20 + 73.5 * C21 + 72.5 * C22 + 71.5 * C23 + 70.5 * C24 + 69.5 * C25 + 68.5 * C26 + 67.5 * C27 + 66.5 * C28 + 65.5 * C29 + 64.5 * C30 + 63.5 * C31 + 62.5 * C32 + 61.5 * C33 + 60.5 * C34 + 59.5 * C35 + 58.5 * C36 + 57.5 * C37 + 56.5 * C38 + 55.5 * C39 + 54.5 * C40 + 53.5 * C41 + 52.5 * C42 + 51.5 * C43 + 50.5 * C44 + 49.5 * C45 + 48.5 * C46 + 47.5 * C47 + 46.5 * C48 + 45.5 * C49 + 44.5 * C50 + 43.5 * C51 + 42.5 * C52 + 41.5 * C53 + 40.5 * C54 + 39.5 * C55 + 38.5 * C56 + 37.5 * C57 + 36.5 * C58 + 35.5 * C59 + 34.5 * C60 + 33.5 * C61 + 32.5 * C62 + 31.5 * C63 + 30.5 * C64 + 29.5 * C65 + 28.5 * C66 + 27.5 * C67 + 26.5 * C68 + 25.5 * C69 + 24.5 * C70 + 23.5 * C71 + 22.5 * C72 + 21.5 * C73 + 20.5 * C74 + 19.5 * C75 + 18.5 * C76 + 17.5 * C77 + 16.5 * C78 + 15.5 * C79 + 14.5 * C80 + 13.5 * C81 + 12.5 * C82 + 11.5 * C83 + 10.5 * C84 + 9.5 * C85 + 8.5 * C86 + 7.5 * C87 + 6.5 * C88 + 5.5 * C89 + 4.5 * C90 + 3.5 * C91 + 2.5 * C92 + 1.5 * C93 + 0.5 * C94 - 0.5 * C95 - 1.5 * C96 - 2.5 * C97 - 3.5 * C98 - 4.5 * C99 - 5.5 * C100 - 6.5 * C101 - 7.5 * C102 - 8.5 * C103 - 9.5 * C104 - 10.5 * C105 - 11.5 * C106 - 12.5 * C107 - 13.5 * C108 - 14.5 * C109 - 15.5 * C110 - 16.5 * C111 - 17.5 * C112 - 18.5 * C113 - 19.5 * C114 - 20.5 * C115 - 21.5 * C116 - 22.5 * C117 - 23.5 * C118 - 24.5 * C119 - 25.5 * C120 - 26.5 * C121 - 27.5 * C122 - 28.5 * C123 - 29.5 * C124 - 30.5 * C125 - 31.5 * C126 - 32.5 * C127 - 33.5 * C128 - 34.5 * C129 - 35.5 * C130 - 36.5 * C131 - 37.5 * C132 - 38.5 * C133 - 39.5 * C134 - 40.5 * C135 - 41.5 * C136 - 42.5 * C137 - 43.5 * C138 - 44.5 * C139 - 45.5 * C140 - 46.5 * C141 - 47.5 * C142 - 48.5 * C143 - 49.5 * C144 - 50.5 * C145 - 51.5 * C146 - 52.5 * C147 - 53.5 * C148 - 54.5 * C149 - 55.5 * C150 - 56.5 * C151 - 57.5 * C152 - 58.5 * C153 - 59.5 * C154 - 60.5 * C155 - 61.5 * C156 - 62.5 * C157 - 63.5 * C158 - 64.5 * C159 - 65.5 * C160 - 66.5 * C161 - 67.5 * C162 - 68.5 * C163 - 69.5 * C164 - 70.5 * C165 - 71.5 * C166 - 72.5 * C167 - 73.5 * C168 - 74.5 * C169 - 75.5 * C170 - 76.5 * C171 - 77.5 * C172 - 78.5 * C173 - 79.5 * C174 - 80.5 * C175 - 81.5 * C176 - 82.5 * C177 - 83.5 * C178 - 84.5 * C179 - 85.5 * C180 - 86.5 * C181 - 87.5 * C182 - 88.5 * C183 - 89.5 * C184 - 90.5 * C185 - 91.5 * C186 - 92.5 * C187 - 93.5 * C188 - 94.5 * C189) / 571567.5



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Aces4Me
Posted : Saturday, December 10, 2016 8:40:19 AM
Registered User
Joined: 4/30/2015
Posts: 197

Bruce i have seen this statement made by you a few times in last few days

"There will be much shorter ways to write these soon.  "

Sounds like a pretty big change about to come.  Will these older longer pcf formulas still work after the change.

AND will the change open up more possibilities on new formulas like AutoTrendlines and maybe trading from custom pcf indicators and/or easy scans

 

 

Bruce_L
Posted : Monday, December 12, 2016 4:13:23 PM


Worden Trainer

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

The older longer formula should still work. It is just that there will be shorter ways to write most (but not necessarily all) of the longer formulas.

There will be formulas which can be written after the changes which could not be written before the changes. For example, I can write an Indicator Formula for ConnorsRSI in internal company test versions of the software while I cannot do so in the current production release.

I could not say for sure if "AutoTrendlines" will be practically constructable after the changes or not.

Also note that the changes are going to be in v17 and newer. So it may have been misleading on my part to say there will be shorter ways to write these formulas soon when making the comment in a v7 forum.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
maljester
Posted : Tuesday, December 13, 2016 7:48:26 AM
Platinum Customer Platinum Customer

Joined: 1/30/2005
Posts: 135

I am using V17.  What is the formula for ConnorsRSI?

Bruce_L
Posted : Wednesday, December 14, 2016 11:17:22 AM


Worden Trainer

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

It won't work in the current TC2000 v17 public beta and it may change before the current internal company test build goes public, but this is what I'm using right now.

(WRSI3 + 100 * XAVG(GREATEST(0, IIF(SGN(C - C1) = SGN(C1 - C2), SGN(C - C1), SGN(C - C1) - TrueInRow(C1 > C2, 10) + TrueInRow(C1 < C2, 10))), 3) / XAVG(ABS(IIF(SGN(C - C1) = SGN(C1 - C2), SGN(C - C1), SGN(C - C1) - TrueInRow(C1 > C2, 10) + TrueInRow(C1 < C2, 10))), 3) + 50 * (SGN(C / C1 - C1 / C2) + SGN(C / C1 - C2 / C3) + SGN(C / C1 - C3 / C4) + SGN(C / C1 - C4 / C5) + SGN(C / C1 - C5 / C6) + SGN(C / C1 - C6 / C7) + SGN(C / C1 - C7 / C8) + SGN(C / C1 - C8 / C9) + SGN(C / C1 - C9 / C10) + SGN(C / C1 - C10 / C11) + SGN(C / C1 - C11 / C12) + SGN(C / C1 - C12 / C13) + SGN(C / C1 - C13 / C14) + SGN(C / C1 - C14 / C15) + SGN(C / C1 - C15 / C16) + SGN(C / C1 - C16 / C17) + SGN(C / C1 - C17 / C18) + SGN(C / C1 - C18 / C19) + SGN(C / C1 - C19 / C20) + SGN(C / C1 - C20 / C21) + SGN(C / C1 - C21 / C22) + SGN(C / C1 - C22 / C23) + SGN(C / C1 - C23 / C24) + SGN(C / C1 - C24 / C25) + SGN(C / C1 - C25 / C26) + SGN(C / C1 - C26 / C27) + SGN(C / C1 - C27 / C28) + SGN(C / C1 - C28 / C29) + SGN(C / C1 - C29 / C30) + SGN(C / C1 - C30 / C31) + SGN(C / C1 - C31 / C32) + SGN(C / C1 - C32 / C33) + SGN(C / C1 - C33 / C34) + SGN(C / C1 - C34 / C35) + SGN(C / C1 - C35 / C36) + SGN(C / C1 - C36 / C37) + SGN(C / C1 - C37 / C38) + SGN(C / C1 - C38 / C39) + SGN(C / C1 - C39 / C40) + SGN(C / C1 - C40 / C41) + SGN(C / C1 - C41 / C42) + SGN(C / C1 - C42 / C43) + SGN(C / C1 - C43 / C44) + SGN(C / C1 - C44 / C45) + SGN(C / C1 - C45 / C46) + SGN(C / C1 - C46 / C47) + SGN(C / C1 - C47 / C48) + SGN(C / C1 - C48 / C49) + SGN(C / C1 - C49 / C50) + SGN(C / C1 - C50 / C51) + SGN(C / C1 - C51 / C52) + SGN(C / C1 - C52 / C53) + SGN(C / C1 - C53 / C54) + SGN(C / C1 - C54 / C55) + SGN(C / C1 - C55 / C56) + SGN(C / C1 - C56 / C57) + SGN(C / C1 - C57 / C58) + SGN(C / C1 - C58 / C59) + SGN(C / C1 - C59 / C60) + SGN(C / C1 - C60 / C61) + SGN(C / C1 - C61 / C62) + SGN(C / C1 - C62 / C63) + SGN(C / C1 - C63 / C64) + SGN(C / C1 - C64 / C65) + SGN(C / C1 - C65 / C66) + SGN(C / C1 - C66 / C67) + SGN(C / C1 - C67 / C68) + SGN(C / C1 - C68 / C69) + SGN(C / C1 - C69 / C70) + SGN(C / C1 - C70 / C71) + SGN(C / C1 - C71 / C72) + SGN(C / C1 - C72 / C73) + SGN(C / C1 - C73 / C74) + SGN(C / C1 - C74 / C75) + SGN(C / C1 - C75 / C76) + SGN(C / C1 - C76 / C77) + SGN(C / C1 - C77 / C78) + SGN(C / C1 - C78 / C79) + SGN(C / C1 - C79 / C80) + SGN(C / C1 - C80 / C81) + SGN(C / C1 - C81 / C82) + SGN(C / C1 - C82 / C83) + SGN(C / C1 - C83 / C84) + SGN(C / C1 - C84 / C85) + SGN(C / C1 - C85 / C86) + SGN(C / C1 - C86 / C87) + SGN(C / C1 - C87 / C88) + SGN(C / C1 - C88 / C89) + SGN(C / C1 - C89 / C90) + SGN(C / C1 - C90 / C91) + SGN(C / C1 - C91 / C92) + SGN(C / C1 - C92 / C93) + SGN(C / C1 - C93 / C94) + SGN(C / C1 - C94 / C95) + SGN(C / C1 - C95 / C96) + SGN(C / C1 - C96 / C97) + SGN(C / C1 - C97 / C98) + SGN(C / C1 - C98 / C99) + SGN(C / C1 - C99 / C100) + SGN(C / C1 - C100 / C101)) / 100 + 50) / 3



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
maljester
Posted : Wednesday, December 14, 2016 1:25:34 PM
Platinum Customer Platinum Customer

Joined: 1/30/2005
Posts: 135

Thanks

Aces4Me
Posted : Friday, December 16, 2016 10:57:09 PM
Registered User
Joined: 4/30/2015
Posts: 197

General Question Linear Regression

If i plot Moving Linear Regression 30 Period

 

IS  A CROSSOVER the same place it would be if you had a linear regression line 30

diceman
Posted : Saturday, December 17, 2016 12:51:32 PM
Registered User
Joined: 1/28/2005
Posts: 6,049

QUOTE (Aces4Me)

General Question Linear Regression

If i plot Moving Linear Regression 30 Period

 

IS  A CROSSOVER the same place it would be if you had a linear regression line 30

 

At the last bar.

Its basically a moving last bar of a regression line.

 

 

Thanks

 

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.