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 |

Modeling "Pure" Wilder's RSI in PCF's Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Tanstaafl
Posted : Sunday, February 27, 2005 7:31:02 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
The following was posted on another board, but since it addresses a general concern about modelling Wilder's RSI, I thought it would be helpful to post it here (the PCF's area) to make it easier to find and reference.

The original question was:

I have applied a 2 period RSI to my charts in TC2000 and also in Esignal. I know that Worden uses "wilder" RSI. is that somehow different from the conventional RSI? If so, is there a way to put the conventional RSI into Worden since I use it to scan?

My responses were in three followup postings:

I went through a long discussion with Worden over the past few years, which culminated in their adding the "Use Wilder's Smoothing" checkbox in the plot-function settings box.

If you fill in 14 and 1 for the plot settings, AND you check that box, the resulting plot will be an accurate representation of the "pure" Wilder's RSI calculation which he published in his 1978 book, and which most other platforms use.

If you don't check the box, then the internal calc's use a much different smoothing method (exponential), which requires the input-parameter to be almost twice as much as the pure Wilder calc ... aprx 27 instead of 14. Even then, the results are not the same.

So, if you want the "Worden version" of RSI, don't check the box. If you want the "Wilder version" of RSI, you need to check the box.

Unfortunately, even with the new TC2005, the PCF function for RSI still only models the Worden version. If you want to put a "true" Wilder's RSI calc into a PCF or custom indicator, you need to do it the hard way, and write out the actual RSI formula longhand.

I hope that TC will soon offer a "WRSI" function for PCF and CI use that will model Wilder's original math. But at least you can see it correctly on the plot ... and the SortBy function will allow you to work with it in a lot of ways.

=============================================

FWIW, here is an example of the "longhand" version of the true Wilder's RSI calc, which involves an infinite series (much like EMA calc's do).

Unfortunately, the Wilder-smoothing math is "slower" than EMA math, so it takes a LOT of terms to get a reasonable accuracy out of it. The PCF / CI formula below is accurate to within 0.1%, which requires 93 days of data for a 14-day RSI calc. You can plot it as a custom indicator on the top pane, and also plot a "pure Wilder" native RSI 14 on the top pane, and turn on the pointer-databox to see that the values are essentially the same, but both are way-different than a Custom Indicator plot of RSI14.

I suggest you use Zoom 9 to avoid long delays in the Custom Indicator calc as you move the pointer back and forth.

Here is the PCF/CI formula for the True-Wilder RSI 14, accurate to 0.1%:

100 - ( 100 / ( 1 + ( -71.496 * (C0-C1>0) * (C0-C1) -66.3892 * (C1-C2>0) * (C1-C2) -61.6471 * (C2-C3>0) * (C2-C3) -57.2437 * (C3-C4>0) * (C3-C4) -53.1549 * (C4-C5>0) * (C4-C5) -49.3581 * (C5-C6>0) * (C5-C6) -45.8325 * (C6-C7>0) * (C6-C7) -42.5588 * (C7-C8>0) * (C7-C8) -39.5189 * (C8-C9>0) * (C8-C9) -36.6961 * (C9-C10>0) * (C9-C10) -34.0749 * (C10-C11>0) * (C10-C11) -31.641 * (C11-C12>0) * (C11-C12) -29.3809 * (C12-C13>0) * (C12-C13) -27.2823 * (C13-C14>0) * (C13-C14) -25.3336 * (C14-C15>0) * (C14-C15) -23.524 * (C15-C16>0) * (C15-C16) -21.8437 * (C16-C17>0) * (C16-C17) -20.2835 * (C17-C18>0) * (C17-C18) -18.8346 * (C18-C19>0) * (C18-C19) -17.4893 * (C19-C20>0) * (C19-C20) -16.2401 * (C20-C21>0) * (C20-C21) -15.0801 * (C21-C22>0) * (C21-C22) -14.0029 * (C22-C23>0) * (C22-C23) -13.0027 * (C23-C24>0) * (C23-C24) -12.074 * (C24-C25>0) * (C24-C25) -11.2115 * (C25-C26>0) * (C25-C26) -10.4107 * (C26-C27>0) * (C26-C27) -9.6671 * (C27-C28>0) * (C27-C28) -8.9766 * (C28-C29>0) * (C28-C29) -8.3354 * (C29-C30>0) * (C29-C30) -7.74 * (C30-C31>0) * (C30-C31) -7.1871 * (C31-C32>0) * (C31-C32) -6.6738 * (C32-C33>0) * (C32-C33) -6.1971 * (C33-C34>0) * (C33-C34) -5.7544 * (C34-C35>0) * (C34-C35) -5.3434 * (C35-C36>0) * (C35-C36) -4.9617 * (C36-C37>0) * (C36-C37) -4.6073 * (C37-C38>0) * (C37-C38) -4.2782 * (C38-C39>0) * (C38-C39) -3.9726 * (C39-C40>0) * (C39-C40) -3.6889 * (C40-C41>0) * (C40-C41) -3.4254 * (C41-C42>0) * (C41-C42) -3.1807 * (C42-C43>0) * (C42-C43) -2.9535 * (C43-C44>0) * (C43-C44) -2.7426 * (C44-C45>0) * (C44-C45) -2.5467 * (C45-C46>0) * (C45-C46) -2.3648 * (C46-C47>0) * (C46-C47) -2.1958 * (C47-C48>0) * (C47-C48) -2.039 * (C48-C49>0) * (C48-C49) -1.8934 * (C49-C50>0) * (C49-C50) -1.7581 * (C50-C51>0) * (C50-C51) -1.6325 * (C51-C52>0) * (C51-C52) -1.5159 * (C52-C53>0) * (C52-C53) -1.4076 * (C53-C54>0) * (C53-C54) -1.3071 * (C54-C55>0) * (C54-C55) -1.2137 * (C55-C56>0) * (C55-C56) -1.127 * (C56-C57>0) * (C56-C57) -1.0465 * (C57-C58>0) * (C57-C58) -.9718 * (C58-C59>0) * (C58-C59) -.9024 * (C59-C60>0) * (C59-C60) -.8379 * (C60-C61>0) * (C60-C61) -.7781 * (C61-C62>0) * (C61-C62) -.7225 * (C62-C63>0) * (C62-C63) -.6709 * (C63-C64>0) * (C63-C64) -.623 * (C64-C65>0) * (C64-C65) -.5785 * (C65-C66>0) * (C65-C66) -.5371 * (C66-C67>0) * (C66-C67) -.4988 * (C67-C68>0) * (C67-C68) -.4632 * (C68-C69>0) * (C68-C69) -.4301 * (C69-C70>0) * (C69-C70) -.3994 * (C70-C71>0) * (C70-C71) -.3708 * (C71-C72>0) * (C71-C72) -.3443 * (C72-C73>0) * (C72-C73) -.3197 * (C73-C74>0) * (C73-C74) -.2969 * (C74-C75>0) * (C74-C75) -.2757 * (C75-C76>0) * (C75-C76) -.256 * (C76-C77>0) * (C76-C77) -.2377 * (C77-C78>0) * (C77-C78) -.2207 * (C78-C79>0) * (C78-C79) -.205 * (C79-C80>0) * (C79-C80) -.1903 * (C80-C81>0) * (C80-C81) -.1767 * (C81-C82>0) * (C81-C82) -.1641 * (C82-C83>0) * (C82-C83) -.1524 * (C83-C84>0) * (C83-C84) -.1415 * (C84-C85>0) * (C84-C85) -.1314 * (C85-C86>0) * (C85-C86) -.122 * (C86-C87>0) * (C86-C87) -.1133 * (C87-C88>0) * (C87-C88) -.1052 * (C88-C89>0) * (C88-C89) -.0977 * (C89-C90>0) * (C89-C90) -.0907 * (C90-C91>0) * (C90-C91) -.0842 * (C91-C92>0) * (C91-C92) -.0782 * (C92-C93>0) * (C92-C93) ) / ( 71.496 * (C0-C1<0) * (C0-C1) +66.3892 * (C1-C2<0) * (C1-C2) +61.6471 * (C2-C3<0) * (C2-C3) +57.2437 * (C3-C4<0) * (C3-C4) +53.1549 * (C4-C5<0) * (C4-C5) +49.3581 * (C5-C6<0) * (C5-C6) +45.8325 * (C6-C7<0) * (C6-C7) +42.5588 * (C7-C8<0) * (C7-C8) +39.5189 * (C8-C9<0) * (C8-C9) +36.6961 * (C9-C10<0) * (C9-C10) +34.0749 * (C10-C11<0) * (C10-C11) +31.641 * (C11-C12<0) * (C11-C12) +29.3809 * (C12-C13<0) * (C12-C13) +27.2823 * (C13-C14<0) * (C13-C14) +25.3336 * (C14-C15<0) * (C14-C15) +23.524 * (C15-C16<0) * (C15-C16) +21.8437 * (C16-C17<0) * (C16-C17) +20.2835 * (C17-C18<0) * (C17-C18) +18.8346 * (C18-C19<0) * (C18-C19) +17.4893 * (C19-C20<0) * (C19-C20) +16.2401 * (C20-C21<0) * (C20-C21) +15.0801 * (C21-C22<0) * (C21-C22) +14.0029 * (C22-C23<0) * (C22-C23) +13.0027 * (C23-C24<0) * (C23-C24) +12.074 * (C24-C25<0) * (C24-C25) +11.2115 * (C25-C26<0) * (C25-C26) +10.4107 * (C26-C27<0) * (C26-C27) +9.6671 * (C27-C28<0) * (C27-C28) +8.9766 * (C28-C29<0) * (C28-C29) +8.3354 * (C29-C30<0) * (C29-C30) +7.74 * (C30-C31<0) * (C30-C31) +7.1871 * (C31-C32<0) * (C31-C32) +6.6738 * (C32-C33<0) * (C32-C33) +6.1971 * (C33-C34<0) * (C33-C34) +5.7544 * (C34-C35<0) * (C34-C35) +5.3434 * (C35-C36<0) * (C35-C36) +4.9617 * (C36-C37<0) * (C36-C37) +4.6073 * (C37-C38<0) * (C37-C38) +4.2782 * (C38-C39<0) * (C38-C39) +3.9726 * (C39-C40<0) * (C39-C40) +3.6889 * (C40-C41<0) * (C40-C41) +3.4254 * (C41-C42<0) * (C41-C42) +3.1807 * (C42-C43<0) * (C42-C43) +2.9535 * (C43-C44<0) * (C43-C44) +2.7426 * (C44-C45<0) * (C44-C45) +2.5467 * (C45-C46<0) * (C45-C46) +2.3648 * (C46-C47<0) * (C46-C47) +2.1958 * (C47-C48<0) * (C47-C48) +2.039 * (C48-C49<0) * (C48-C49) +1.8934 * (C49-C50<0) * (C49-C50) +1.7581 * (C50-C51<0) * (C50-C51) +1.6325 * (C51-C52<0) * (C51-C52) +1.5159 * (C52-C53<0) * (C52-C53) +1.4076 * (C53-C54<0) * (C53-C54) +1.3071 * (C54-C55<0) * (C54-C55) +1.2137 * (C55-C56<0) * (C55-C56) +1.127 * (C56-C57<0) * (C56-C57) +1.0465 * (C57-C58<0) * (C57-C58) +.9718 * (C58-C59<0) * (C58-C59) +.9024 * (C59-C60<0) * (C59-C60) +.8379 * (C60-C61<0) * (C60-C61) +.7781 * (C61-C62<0) * (C61-C62) +.7225 * (C62-C63<0) * (C62-C63) +.6709 * (C63-C64<0) * (C63-C64) +.623 * (C64-C65<0) * (C64-C65) +.5785 * (C65-C66<0) * (C65-C66) +.5371 * (C66-C67<0) * (C66-C67) +.4988 * (C67-C68<0) * (C67-C68) +.4632 * (C68-C69<0) * (C68-C69) +.4301 * (C69-C70<0) * (C69-C70) +.3994 * (C70-C71<0) * (C70-C71) +.3708 * (C71-C72<0) * (C71-C72) +.3443 * (C72-C73<0) * (C72-C73) +.3197 * (C73-C74<0) * (C73-C74) +.2969 * (C74-C75<0) * (C74-C75) +.2757 * (C75-C76<0) * (C75-C76) +.256 * (C76-C77<0) * (C76-C77) +.2377 * (C77-C78<0) * (C77-C78) +.2207 * (C78-C79<0) * (C78-C79) +.205 * (C79-C80<0) * (C79-C80) +.1903 * (C80-C81<0) * (C80-C81) +.1767 * (C81-C82<0) * (C81-C82) +.1641 * (C82-C83<0) * (C82-C83) +.1524 * (C83-C84<0) * (C83-C84) +.1415 * (C84-C85<0) * (C84-C85) +.1314 * (C85-C86<0) * (C85-C86) +.122 * (C86-C87<0) * (C86-C87) +.1133 * (C87-C88<0) * (C87-C88) +.1052 * (C88-C89<0) * (C88-C89) +.0977 * (C89-C90<0) * (C89-C90) +.0907 * (C90-C91<0) * (C90-C91) +.0842 * (C91-C92<0) * (C91-C92) +.0782 * (C92-C93<0) * (C92-C93))))

==========================================

Final illustration, to show the importance of the 93 bars to get decent accuracy ... here is the same formula, but only taken out to 10% accuracy, which still requires 32 bars for a 14-period true Wilders RSI. Below that (separated by a line of ==='s), I've posted the formula for 1% accuracy, which requires 63 bars.

100 - ( 100 / ( 1 + ( -.7878 * (C0-C1>0) * (C0-C1) -.7316 * (C1-C2>0) * (C1-C2) -.6793 * (C2-C3>0) * (C2-C3) -.6308 * (C3-C4>0) * (C3-C4) -.5857 * (C4-C5>0) * (C4-C5) -.5439 * (C5-C6>0) * (C5-C6) -.505 * (C6-C7>0) * (C6-C7) -.469 * (C7-C8>0) * (C7-C8) -.4355 * (C8-C9>0) * (C8-C9) -.4044 * (C9-C10>0) * (C9-C10) -.3755 * (C10-C11>0) * (C10-C11) -.3487 * (C11-C12>0) * (C11-C12) -.3238 * (C12-C13>0) * (C12-C13) -.3006 * (C13-C14>0) * (C13-C14) -.2792 * (C14-C15>0) * (C14-C15) -.2592 * (C15-C16>0) * (C15-C16) -.2407 * (C16-C17>0) * (C16-C17) -.2235 * (C17-C18>0) * (C17-C18) -.2075 * (C18-C19>0) * (C18-C19) -.1927 * (C19-C20>0) * (C19-C20) -.179 * (C20-C21>0) * (C20-C21) -.1662 * (C21-C22>0) * (C21-C22) -.1543 * (C22-C23>0) * (C22-C23) -.1433 * (C23-C24>0) * (C23-C24) -.133 * (C24-C25>0) * (C24-C25) -.1235 * (C25-C26>0) * (C25-C26) -.1147 * (C26-C27>0) * (C26-C27) -.1065 * (C27-C28>0) * (C27-C28) -.0989 * (C28-C29>0) * (C28-C29) -.0918 * (C29-C30>0) * (C29-C30) -.0853 * (C30-C31>0) * (C30-C31) ) / ( .7878 * (C0-C1<0) * (C0-C1) +.7316 * (C1-C2<0) * (C1-C2) +.6793 * (C2-C3<0) * (C2-C3) +.6308 * (C3-C4<0) * (C3-C4) +.5857 * (C4-C5<0) * (C4-C5) +.5439 * (C5-C6<0) * (C5-C6) +.505 * (C6-C7<0) * (C6-C7) +.469 * (C7-C8<0) * (C7-C8) +.4355 * (C8-C9<0) * (C8-C9) +.4044 * (C9-C10<0) * (C9-C10) +.3755 * (C10-C11<0) * (C10-C11) +.3487 * (C11-C12<0) * (C11-C12) +.3238 * (C12-C13<0) * (C12-C13) +.3006 * (C13-C14<0) * (C13-C14) +.2792 * (C14-C15<0) * (C14-C15) +.2592 * (C15-C16<0) * (C15-C16) +.2407 * (C16-C17<0) * (C16-C17) +.2235 * (C17-C18<0) * (C17-C18) +.2075 * (C18-C19<0) * (C18-C19) +.1927 * (C19-C20<0) * (C19-C20) +.179 * (C20-C21<0) * (C20-C21) +.1662 * (C21-C22<0) * (C21-C22) +.1543 * (C22-C23<0) * (C22-C23) +.1433 * (C23-C24<0) * (C23-C24) +.133 * (C24-C25<0) * (C24-C25) +.1235 * (C25-C26<0) * (C25-C26) +.1147 * (C26-C27<0) * (C26-C27) +.1065 * (C27-C28<0) * (C27-C28) +.0989 * (C28-C29<0) * (C28-C29) +.0918 * (C29-C30<0) * (C29-C30) +.0853 * (C30-C31<0) * (C30-C31))))

===== 10% above, 1% below ===============================

100 - ( 100 / ( 1 + ( -7.2105 * (C0-C1>0) * (C0-C1) -6.6955 * (C1-C2>0) * (C1-C2) -6.2172 * (C2-C3>0) * (C2-C3) -5.7731 * (C3-C4>0) * (C3-C4) -5.3608 * (C4-C5>0) * (C4-C5) -4.9779 * (C5-C6>0) * (C5-C6) -4.6223 * (C6-C7>0) * (C6-C7) -4.2921 * (C7-C8>0) * (C7-C8) -3.9856 * (C8-C9>0) * (C8-C9) -3.7009 * (C9-C10>0) * (C9-C10) -3.4365 * (C10-C11>0) * (C10-C11) -3.1911 * (C11-C12>0) * (C11-C12) -2.9631 * (C12-C13>0) * (C12-C13) -2.7515 * (C13-C14>0) * (C13-C14) -2.5549 * (C14-C15>0) * (C14-C15) -2.3724 * (C15-C16>0) * (C15-C16) -2.203 * (C16-C17>0) * (C16-C17) -2.0456 * (C17-C18>0) * (C17-C18) -1.8995 * (C18-C19>0) * (C18-C19) -1.7638 * (C19-C20>0) * (C19-C20) -1.6378 * (C20-C21>0) * (C20-C21) -1.5209 * (C21-C22>0) * (C21-C22) -1.4122 * (C22-C23>0) * (C22-C23) -1.3114 * (C23-C24>0) * (C23-C24) -1.2177 * (C24-C25>0) * (C24-C25) -1.1307 * (C25-C26>0) * (C25-C26) -1.0499 * (C26-C27>0) * (C26-C27) -.9749 * (C27-C28>0) * (C27-C28) -.9053 * (C28-C29>0) * (C28-C29) -.8406 * (C29-C30>0) * (C29-C30) -.7806 * (C30-C31>0) * (C30-C31) -.7248 * (C31-C32>0) * (C31-C32) -.6731 * (C32-C33>0) * (C32-C33) -.625 * (C33-C34>0) * (C33-C34) -.5803 * (C34-C35>0) * (C34-C35) -.5389 * (C35-C36>0) * (C35-C36) -.5004 * (C36-C37>0) * (C36-C37) -.4647 * (C37-C38>0) * (C37-C38) -.4315 * (C38-C39>0) * (C38-C39) -.4006 * (C39-C40>0) * (C39-C40) -.372 * (C40-C41>0) * (C40-C41) -.3455 * (C41-C42>0) * (C41-C42) -.3208 * (C42-C43>0) * (C42-C43) -.2979 * (C43-C44>0) * (C43-C44) -.2766 * (C44-C45>0) * (C44-C45) -.2568 * (C45-C46>0) * (C45-C46) -.2385 * (C46-C47>0) * (C46-C47) -.2215 * (C47-C48>0) * (C47-C48) -.2056 * (C48-C49>0) * (C48-C49) -.1909 * (C49-C50>0) * (C49-C50) -.1773 * (C50-C51>0) * (C50-C51) -.1646 * (C51-C52>0) * (C51-C52) -.1529 * (C52-C53>0) * (C52-C53) -.142 * (C53-C54>0) * (C53-C54) -.1318 * (C54-C55>0) * (C54-C55) -.1224 * (C55-C56>0) * (C55-C56) -.1137 * (C56-C57>0) * (C56-C57) -.1055 * (C57-C58>0) * (C57-C58) -.098 * (C58-C59>0) * (C58-C59) -.091 * (C59-C60>0) * (C59-C60) -.0845 * (C60-C61>0) * (C60-C61) -.0785 * (C61-C62>0) * (C61-C62) ) / ( 7.2105 * (C0-C1<0) * (C0-C1) +6.6955 * (C1-C2<0) * (C1-C2) +6.2172 * (C2-C3<0) * (C2-C3) +5.7731 * (C3-C4<0) * (C3-C4) +5.3608 * (C4-C5<0) * (C4-C5) +4.9779 * (C5-C6<0) * (C5-C6) +4.6223 * (C6-C7<0) * (C6-C7) +4.2921 * (C7-C8<0) * (C7-C8) +3.9856 * (C8-C9<0) * (C8-C9) +3.7009 * (C9-C10<0) * (C9-C10) +3.4365 * (C10-C11<0) * (C10-C11) +3.1911 * (C11-C12<0) * (C11-C12) +2.9631 * (C12-C13<0) * (C12-C13) +2.7515 * (C13-C14<0) * (C13-C14) +2.5549 * (C14-C15<0) * (C14-C15) +2.3724 * (C15-C16<0) * (C15-C16) +2.203 * (C16-C17<0) * (C16-C17) +2.0456 * (C17-C18<0) * (C17-C18) +1.8995 * (C18-C19<0) * (C18-C19) +1.7638 * (C19-C20<0) * (C19-C20) +1.6378 * (C20-C21<0) * (C20-C21) +1.5209 * (C21-C22<0) * (C21-C22) +1.4122 * (C22-C23<0) * (C22-C23) +1.3114 * (C23-C24<0) * (C23-C24) +1.2177 * (C24-C25<0) * (C24-C25) +1.1307 * (C25-C26<0) * (C25-C26) +1.0499 * (C26-C27<0) * (C26-C27) +.9749 * (C27-C28<0) * (C27-C28) +.9053 * (C28-C29<0) * (C28-C29) +.8406 * (C29-C30<0) * (C29-C30) +.7806 * (C30-C31<0) * (C30-C31) +.7248 * (C31-C32<0) * (C31-C32) +.6731 * (C32-C33<0) * (C32-C33) +.625 * (C33-C34<0) * (C33-C34) +.5803 * (C34-C35<0) * (C34-C35) +.5389 * (C35-C36<0) * (C35-C36) +.5004 * (C36-C37<0) * (C36-C37) +.4647 * (C37-C38<0) * (C37-C38) +.4315 * (C38-C39<0) * (C38-C39) +.4006 * (C39-C40<0) * (C39-C40) +.372 * (C40-C41<0) * (C40-C41) +.3455 * (C41-C42<0) * (C41-C42) +.3208 * (C42-C43<0) * (C42-C43) +.2979 * (C43-C44<0) * (C43-C44) +.2766 * (C44-C45<0) * (C44-C45) +.2568 * (C45-C46<0) * (C45-C46) +.2385 * (C46-C47<0) * (C46-C47) +.2215 * (C47-C48<0) * (C47-C48) +.2056 * (C48-C49<0) * (C48-C49) +.1909 * (C49-C50<0) * (C49-C50) +.1773 * (C50-C51<0) * (C50-C51) +.1646 * (C51-C52<0) * (C51-C52) +.1529 * (C52-C53<0) * (C52-C53) +.142 * (C53-C54<0) * (C53-C54) +.1318 * (C54-C55<0) * (C54-C55) +.1224 * (C55-C56<0) * (C55-C56) +.1137 * (C56-C57<0) * (C56-C57) +.1055 * (C57-C58<0) * (C57-C58) +.098 * (C58-C59<0) * (C58-C59) +.091 * (C59-C60<0) * (C59-C60) +.0845 * (C60-C61<0) * (C60-C61) +.0785 * (C61-C62<0) * (C61-C62))))

================================================

Here is a pure-Wilder 2-day RSI, with <0.1% error:

100 - ( 100 / ( 1 + ( -66.6972 * (C0-C1>0) * (C0-C1) -22.2324 * (C1-C2>0) * (C1-C2) -7.4108 * (C2-C3>0) * (C2-C3) -2.4703 * (C3-C4>0) * (C3-C4) -.8234 * (C4-C5>0) * (C4-C5) -.2745 * (C5-C6>0) * (C5-C6) ) / ( 66.6972 * (C0-C1<0) * (C0-C1) +22.2324 * (C1-C2<0) * (C1-C2) +7.4108 * (C2-C3<0) * (C2-C3) +2.4703 * (C3-C4<0) * (C3-C4) +.8234 * (C4-C5<0) * (C4-C5) +.2745 * (C5-C6<0) * (C5-C6))))

Same thing, for yesterday:

100 - ( 100 / ( 1 + ( -66.6972 * (C1-C2>0) * (C1-C2) -22.2324 * (C2-C3>0) * (C2-C3) -7.4108 * (C3-C4>0) * (C3-C4) -2.4703 * (C4-C5>0) * (C4-C5) -.8234 * (C5-C6>0) * (C5-C6) -.2745 * (C6-C7>0) * (C6-C7) ) / ( 66.6972 * (C1-C2<0) * (C1-C2) +22.2324 * (C2-C3<0) * (C2-C3) +7.4108 * (C3-C4<0) * (C3-C4) +2.4703 * (C4-C5<0) * (C4-C5) +.8234 * (C5-C6<0) * (C5-C6) +.2745 * (C6-C7<0) * (C6-C7))))

And for the day before (I'm sure you are seeing the pattern here ...):

100 - ( 100 / ( 1 + ( -66.6972 * (C2-C3>0) * (C2-C3) -22.2324 * (C3-C4>0) * (C3-C4) -7.4108 * (C4-C5>0) * (C4-C5) -2.4703 * (C5-C6>0) * (C5-C6) -.8234 * (C6-C7>0) * (C6-C7) -.2745 * (C7-C8>0) * (C7-C8) ) / ( 66.6972 * (C2-C3<0) * (C2-C3) +22.2324 * (C3-C4<0) * (C3-C4) +7.4108 * (C4-C5<0) * (C4-C5) +2.4703 * (C5-C6<0) * (C5-C6) +.8234 * (C6-C7<0) * (C6-C7) +.2745 * (C7-C8<0) * (C7-C8))))

Please keep in mind that PCF's are for DAILY bars. You can't easily flip them to weekly or whatever like you can do with charts ... that's one of the reasons why the new SortBy functions are so powerful. However, if you really need to have the true Wilder RSI for weekly, the PCF's above can be readily adjusted for it ... here is the 2-period true-Wilder RSI, <0.1% error, for 5-day bars, current value:

100 - ( 100 / ( 1 + ( -66.6972 * (C0-C5>0) * (C0-C5) -22.2324 * (C5-C10>0) * (C5-C10) -7.4108 * (C10-C15>0) * (C10-C15) -2.4703 * (C15-C20>0) * (C15-C20) -.8234 * (C20-C25>0) * (C20-C25) -.2745 * (C25-C30>0) * (C25-C30) ) / ( 66.6972 * (C0-C5<0) * (C0-C5) +22.2324 * (C5-C10<0) * (C5-C10) +7.4108 * (C10-C15<0) * (C10-C15) +2.4703 * (C15-C20<0) * (C15-C20) +.8234 * (C20-C25<0) * (C20-C25) +.2745 * (C25-C30<0) * (C25-C30))))

I trust that will show you the "pattern" for adjusting to other N-day bar variations.

Jim Dean


GoodFortune
Posted : Friday, March 4, 2005 11:26:41 PM
Registered User
Joined: 10/7/2004
Posts: 14
I have been following your discussion with interest.
I am interested in a PCF for the Worden version of 5 week RSI. Is this less complicated than the Wilder version of the 5 week RSI?
Thanks Jim for your attention.

Stephen .
Tanstaafl
Posted : Saturday, March 5, 2005 1:14:21 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Nope, sorry Stephen, there's no simple way to do a PCF that exactly matches the Worden version of the RSI, for anything other than a daily-bar basis. The reason is that Worden has not fully documented their method of calculating the RSI ... it supposedly uses internal exponential smoothing in lieu of true Wilder's smoothing, but even when I model it with exponential smoothing in an expanded series, it does not seem to match up with the plots.

For example, I have provided (below) an RSI5 PCF for daily bars, based on internal Exponential smoothing with <0.01% error. Plot it as a custom indicator on a chart, then plot TC's native RSI5 *without* the Wilder's smoothing box checked on the same pane. You will readily see that the two do not match up. If W would tell me the internal calc formula, I could modify the Excel PCF expansion to match ... but I really don't see much benefit in doing that, since IMO the True Wilder RSI is the only one really worth using.

Finally, I've provided a True Wilder's RSI5 at the end, for comparison purposes. Plot it on the top pane along with a TC native Wilders-Smoothed RSI5. The plots are similar, but on different scales, so the Custom Indic looks "stretched". Now turn on the pointer-databox and compare the actual values ... you will see that they agree with <0.1% error.

Jim Dean

Here is the Exponential RSI5 with <0.01% error:
100 - ( 100 / ( 1 + ( -333.363 * (C0-C1>0) * (C0-C1) -222.242 * (C1-C2>0) * (C1-C2) -148.1614 * (C2-C3>0) * (C2-C3) -98.7742 * (C3-C4>0) * (C3-C4) -65.8495 * (C4-C5>0) * (C4-C5) -43.8997 * (C5-C6>0) * (C5-C6) -29.2664 * (C6-C7>0) * (C6-C7) -19.511 * (C7-C8>0) * (C7-C8) -13.0073 * (C8-C9>0) * (C8-C9) -8.6715 * (C9-C10>0) * (C9-C10) -5.781 * (C10-C11>0) * (C10-C11) -3.854 * (C11-C12>0) * (C11-C12) -2.5693 * (C12-C13>0) * (C12-C13) -1.7129 * (C13-C14>0) * (C13-C14) -1.1419 * (C14-C15>0) * (C14-C15) -.7613 * (C15-C16>0) * (C15-C16) -.5075 * (C16-C17>0) * (C16-C17) -.3383 * (C17-C18>0) * (C17-C18) -.2256 * (C18-C19>0) * (C18-C19) -.1504 * (C19-C20>0) * (C19-C20) -.1003 * (C20-C21>0) * (C20-C21) -.0668 * (C21-C22>0) * (C21-C22) ) / ( 333.363 * (C0-C1<0) * (C0-C1) +222.242 * (C1-C2<0) * (C1-C2) +148.1614 * (C2-C3<0) * (C2-C3) +98.7742 * (C3-C4<0) * (C3-C4) +65.8495 * (C4-C5<0) * (C4-C5) +43.8997 * (C5-C6<0) * (C5-C6) +29.2664 * (C6-C7<0) * (C6-C7) +19.511 * (C7-C8<0) * (C7-C8) +13.0073 * (C8-C9<0) * (C8-C9) +8.6715 * (C9-C10<0) * (C9-C10) +5.781 * (C10-C11<0) * (C10-C11) +3.854 * (C11-C12<0) * (C11-C12) +2.5693 * (C12-C13<0) * (C12-C13) +1.7129 * (C13-C14<0) * (C13-C14) +1.1419 * (C14-C15<0) * (C14-C15) +.7613 * (C15-C16<0) * (C15-C16) +.5075 * (C16-C17<0) * (C16-C17) +.3383 * (C17-C18<0) * (C17-C18) +.2256 * (C18-C19<0) * (C18-C19) +.1504 * (C19-C20<0) * (C19-C20) +.1003 * (C20-C21<0) * (C20-C21) +.0668 * (C21-C22<0) * (C21-C22))))

And here is the Wilder RSI5 with <0.1% error:
100 - ( 100 / ( 1 + ( -20.0198 * (C0-C1>0) * (C0-C1) -16.0159 * (C1-C2>0) * (C1-C2) -12.8127 * (C2-C3>0) * (C2-C3) -10.2502 * (C3-C4>0) * (C3-C4) -8.2001 * (C4-C5>0) * (C4-C5) -6.5601 * (C5-C6>0) * (C5-C6) -5.2481 * (C6-C7>0) * (C6-C7) -4.1985 * (C7-C8>0) * (C7-C8) -3.3588 * (C8-C9>0) * (C8-C9) -2.687 * (C9-C10>0) * (C9-C10) -2.1496 * (C10-C11>0) * (C10-C11) -1.7197 * (C11-C12>0) * (C11-C12) -1.3758 * (C12-C13>0) * (C12-C13) -1.1006 * (C13-C14>0) * (C13-C14) -.8805 * (C14-C15>0) * (C14-C15) -.7044 * (C15-C16>0) * (C15-C16) -.5635 * (C16-C17>0) * (C16-C17) -.4508 * (C17-C18>0) * (C17-C18) -.3606 * (C18-C19>0) * (C18-C19) -.2885 * (C19-C20>0) * (C19-C20) -.2308 * (C20-C21>0) * (C20-C21) -.1847 * (C21-C22>0) * (C21-C22) -.1477 * (C22-C23>0) * (C22-C23) -.1182 * (C23-C24>0) * (C23-C24) -.0945 * (C24-C25>0) * (C24-C25) -.0756 * (C25-C26>0) * (C25-C26) -.0605 * (C26-C27>0) * (C26-C27) -.0484 * (C27-C28>0) * (C27-C28) -.0387 * (C28-C29>0) * (C28-C29) -.031 * (C29-C30>0) * (C29-C30) ) / ( 20.0198 * (C0-C1<0) * (C0-C1) +16.0159 * (C1-C2<0) * (C1-C2) +12.8127 * (C2-C3<0) * (C2-C3) +10.2502 * (C3-C4<0) * (C3-C4) +8.2001 * (C4-C5<0) * (C4-C5) +6.5601 * (C5-C6<0) * (C5-C6) +5.2481 * (C6-C7<0) * (C6-C7) +4.1985 * (C7-C8<0) * (C7-C8) +3.3588 * (C8-C9<0) * (C8-C9) +2.687 * (C9-C10<0) * (C9-C10) +2.1496 * (C10-C11<0) * (C10-C11) +1.7197 * (C11-C12<0) * (C11-C12) +1.3758 * (C12-C13<0) * (C12-C13) +1.1006 * (C13-C14<0) * (C13-C14) +.8805 * (C14-C15<0) * (C14-C15) +.7044 * (C15-C16<0) * (C15-C16) +.5635 * (C16-C17<0) * (C16-C17) +.4508 * (C17-C18<0) * (C17-C18) +.3606 * (C18-C19<0) * (C18-C19) +.2885 * (C19-C20<0) * (C19-C20) +.2308 * (C20-C21<0) * (C20-C21) +.1847 * (C21-C22<0) * (C21-C22) +.1477 * (C22-C23<0) * (C22-C23) +.1182 * (C23-C24<0) * (C23-C24) +.0945 * (C24-C25<0) * (C24-C25) +.0756 * (C25-C26<0) * (C25-C26) +.0605 * (C26-C27<0) * (C26-C27) +.0484 * (C27-C28<0) * (C27-C28) +.0387 * (C28-C29<0) * (C28-C29) +.031 * (C29-C30<0) * (C29-C30))))


GoodFortune
Posted : Saturday, March 5, 2005 11:17:27 AM
Registered User
Joined: 10/7/2004
Posts: 14
Jim,

Thanks for a good explanation of the issues.
I presume that to convert the above Wilder daily RSI5 to weekly RSI5 , one needs to convert C1 to C5, C2 to C10 and so on.

Thanks,

Stephen
Tanstaafl
Posted : Saturday, March 5, 2005 2:16:10 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
You got it, Stephen. You're welcome!

Jim Dean

nibor100
Posted : Monday, March 7, 2005 12:48:00 PM
Gold Customer Gold Customer

Joined: 1/2/2005
Posts: 44
Tanstaafl,

Regarding using PCFs in custom chart indicators, I recently found out through a Worden support chat session that some of the provided indicators (I believe the one I was exploring at that time was Moneystream Surge-1 week) are calculated and provided in our update downloads; but, when used in a PCF/custom indicator the TC2005 beta software is using approximations for all new calculations because it saves processing time for us users.

That may help explain why some of your criteria testing doesn't result in matching charts.

I suspect you already know this, but just in case...

Ed S.
Tanstaafl
Posted : Monday, March 7, 2005 1:18:34 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Ed:

I am certain of my explanations regarding RSI (as far as they go) ... in winter 2003 I provided the details to the W programmer who actually created the "true Wilders" internal calcs (and for that matter, the corrected calcs for ADX). They acknowledged that their native RSI was different, saying it was somehow exponentially smoothed, but never gave me a specific formula, so I cannot create a matching expansion.

As for the Moneystream issue, since that is a proprietary Worden indicator, I cannot comment on it too much. However, I really doubt that the PCF MS function differs from the plotted MS function (or from the TCDK MS function call) ... it's only reasonable that the same internal subroutine would be used for all three.

I have a PCF formula, developed by experimentation and observation (which I will NOT share), that seems to be a *very accurate* approximation of MS ... you can lay it on top of the internally-based plot and not see any discrepancies. It still seems to work the same in TC2005 as it did in TC2004, so that gives me strong reason to believe that NO changes have been made to the internal MS calcs.

HOWEVER, there have been a couple of changes (for the better) in the way that EasyScan works re rankings and values, and the way that the "canned" technicals such as MS surge are handled in TC2005, vs TC2004. There MAY be discrepancies there ... but AFAIK, the TC2005 are MORE accurate and MORE reliable as a result of these fixes.

Maybe this will help clarify the issue a bit.

Jim Dean

nibor100
Posted : Monday, March 7, 2005 3:53:22 PM
Gold Customer Gold Customer

Joined: 1/2/2005
Posts: 44
Jim,

Is AFAIK "After all is considered"?

I'm away from my TC2005 machine, but if I recall correctly I had MSFT in a watchlist and made Moneystream surge 1-week a column heading and sorted by that column so it would show the MS surge 1-week values.

Then, I created a custom indicator in the top chart window (so I could see its values using the second "." mode that displays the value box in the upper left, allowing me to see numerical values moving back in time)

I used the PCF for MS surge 1-week provided in the formula box of the custom indicator window. The values generated did not match the watchlist column values for me, nor for the Worden support guys when they replicated my scenario, whence I got the approximation explanation.

I'll double check it this evening to make sure I'm remembering the situation correctly. I'd hate to be inconsistent reporting an inconsistency.

Ed S.

StockGuy
Posted : Monday, March 7, 2005 3:56:26 PM

Administration

Joined: 9/30/2004
Posts: 9,187
nibor100,

We were able to duplicate what you're seeing. I'm just waiting on feedback from development as to why this might be happening.

AFAIK = as far as I know.
nibor100
Posted : Wednesday, March 9, 2005 5:37:36 PM
Gold Customer Gold Customer

Joined: 1/2/2005
Posts: 44
StockGuy,

Will you be posting development's response?
Thanks,
Ed S.
Cesar
Posted : Monday, March 14, 2005 11:02:40 PM
Registered User
Joined: 10/7/2004
Posts: 5
Jim,

Thank you for posting the formula for the 2 period RSI. I was having nightmares thinking that I was going to do it myself. I tried entering your 2period RSI formula as a PCF but the numbers that it gives me are different by a significant amount than I get from other charting packages. Have you double checked it? Any ideas of what I might be doing wrong?

Can you explain how you generate the formula? I will eventually want to do a 3 period RSI.

Thank you,
Cesar
Tanstaafl
Posted : Tuesday, March 15, 2005 11:18:05 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Cesar:

Egad! You're right.

Prior to doing my posting above, I "cleaned up" the spreadsheet that generates the PCF's ... and accidentally chopped off the final term in the process. That's why you were seeing the errors. So, here are the corrections - they match up with the plotted RSI2 when the "Use Wilder's Smoothing" is checked. VERY SORRY about the problem:

Here is a pure-Wilder 2-day RSI, with <0.1% error:

100 - ( 100 / ( 1 + ( -5.0394 * (C0-C1>0) * (C0-C1) -2.5197 * (C1-C2>0) * (C1-C2) -1.2598 * (C2-C3>0) * (C2-C3) -.6299 * (C3-C4>0) * (C3-C4) -.315 * (C4-C5>0) * (C4-C5) -.1575 * (C5-C6>0) * (C5-C6) -.0787 * (C6-C7>0) * (C6-C7) ) / ( +5.0394 * (C0-C1<0) * (C0-C1) +2.5197 * (C1-C2<0) * (C1-C2) +1.2598 * (C2-C3<0) * (C2-C3) +.6299 * (C3-C4<0) * (C3-C4) +.315 * (C4-C5<0) * (C4-C5) +.1575 * (C5-C6<0) * (C5-C6) +.0787 * (C6-C7<0) * (C6-C7))))


Same thing, for yesterday:

100 - ( 100 / ( 1 + ( -50.0489 * (C1-C2>0) * (C1-C2) -25.0244 * (C2-C3>0) * (C2-C3) -12.5122 * (C3-C4>0) * (C3-C4) -6.2561 * (C4-C5>0) * (C4-C5) -3.1281 * (C5-C6>0) * (C5-C6) -1.564 * (C6-C7>0) * (C6-C7) -.782 * (C7-C8>0) * (C7-C8) -.391 * (C8-C9>0) * (C8-C9) -.1955 * (C9-C10>0) * (C9-C10) -.0978 * (C10-C11>0) * (C10-C11) ) / ( 50.0489 * (C1-C2<0) * (C1-C2) +25.0244 * (C2-C3<0) * (C2-C3) +12.5122 * (C3-C4<0) * (C3-C4) +6.2561 * (C4-C5<0) * (C4-C5) +3.1281 * (C5-C6<0) * (C5-C6) +1.564 * (C6-C7<0) * (C6-C7) +.782 * (C7-C8<0) * (C7-C8) +.391 * (C8-C9<0) * (C8-C9) +.1955 * (C9-C10<0) * (C9-C10) +.0978 * (C10-C11<0) * (C10-C11))))

I suspect you can figure out from there how to adjust it for other daysago before yesterday.


Here's another version of the RSI2, based on WEEKLY (5-day) bars:

100 - ( 100 / ( 1 + ( -50.0489 * (C5-C10>0) * (C5-C10) -25.0244 * (C10-C15>0) * (C10-C15) -12.5122 * (C15-C20>0) * (C15-C20) -6.2561 * (C20-C25>0) * (C20-C25) -3.1281 * (C25-C30>0) * (C25-C30) -1.564 * (C30-C35>0) * (C30-C35) -.782 * (C35-C40>0) * (C35-C40) -.391 * (C40-C45>0) * (C40-C45) -.1955 * (C45-C50>0) * (C45-C50) -.0978 * (C50-C55>0) * (C50-C55) ) / ( 50.0489 * (C5-C10<0) * (C5-C10) +25.0244 * (C10-C15<0) * (C10-C15) +12.5122 * (C15-C20<0) * (C15-C20) +6.2561 * (C20-C25<0) * (C20-C25) +3.1281 * (C25-C30<0) * (C25-C30) +1.564 * (C30-C35<0) * (C30-C35) +.782 * (C35-C40<0) * (C35-C40) +.391 * (C40-C45<0) * (C40-C45) +.1955 * (C45-C50<0) * (C45-C50) +.0978 * (C50-C55<0) * (C50-C55))))

Again, I suspect you can figure out from that how to adjust it for other N-day bars (or for prior barsago).


Here's the 3-day that you requested (again, within 0.1% error):

100 - ( 100 / ( 1 + ( -33.3559 * (C0-C1>0) * (C0-C1) -22.2373 * (C1-C2>0) * (C1-C2) -14.8248 * (C2-C3>0) * (C2-C3) -9.8832 * (C3-C4>0) * (C3-C4) -6.5888 * (C4-C5>0) * (C4-C5) -4.3925 * (C5-C6>0) * (C5-C6) -2.9284 * (C6-C7>0) * (C6-C7) -1.9522 * (C7-C8>0) * (C7-C8) -1.3015 * (C8-C9>0) * (C8-C9) -.8677 * (C9-C10>0) * (C9-C10) -.5784 * (C10-C11>0) * (C10-C11) -.3856 * (C11-C12>0) * (C11-C12) -.2571 * (C12-C13>0) * (C12-C13) -.1714 * (C13-C14>0) * (C13-C14) -.1143 * (C14-C15>0) * (C14-C15) -.0762 * (C15-C16>0) * (C15-C16) -.0508 * (C16-C17>0) * (C16-C17) -.0339 * (C17-C18>0) * (C17-C18) ) / ( 33.3559 * (C0-C1<0) * (C0-C1) +22.2373 * (C1-C2<0) * (C1-C2) +14.8248 * (C2-C3<0) * (C2-C3) +9.8832 * (C3-C4<0) * (C3-C4) +6.5888 * (C4-C5<0) * (C4-C5) +4.3925 * (C5-C6<0) * (C5-C6) +2.9284 * (C6-C7<0) * (C6-C7) +1.9522 * (C7-C8<0) * (C7-C8) +1.3015 * (C8-C9<0) * (C8-C9) +.8677 * (C9-C10<0) * (C9-C10) +.5784 * (C10-C11<0) * (C10-C11) +.3856 * (C11-C12<0) * (C11-C12) +.2571 * (C12-C13<0) * (C12-C13) +.1714 * (C13-C14<0) * (C13-C14) +.1143 * (C14-C15<0) * (C14-C15) +.0762 * (C15-C16<0) * (C15-C16) +.0508 * (C16-C17<0) * (C16-C17) +.0339 * (C17-C18<0) * (C17-C18))))


Finally, here is a corrected equation for the RSI14 with <0.1% error, daily bars, using Wilder's smoothing:

100 - ( 100 / ( 1 + ( -71.496 * (C0-C1>0) * (C0-C1) -66.3892 * (C1-C2>0) * (C1-C2) -61.6471 * (C2-C3>0) * (C2-C3) -57.2437 * (C3-C4>0) * (C3-C4) -53.1549 * (C4-C5>0) * (C4-C5) -49.3581 * (C5-C6>0) * (C5-C6) -45.8325 * (C6-C7>0) * (C6-C7) -42.5588 * (C7-C8>0) * (C7-C8) -39.5189 * (C8-C9>0) * (C8-C9) -36.6961 * (C9-C10>0) * (C9-C10) -34.0749 * (C10-C11>0) * (C10-C11) -31.641 * (C11-C12>0) * (C11-C12) -29.3809 * (C12-C13>0) * (C12-C13) -27.2823 * (C13-C14>0) * (C13-C14) -25.3336 * (C14-C15>0) * (C14-C15) -23.524 * (C15-C16>0) * (C15-C16) -21.8437 * (C16-C17>0) * (C16-C17) -20.2835 * (C17-C18>0) * (C17-C18) -18.8346 * (C18-C19>0) * (C18-C19) -17.4893 * (C19-C20>0) * (C19-C20) -16.2401 * (C20-C21>0) * (C20-C21) -15.0801 * (C21-C22>0) * (C21-C22) -14.0029 * (C22-C23>0) * (C22-C23) -13.0027 * (C23-C24>0) * (C23-C24) -12.074 * (C24-C25>0) * (C24-C25) -11.2115 * (C25-C26>0) * (C25-C26) -10.4107 * (C26-C27>0) * (C26-C27) -9.6671 * (C27-C28>0) * (C27-C28) -8.9766 * (C28-C29>0) * (C28-C29) -8.3354 * (C29-C30>0) * (C29-C30) -7.74 * (C30-C31>0) * (C30-C31) -7.1871 * (C31-C32>0) * (C31-C32) -6.6738 * (C32-C33>0) * (C32-C33) -6.1971 * (C33-C34>0) * (C33-C34) -5.7544 * (C34-C35>0) * (C34-C35) -5.3434 * (C35-C36>0) * (C35-C36) -4.9617 * (C36-C37>0) * (C36-C37) -4.6073 * (C37-C38>0) * (C37-C38) -4.2782 * (C38-C39>0) * (C38-C39) -3.9726 * (C39-C40>0) * (C39-C40) -3.6889 * (C40-C41>0) * (C40-C41) -3.4254 * (C41-C42>0) * (C41-C42) -3.1807 * (C42-C43>0) * (C42-C43) -2.9535 * (C43-C44>0) * (C43-C44) -2.7426 * (C44-C45>0) * (C44-C45) -2.5467 * (C45-C46>0) * (C45-C46) -2.3648 * (C46-C47>0) * (C46-C47) -2.1958 * (C47-C48>0) * (C47-C48) -2.039 * (C48-C49>0) * (C48-C49) -1.8934 * (C49-C50>0) * (C49-C50) -1.7581 * (C50-C51>0) * (C50-C51) -1.6325 * (C51-C52>0) * (C51-C52) -1.5159 * (C52-C53>0) * (C52-C53) -1.4076 * (C53-C54>0) * (C53-C54) -1.3071 * (C54-C55>0) * (C54-C55) -1.2137 * (C55-C56>0) * (C55-C56) -1.127 * (C56-C57>0) * (C56-C57) -1.0465 * (C57-C58>0) * (C57-C58) -.9718 * (C58-C59>0) * (C58-C59) -.9024 * (C59-C60>0) * (C59-C60) -.8379 * (C60-C61>0) * (C60-C61) -.7781 * (C61-C62>0) * (C61-C62) -.7225 * (C62-C63>0) * (C62-C63) -.6709 * (C63-C64>0) * (C63-C64) -.623 * (C64-C65>0) * (C64-C65) -.5785 * (C65-C66>0) * (C65-C66) -.5371 * (C66-C67>0) * (C66-C67) -.4988 * (C67-C68>0) * (C67-C68) -.4632 * (C68-C69>0) * (C68-C69) -.4301 * (C69-C70>0) * (C69-C70) -.3994 * (C70-C71>0) * (C70-C71) -.3708 * (C71-C72>0) * (C71-C72) -.3443 * (C72-C73>0) * (C72-C73) -.3197 * (C73-C74>0) * (C73-C74) -.2969 * (C74-C75>0) * (C74-C75) -.2757 * (C75-C76>0) * (C75-C76) -.256 * (C76-C77>0) * (C76-C77) -.2377 * (C77-C78>0) * (C77-C78) -.2207 * (C78-C79>0) * (C78-C79) -.205 * (C79-C80>0) * (C79-C80) -.1903 * (C80-C81>0) * (C80-C81) -.1767 * (C81-C82>0) * (C81-C82) -.1641 * (C82-C83>0) * (C82-C83) -.1524 * (C83-C84>0) * (C83-C84) -.1415 * (C84-C85>0) * (C84-C85) -.1314 * (C85-C86>0) * (C85-C86) -.122 * (C86-C87>0) * (C86-C87) -.1133 * (C87-C88>0) * (C87-C88) -.1052 * (C88-C89>0) * (C88-C89) -.0977 * (C89-C90>0) * (C89-C90) -.0907 * (C90-C91>0) * (C90-C91) -.0842 * (C91-C92>0) * (C91-C92) -.0782 * (C92-C93>0) * (C92-C93) -.0726 * (C93-C94>0) * (C93-C94) ) / ( 71.496 * (C0-C1<0) * (C0-C1) +66.3892 * (C1-C2<0) * (C1-C2) +61.6471 * (C2-C3<0) * (C2-C3) +57.2437 * (C3-C4<0) * (C3-C4) +53.1549 * (C4-C5<0) * (C4-C5) +49.3581 * (C5-C6<0) * (C5-C6) +45.8325 * (C6-C7<0) * (C6-C7) +42.5588 * (C7-C8<0) * (C7-C8) +39.5189 * (C8-C9<0) * (C8-C9) +36.6961 * (C9-C10<0) * (C9-C10) +34.0749 * (C10-C11<0) * (C10-C11) +31.641 * (C11-C12<0) * (C11-C12) +29.3809 * (C12-C13<0) * (C12-C13) +27.2823 * (C13-C14<0) * (C13-C14) +25.3336 * (C14-C15<0) * (C14-C15) +23.524 * (C15-C16<0) * (C15-C16) +21.8437 * (C16-C17<0) * (C16-C17) +20.2835 * (C17-C18<0) * (C17-C18) +18.8346 * (C18-C19<0) * (C18-C19) +17.4893 * (C19-C20<0) * (C19-C20) +16.2401 * (C20-C21<0) * (C20-C21) +15.0801 * (C21-C22<0) * (C21-C22) +14.0029 * (C22-C23<0) * (C22-C23) +13.0027 * (C23-C24<0) * (C23-C24) +12.074 * (C24-C25<0) * (C24-C25) +11.2115 * (C25-C26<0) * (C25-C26) +10.4107 * (C26-C27<0) * (C26-C27) +9.6671 * (C27-C28<0) * (C27-C28) +8.9766 * (C28-C29<0) * (C28-C29) +8.3354 * (C29-C30<0) * (C29-C30) +7.74 * (C30-C31<0) * (C30-C31) +7.1871 * (C31-C32<0) * (C31-C32) +6.6738 * (C32-C33<0) * (C32-C33) +6.1971 * (C33-C34<0) * (C33-C34) +5.7544 * (C34-C35<0) * (C34-C35) +5.3434 * (C35-C36<0) * (C35-C36) +4.9617 * (C36-C37<0) * (C36-C37) +4.6073 * (C37-C38<0) * (C37-C38) +4.2782 * (C38-C39<0) * (C38-C39) +3.9726 * (C39-C40<0) * (C39-C40) +3.6889 * (C40-C41<0) * (C40-C41) +3.4254 * (C41-C42<0) * (C41-C42) +3.1807 * (C42-C43<0) * (C42-C43) +2.9535 * (C43-C44<0) * (C43-C44) +2.7426 * (C44-C45<0) * (C44-C45) +2.5467 * (C45-C46<0) * (C45-C46) +2.3648 * (C46-C47<0) * (C46-C47) +2.1958 * (C47-C48<0) * (C47-C48) +2.039 * (C48-C49<0) * (C48-C49) +1.8934 * (C49-C50<0) * (C49-C50) +1.7581 * (C50-C51<0) * (C50-C51) +1.6325 * (C51-C52<0) * (C51-C52) +1.5159 * (C52-C53<0) * (C52-C53) +1.4076 * (C53-C54<0) * (C53-C54) +1.3071 * (C54-C55<0) * (C54-C55) +1.2137 * (C55-C56<0) * (C55-C56) +1.127 * (C56-C57<0) * (C56-C57) +1.0465 * (C57-C58<0) * (C57-C58) +.9718 * (C58-C59<0) * (C58-C59) +.9024 * (C59-C60<0) * (C59-C60) +.8379 * (C60-C61<0) * (C60-C61) +.7781 * (C61-C62<0) * (C61-C62) +.7225 * (C62-C63<0) * (C62-C63) +.6709 * (C63-C64<0) * (C63-C64) +.623 * (C64-C65<0) * (C64-C65) +.5785 * (C65-C66<0) * (C65-C66) +.5371 * (C66-C67<0) * (C66-C67) +.4988 * (C67-C68<0) * (C67-C68) +.4632 * (C68-C69<0) * (C68-C69) +.4301 * (C69-C70<0) * (C69-C70) +.3994 * (C70-C71<0) * (C70-C71) +.3708 * (C71-C72<0) * (C71-C72) +.3443 * (C72-C73<0) * (C72-C73) +.3197 * (C73-C74<0) * (C73-C74) +.2969 * (C74-C75<0) * (C74-C75) +.2757 * (C75-C76<0) * (C75-C76) +.256 * (C76-C77<0) * (C76-C77) +.2377 * (C77-C78<0) * (C77-C78) +.2207 * (C78-C79<0) * (C78-C79) +.205 * (C79-C80<0) * (C79-C80) +.1903 * (C80-C81<0) * (C80-C81) +.1767 * (C81-C82<0) * (C81-C82) +.1641 * (C82-C83<0) * (C82-C83) +.1524 * (C83-C84<0) * (C83-C84) +.1415 * (C84-C85<0) * (C84-C85) +.1314 * (C85-C86<0) * (C85-C86) +.122 * (C86-C87<0) * (C86-C87) +.1133 * (C87-C88<0) * (C87-C88) +.1052 * (C88-C89<0) * (C88-C89) +.0977 * (C89-C90<0) * (C89-C90) +.0907 * (C90-C91<0) * (C90-C91) +.0842 * (C91-C92<0) * (C91-C92) +.0782 * (C92-C93<0) * (C92-C93) +.0726 * (C93-C94<0) * (C93-C94))))


Sorry about the problem!

Jim Dean





Cesar
Posted : Wednesday, March 16, 2005 1:28:06 AM
Registered User
Joined: 10/7/2004
Posts: 5
Jim,

Thank you for the fix. The formula for todays 2 period RSI works. The problem I have is that it is not accurate enough for what I need. Is there a way I can get your spreadsheet such that I can create a more accurate version. Or can you tell me how to create the formula?

Also, the formula for yesterday's 2 period RSI does not look right. The constants in the formula are not the same as the ones in the todays RSI.

Thank you,
Cesar
Tanstaafl
Posted : Wednesday, March 16, 2005 7:26:09 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi Cesar:

Again, my apologies. I try to slam thru this stuff in the cracks ... unless someone pays me (which W does not allow via this forum) I don't usually go thru the entire triple-check process for every version I send, and there are enough different param's to fill in on my AutoGen sheet that I sometimes get them mixed up. Sorry bout that - TANSTAAFL!

But I am quite willing to correct things if they are pointed out to me! So ...

Here is the CHECKED and CORRECT version of the True Wilder's 2-day RSI, for TODAY, using <0.01% error (first three xx.yy digits displayed in the databox match the internal calc's - the fourth digit sometimes is off by one):

100 - ( 100 / ( 1 + ( -500.0305 * (C0-C1>0) * (C0-C1) -250.0153 * (C1-C2>0) * (C1-C2) -125.0076 * (C2-C3>0) * (C2-C3) -62.5038 * (C3-C4>0) * (C3-C4) -31.2519 * (C4-C5>0) * (C4-C5) -15.626 * (C5-C6>0) * (C5-C6) -7.813 * (C6-C7>0) * (C6-C7) -3.9065 * (C7-C8>0) * (C7-C8) -1.9532 * (C8-C9>0) * (C8-C9) -.9766 * (C9-C10>0) * (C9-C10) -.4883 * (C10-C11>0) * (C10-C11) -.2442 * (C11-C12>0) * (C11-C12) -.1221 * (C12-C13>0) * (C12-C13) -.061 * (C13-C14>0) * (C13-C14) ) / ( 500.0305 * (C0-C1<0) * (C0-C1) +250.0153 * (C1-C2<0) * (C1-C2) +125.0076 * (C2-C3<0) * (C2-C3) +62.5038 * (C3-C4<0) * (C3-C4) +31.2519 * (C4-C5<0) * (C4-C5) +15.626 * (C5-C6<0) * (C5-C6) +7.813 * (C6-C7<0) * (C6-C7) +3.9065 * (C7-C8<0) * (C7-C8) +1.9532 * (C8-C9<0) * (C8-C9) +.9766 * (C9-C10<0) * (C9-C10) +.4883 * (C10-C11<0) * (C10-C11) +.2442 * (C11-C12<0) * (C11-C12) +.1221 * (C12-C13<0) * (C12-C13) +.061 * (C13-C14<0) * (C13-C14))))


Here is the CHECKED and CORRECT version of the True Wilder's 3-day RSI, for TODAY, using <0.01% error:

100 - ( 100 / ( 1 + ( -333.363 * (C0-C1>0) * (C0-C1) -222.242 * (C1-C2>0) * (C1-C2) -148.1614 * (C2-C3>0) * (C2-C3) -98.7742 * (C3-C4>0) * (C3-C4) -65.8495 * (C4-C5>0) * (C4-C5) -43.8997 * (C5-C6>0) * (C5-C6) -29.2664 * (C6-C7>0) * (C6-C7) -19.511 * (C7-C8>0) * (C7-C8) -13.0073 * (C8-C9>0) * (C8-C9) -8.6715 * (C9-C10>0) * (C9-C10) -5.781 * (C10-C11>0) * (C10-C11) -3.854 * (C11-C12>0) * (C11-C12) -2.5693 * (C12-C13>0) * (C12-C13) -1.7129 * (C13-C14>0) * (C13-C14) -1.1419 * (C14-C15>0) * (C14-C15) -.7613 * (C15-C16>0) * (C15-C16) -.5075 * (C16-C17>0) * (C16-C17) -.3383 * (C17-C18>0) * (C17-C18) -.2256 * (C18-C19>0) * (C18-C19) -.1504 * (C19-C20>0) * (C19-C20) -.1003 * (C20-C21>0) * (C20-C21) -.0668 * (C21-C22>0) * (C21-C22) -.0446 * (C22-C23>0) * (C22-C23) ) / ( 333.363 * (C0-C1<0) * (C0-C1) +222.242 * (C1-C2<0) * (C1-C2) +148.1614 * (C2-C3<0) * (C2-C3) +98.7742 * (C3-C4<0) * (C3-C4) +65.8495 * (C4-C5<0) * (C4-C5) +43.8997 * (C5-C6<0) * (C5-C6) +29.2664 * (C6-C7<0) * (C6-C7) +19.511 * (C7-C8<0) * (C7-C8) +13.0073 * (C8-C9<0) * (C8-C9) +8.6715 * (C9-C10<0) * (C9-C10) +5.781 * (C10-C11<0) * (C10-C11) +3.854 * (C11-C12<0) * (C11-C12) +2.5693 * (C12-C13<0) * (C12-C13) +1.7129 * (C13-C14<0) * (C13-C14) +1.1419 * (C14-C15<0) * (C14-C15) +.7613 * (C15-C16<0) * (C15-C16) +.5075 * (C16-C17<0) * (C16-C17) +.3383 * (C17-C18<0) * (C17-C18) +.2256 * (C18-C19<0) * (C18-C19) +.1504 * (C19-C20<0) * (C19-C20) +.1003 * (C20-C21<0) * (C20-C21) +.0668 * (C21-C22<0) * (C21-C22) +.0446 * (C22-C23<0) * (C22-C23))))


Here is the 2-day <0.01% CHECKED and CORRECT version for YESTERDAY:

100 - ( 100 / ( 1 + ( -500.0305 * (C1-C2>0) * (C1-C2) -250.0153 * (C2-C3>0) * (C2-C3) -125.0076 * (C3-C4>0) * (C3-C4) -62.5038 * (C4-C5>0) * (C4-C5) -31.2519 * (C5-C6>0) * (C5-C6) -15.626 * (C6-C7>0) * (C6-C7) -7.813 * (C7-C8>0) * (C7-C8) -3.9065 * (C8-C9>0) * (C8-C9) -1.9532 * (C9-C10>0) * (C9-C10) -.9766 * (C10-C11>0) * (C10-C11) -.4883 * (C11-C12>0) * (C11-C12) -.2442 * (C12-C13>0) * (C12-C13) -.1221 * (C13-C14>0) * (C13-C14) -.061 * (C14-C15>0) * (C14-C15) ) / ( 500.0305 * (C1-C2<0) * (C1-C2) +250.0153 * (C2-C3<0) * (C2-C3) +125.0076 * (C3-C4<0) * (C3-C4) +62.5038 * (C4-C5<0) * (C4-C5) +31.2519 * (C5-C6<0) * (C5-C6) +15.626 * (C6-C7<0) * (C6-C7) +7.813 * (C7-C8<0) * (C7-C8) +3.9065 * (C8-C9<0) * (C8-C9) +1.9532 * (C9-C10<0) * (C9-C10) +.9766 * (C10-C11<0) * (C10-C11) +.4883 * (C11-C12<0) * (C11-C12) +.2442 * (C12-C13<0) * (C12-C13) +.1221 * (C13-C14<0) * (C13-C14) +.061 * (C14-C15<0) * (C14-C15))))

Jim Dean

P.S. I sure do wish W would allow users to edit their own past postings ... I could clean things up nicely that way. Ah, well.


Cesar
Posted : Thursday, March 17, 2005 12:42:11 AM
Registered User
Joined: 10/7/2004
Posts: 5
Jim,

The 2 period RSI worked perfectly. I have not tried the 3 period one but I assume that it will also.

Thank you so much,
Cesar
Tanstaafl
Posted : Thursday, March 17, 2005 6:31:38 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
You're very welcome.

I'm sorry (and embarrassed) about the mistakes. Thanks for your patiencew with me.

Jim Dean

godspeed
Posted : Saturday, March 19, 2005 10:58:28 AM
Registered User
Joined: 3/6/2005
Posts: 4
Jim, is there a way to contact you? I would like to talk or email with you about a project I'm working on. Thanks, Larry Keenum
QUOTE (Tanstaafl)
You're very welcome.

I'm sorry (and embarrassed) about the mistakes. Thanks for your patiencew with me.

Jim Dean
Tanstaafl
Posted : Saturday, March 19, 2005 11:14:46 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Larry:

W does not allow posting of email addresses, outside weblinks, addresses, phone numbers etc in this forum.

If you are on TeleChart Platinum, I can be found there as Tanstaafl.


Jim Dean

GoodFortune
Posted : Friday, March 25, 2005 7:59:04 AM
Registered User
Joined: 10/7/2004
Posts: 14
Hi Jim
I have been following the above discussion.

Earlier you had given me the RSI5 daily versions of the smoothing type. I have found the same problem of it not being similar to the Smoothing version of the RSI5 daily indicator on tcnet.
I guess it must be due to the same error as above.

Would you be so kind as to post the corrected RSI5 daily versions, both the <0.1% and <0.01% versions.

Thank you and warm regards,

Stephen
Tanstaafl
Posted : Friday, March 25, 2005 9:40:46 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Stephen:

Hey, sorry I forgot about you. Here are three PCF's that illustrate the error differences, and some sample values that show up in the Databox for their associated calculations in comparison to the internal TC "Wilder's Smoothed" calc. I *have* checked these :~)


Internal RSI5 Daily 3/24/05 EOD: ADP=89.52, WYE=81.10, PFE=68.85, MSFT=36.68, INTC=32.95)


1.0%: (ADP=90.50, WYE=83.06, PFE=69.15, MSFT=36.89, INTC=32.91)
==================
100 - ( 100 / ( 1 + ( -2.0186 * (C0-C1>0) * (C0-C1) -1.6149 * (C1-C2>0) * (C1-C2) -1.2919 * (C2-C3>0) * (C2-C3) -1.0335 * (C3-C4>0) * (C3-C4) -.8268 * (C4-C5>0) * (C4-C5) -.6615 * (C5-C6>0) * (C5-C6) -.5292 * (C6-C7>0) * (C6-C7) -.4233 * (C7-C8>0) * (C7-C8) -.3387 * (C8-C9>0) * (C8-C9) -.2709 * (C9-C10>0) * (C9-C10) -.2167 * (C10-C11>0) * (C10-C11) -.1734 * (C11-C12>0) * (C11-C12) -.1387 * (C12-C13>0) * (C12-C13) -.111 * (C13-C14>0) * (C13-C14) -.0888 * (C14-C15>0) * (C14-C15) -.071 * (C15-C16>0) * (C15-C16) -.0568 * (C16-C17>0) * (C16-C17) -.0455 * (C17-C18>0) * (C17-C18) -.0364 * (C18-C19>0) * (C18-C19) -.0291 * (C19-C20>0) * (C19-C20) -.0233 * (C20-C21>0) * (C20-C21) ) / ( 2.0186 * (C0-C1<0) * (C0-C1) +1.6149 * (C1-C2<0) * (C1-C2) +1.2919 * (C2-C3<0) * (C2-C3) +1.0335 * (C3-C4<0) * (C3-C4) +.8268 * (C4-C5<0) * (C4-C5) +.6615 * (C5-C6<0) * (C5-C6) +.5292 * (C6-C7<0) * (C6-C7) +.4233 * (C7-C8<0) * (C7-C8) +.3387 * (C8-C9<0) * (C8-C9) +.2709 * (C9-C10<0) * (C9-C10) +.2167 * (C10-C11<0) * (C10-C11) +.1734 * (C11-C12<0) * (C11-C12) +.1387 * (C12-C13<0) * (C12-C13) +.111 * (C13-C14<0) * (C13-C14) +.0888 * (C14-C15<0) * (C14-C15) +.071 * (C15-C16<0) * (C15-C16) +.0568 * (C16-C17<0) * (C16-C17) +.0455 * (C17-C18<0) * (C17-C18) +.0364 * (C18-C19<0) * (C18-C19) +.0291 * (C19-C20<0) * (C19-C20) +.0233 * (C20-C21<0) * (C20-C21))))


0.1%: (ADP=89.59, WYE=81.11, PFE=68.89, MSFT=36.67, INTC=32.90)
==================
100 - ( 100 / ( 1 + ( -20.0198 * (C0-C1>0) * (C0-C1) -16.0159 * (C1-C2>0) * (C1-C2) -12.8127 * (C2-C3>0) * (C2-C3) -10.2502 * (C3-C4>0) * (C3-C4) -8.2001 * (C4-C5>0) * (C4-C5) -6.5601 * (C5-C6>0) * (C5-C6) -5.2481 * (C6-C7>0) * (C6-C7) -4.1985 * (C7-C8>0) * (C7-C8) -3.3588 * (C8-C9>0) * (C8-C9) -2.687 * (C9-C10>0) * (C9-C10) -2.1496 * (C10-C11>0) * (C10-C11) -1.7197 * (C11-C12>0) * (C11-C12) -1.3758 * (C12-C13>0) * (C12-C13) -1.1006 * (C13-C14>0) * (C13-C14) -.8805 * (C14-C15>0) * (C14-C15) -.7044 * (C15-C16>0) * (C15-C16) -.5635 * (C16-C17>0) * (C16-C17) -.4508 * (C17-C18>0) * (C17-C18) -.3606 * (C18-C19>0) * (C18-C19) -.2885 * (C19-C20>0) * (C19-C20) -.2308 * (C20-C21>0) * (C20-C21) -.1847 * (C21-C22>0) * (C21-C22) -.1477 * (C22-C23>0) * (C22-C23) -.1182 * (C23-C24>0) * (C23-C24) -.0945 * (C24-C25>0) * (C24-C25) -.0756 * (C25-C26>0) * (C25-C26) -.0605 * (C26-C27>0) * (C26-C27) -.0484 * (C27-C28>0) * (C27-C28) -.0387 * (C28-C29>0) * (C28-C29) -.031 * (C29-C30>0) * (C29-C30) -.0248 * (C30-C31>0) * (C30-C31) ) / ( 20.0198 * (C0-C1<0) * (C0-C1) +16.0159 * (C1-C2<0) * (C1-C2) +12.8127 * (C2-C3<0) * (C2-C3) +10.2502 * (C3-C4<0) * (C3-C4) +8.2001 * (C4-C5<0) * (C4-C5) +6.5601 * (C5-C6<0) * (C5-C6) +5.2481 * (C6-C7<0) * (C6-C7) +4.1985 * (C7-C8<0) * (C7-C8) +3.3588 * (C8-C9<0) * (C8-C9) +2.687 * (C9-C10<0) * (C9-C10) +2.1496 * (C10-C11<0) * (C10-C11) +1.7197 * (C11-C12<0) * (C11-C12) +1.3758 * (C12-C13<0) * (C12-C13) +1.1006 * (C13-C14<0) * (C13-C14) +.8805 * (C14-C15<0) * (C14-C15) +.7044 * (C15-C16<0) * (C15-C16) +.5635 * (C16-C17<0) * (C16-C17) +.4508 * (C17-C18<0) * (C17-C18) +.3606 * (C18-C19<0) * (C18-C19) +.2885 * (C19-C20<0) * (C19-C20) +.2308 * (C20-C21<0) * (C20-C21) +.1847 * (C21-C22<0) * (C21-C22) +.1477 * (C22-C23<0) * (C22-C23) +.1182 * (C23-C24<0) * (C23-C24) +.0945 * (C24-C25<0) * (C24-C25) +.0756 * (C25-C26<0) * (C25-C26) +.0605 * (C26-C27<0) * (C26-C27) +.0484 * (C27-C28<0) * (C27-C28) +.0387 * (C28-C29<0) * (C28-C29) +.031 * (C29-C30<0) * (C29-C30) +.0248 * (C30-C31<0) * (C30-C31))))


0.01%: (ADP=89.53, WYE=81.10, PFE=68.85, MSFT=36.68, INTC=32.94)
==================
100 - ( 100 / ( 1 + ( -200.017 * (C0-C1>0) * (C0-C1) -160.0136 * (C1-C2>0) * (C1-C2) -128.0109 * (C2-C3>0) * (C2-C3) -102.4087 * (C3-C4>0) * (C3-C4) -81.927 * (C4-C5>0) * (C4-C5) -65.5416 * (C5-C6>0) * (C5-C6) -52.4333 * (C6-C7>0) * (C6-C7) -41.9466 * (C7-C8>0) * (C7-C8) -33.5573 * (C8-C9>0) * (C8-C9) -26.8458 * (C9-C10>0) * (C9-C10) -21.4767 * (C10-C11>0) * (C10-C11) -17.1813 * (C11-C12>0) * (C11-C12) -13.7451 * (C12-C13>0) * (C12-C13) -10.9961 * (C13-C14>0) * (C13-C14) -8.7968 * (C14-C15>0) * (C14-C15) -7.0375 * (C15-C16>0) * (C15-C16) -5.63 * (C16-C17>0) * (C16-C17) -4.504 * (C17-C18>0) * (C17-C18) -3.6032 * (C18-C19>0) * (C18-C19) -2.8825 * (C19-C20>0) * (C19-C20) -2.306 * (C20-C21>0) * (C20-C21) -1.8448 * (C21-C22>0) * (C21-C22) -1.4759 * (C22-C23>0) * (C22-C23) -1.1807 * (C23-C24>0) * (C23-C24) -.9446 * (C24-C25>0) * (C24-C25) -.7556 * (C25-C26>0) * (C25-C26) -.6045 * (C26-C27>0) * (C26-C27) -.4836 * (C27-C28>0) * (C27-C28) -.3869 * (C28-C29>0) * (C28-C29) -.3095 * (C29-C30>0) * (C29-C30) -.2476 * (C30-C31>0) * (C30-C31) -.1981 * (C31-C32>0) * (C31-C32) -.1585 * (C32-C33>0) * (C32-C33) -.1268 * (C33-C34>0) * (C33-C34) -.1014 * (C34-C35>0) * (C34-C35) -.0811 * (C35-C36>0) * (C35-C36) -.0649 * (C36-C37>0) * (C36-C37) -.0519 * (C37-C38>0) * (C37-C38) -.0415 * (C38-C39>0) * (C38-C39) -.0332 * (C39-C40>0) * (C39-C40) -.0266 * (C40-C41>0) * (C40-C41) -.0213 * (C41-C42>0) * (C41-C42) ) / ( 200.017 * (C0-C1<0) * (C0-C1) +160.0136 * (C1-C2<0) * (C1-C2) +128.0109 * (C2-C3<0) * (C2-C3) +102.4087 * (C3-C4<0) * (C3-C4) +81.927 * (C4-C5<0) * (C4-C5) +65.5416 * (C5-C6<0) * (C5-C6) +52.4333 * (C6-C7<0) * (C6-C7) +41.9466 * (C7-C8<0) * (C7-C8) +33.5573 * (C8-C9<0) * (C8-C9) +26.8458 * (C9-C10<0) * (C9-C10) +21.4767 * (C10-C11<0) * (C10-C11) +17.1813 * (C11-C12<0) * (C11-C12) +13.7451 * (C12-C13<0) * (C12-C13) +10.9961 * (C13-C14<0) * (C13-C14) +8.7968 * (C14-C15<0) * (C14-C15) +7.0375 * (C15-C16<0) * (C15-C16) +5.63 * (C16-C17<0) * (C16-C17) +4.504 * (C17-C18<0) * (C17-C18) +3.6032 * (C18-C19<0) * (C18-C19) +2.8825 * (C19-C20<0) * (C19-C20) +2.306 * (C20-C21<0) * (C20-C21) +1.8448 * (C21-C22<0) * (C21-C22) +1.4759 * (C22-C23<0) * (C22-C23) +1.1807 * (C23-C24<0) * (C23-C24) +.9446 * (C24-C25<0) * (C24-C25) +.7556 * (C25-C26<0) * (C25-C26) +.6045 * (C26-C27<0) * (C26-C27) +.4836 * (C27-C28<0) * (C27-C28) +.3869 * (C28-C29<0) * (C28-C29) +.3095 * (C29-C30<0) * (C29-C30) +.2476 * (C30-C31<0) * (C30-C31) +.1981 * (C31-C32<0) * (C31-C32) +.1585 * (C32-C33<0) * (C32-C33) +.1268 * (C33-C34<0) * (C33-C34) +.1014 * (C34-C35<0) * (C34-C35) +.0811 * (C35-C36<0) * (C35-C36) +.0649 * (C36-C37<0) * (C36-C37) +.0519 * (C37-C38<0) * (C37-C38) +.0415 * (C38-C39<0) * (C38-C39) +.0332 * (C39-C40<0) * (C39-C40) +.0266 * (C40-C41<0) * (C40-C41) +.0213 * (C41-C42<0) * (C41-C42))))

Jim Dean

GoodFortune
Posted : Friday, March 25, 2005 11:16:02 AM
Registered User
Joined: 10/7/2004
Posts: 14
Jim,

Thanks a bunch for responding so quickly.

Stephen
osterlundp
Posted : Friday, May 13, 2005 6:02:10 AM
Registered User
Joined: 11/30/2004
Posts: 7
Hi -- Thanks for all your work on this...and now, in the spirit of "never enough" ()would it be possible to get a formula for a 20 period RSI????

Sheepishly and gratefully submitted...
Bruce_L
Posted : Friday, May 13, 2005 11:01:53 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I’m not going to say the following formulas are accurate to within 1% and 0.1%, but I stopped when the sum of the factors for the terms exceeded 0.99 and 0.999. These Personal Criteria Formula are very long and can dramatically slow down updating your PCFs. Never use these as Custom Indicators (Wilder's RSI with Use Wilders Smoothing Checked and an Avg Period of 1 works for charting).

Wilder’s Smoothed RSI20 (Factor Sum>0.99):
100-(100/(1+(9607*(C>C1)*(C1-C) +9127*(C1>C2)*(C2-C1) +8671*(C2>C3)*(C3-C2) +8237*(C3>C4)*(C4-C3) +7825*(C4>C5)*(C5-C4) +7434*(C5>C6)*(C6-C5) +7062*(C6>C7)*(C7-C6) +6709*(C7>C8)*(C8-C7) +6374*(C8>C9)*(C9-C8) +6055*(C9>C10)*(C10-C9) +5752*(C10>C11)*(C11-C10) +5465*(C11>C12)*(C12-C11) +5191*(C12>C13)*(C13-C12) +4932*(C13>C14)*(C14-C13) +4685*(C14>C15)*(C15-C14) +4451*(C15>C16)*(C16-C15) +4228*(C16>C17)*(C17-C16) +4017*(C17>C18)*(C18-C17) +3816*(C18>C19)*(C19-C18) +3625*(C19>C20)*(C20-C19) +3444*(C20>C21)*(C21-C20) +3272*(C21>C22)*(C22-C21) +3108*(C22>C23)*(C23-C22) +2953*(C23>C24)*(C24-C23) +2805*(C24>C25)*(C25-C24) +2665*(C25>C26)*(C26-C25) +2532*(C26>C27)*(C27-C26) +2405*(C27>C28)*(C28-C27) +2285*(C28>C29)*(C29-C28) +2171*(C29>C30)*(C30-C29) +2062*(C30>C31)*(C31-C30) +1959*(C31>C32)*(C32-C31) +1861*(C32>C33)*(C33-C32) +1768*(C33>C34)*(C34-C33) +1680*(C34>C35)*(C35-C34) +1596*(C35>C36)*(C36-C35) +1516*(C36>C37)*(C37-C36) +1440*(C37>C38)*(C38-C37) +1368*(C38>C39)*(C39-C38) +1300*(C39>C40)*(C40-C39) +1235*(C40>C41)*(C41-C40) +1173*(C41>C42)*(C42-C41) +1114*(C42>C43)*(C43-C42) +1059*(C43>C44)*(C44-C43) +1006*(C44>C45)*(C45-C44) +955*(C45>C46)*(C46-C45) +908*(C46>C47)*(C47-C46) +862*(C47>C48)*(C48-C47) +819*(C48>C49)*(C49-C48) +778*(C49>C50)*(C50-C49) +739*(C50>C51)*(C51-C50) +702*(C51>C52)*(C52-C51) +667*(C52>C53)*(C53-C52) +634*(C53>C54)*(C54-C53) +602*(C54>C55)*(C55-C54) +572*(C55>C56)*(C56-C55) +543*(C56>C57)*(C57-C56) +516*(C57>C58)*(C58-C57) +490*(C58>C59)*(C59-C58) +466*(C59>C60)*(C60-C59) +443*(C60>C61)*(C61-C60) +420*(C61>C62)*(C62-C61) +399*(C62>C63)*(C63-C62) +379*(C63>C64)*(C64-C63) +361*(C64>C65)*(C65-C64) +342*(C65>C66)*(C66-C65) +325*(C66>C67)*(C67-C66) +309*(C67>C68)*(C68-C67) +294*(C68>C69)*(C69-C68) +279*(C69>C70)*(C70-C69) +265*(C70>C71)*(C71-C70) +252*(C71>C72)*(C72-C71) +239*(C72>C73)*(C73-C72) +227*(C73>C74)*(C74-C73) +216*(C74>C75)*(C75-C74) +205*(C75>C76)*(C76-C75) +195*(C76>C77)*(C77-C76) +185*(C77>C78)*(C78-C77) +176*(C78>C79)*(C79-C78) +167*(C79>C80)*(C80-C79) +159*(C80>C81)*(C81-C80) +151*(C81>C82)*(C82-C81) +143*(C82>C83)*(C83-C82) +136*(C83>C84)*(C84-C83) +129*(C84>C85)*(C85-C84) +123*(C85>C86)*(C86-C85) +117*(C86>C87)*(C87-C86) +111*(C87>C88)*(C88-C87) +105*(C88>C89)*(C89-C88) +100*(C89>C90)*(C90-C89))/(9607*(C<C1)*(C-C1) +9127*(C1<C2)*(C1-C2) +8671*(C2<C3)*(C2-C3) +8237*(C3<C4)*(C3-C4) +7825*(C4<C5)*(C4-C5) +7434*(C5<C6)*(C5-C6) +7062*(C6<C7)*(C6-C7) +6709*(C7<C8)*(C7-C8) +6374*(C8<C9)*(C8-C9) +6055*(C9<C10)*(C9-C10) +5752*(C10<C11)*(C10-C11) +5465*(C11<C12)*(C11-C12) +5191*(C12<C13)*(C12-C13) +4932*(C13<C14)*(C13-C14) +4685*(C14<C15)*(C14-C15) +4451*(C15<C16)*(C15-C16) +4228*(C16<C17)*(C16-C17) +4017*(C17<C18)*(C17-C18) +3816*(C18<C19)*(C18-C19) +3625*(C19<C20)*(C19-C20) +3444*(C20<C21)*(C20-C21) +3272*(C21<C22)*(C21-C22) +3108*(C22<C23)*(C22-C23) +2953*(C23<C24)*(C23-C24) +2805*(C24<C25)*(C24-C25) +2665*(C25<C26)*(C25-C26) +2532*(C26<C27)*(C26-C27) +2405*(C27<C28)*(C27-C28) +2285*(C28<C29)*(C28-C29) +2171*(C29<C30)*(C29-C30) +2062*(C30<C31)*(C30-C31) +1959*(C31<C32)*(C31-C32) +1861*(C32<C33)*(C32-C33) +1768*(C33<C34)*(C33-C34) +1680*(C34<C35)*(C34-C35) +1596*(C35<C36)*(C35-C36) +1516*(C36<C37)*(C36-C37) +1440*(C37<C38)*(C37-C38) +1368*(C38<C39)*(C38-C39) +1300*(C39<C40)*(C39-C40) +1235*(C40<C41)*(C40-C41) +1173*(C41<C42)*(C41-C42) +1114*(C42<C43)*(C42-C43) +1059*(C43<C44)*(C43-C44) +1006*(C44<C45)*(C44-C45) +955*(C45<C46)*(C45-C46) +908*(C46<C47)*(C46-C47) +862*(C47<C48)*(C47-C48) +819*(C48<C49)*(C48-C49) +778*(C49<C50)*(C49-C50) +739*(C50<C51)*(C50-C51) +702*(C51<C52)*(C51-C52) +667*(C52<C53)*(C52-C53) +634*(C53<C54)*(C53-C54) +602*(C54<C55)*(C54-C55) +572*(C55<C56)*(C55-C56) +543*(C56<C57)*(C56-C57) +516*(C57<C58)*(C57-C58) +490*(C58<C59)*(C58-C59) +466*(C59<C60)*(C59-C60) +443*(C60<C61)*(C60-C61) +420*(C61<C62)*(C61-C62) +399*(C62<C63)*(C62-C63) +379*(C63<C64)*(C63-C64) +361*(C64<C65)*(C64-C65) +342*(C65<C66)*(C65-C66) +325*(C66<C67)*(C66-C67) +309*(C67<C68)*(C67-C68) +294*(C68<C69)*(C68-C69) +279*(C69<C70)*(C69-C70) +265*(C70<C71)*(C70-C71) +252*(C71<C72)*(C71-C72) +239*(C72<C73)*(C72-C73) +227*(C73<C74)*(C73-C74) +216*(C74<C75)*(C74-C75) +205*(C75<C76)*(C75-C76) +195*(C76<C77)*(C76-C77) +185*(C77<C78)*(C77-C78) +176*(C78<C79)*(C78-C79) +167*(C79<C80)*(C79-C80) +159*(C80<C81)*(C80-C81) +151*(C81<C82)*(C81-C82) +143*(C82<C83)*(C82-C83) +136*(C83<C84)*(C83-C84) +129*(C84<C85)*(C84-C85) +123*(C85<C86)*(C85-C86) +117*(C86<C87)*(C86-C87) +111*(C87<C88)*(C87-C88) +105*(C88<C89)*(C88-C89) +100*(C89<C90)*(C89-C90))))

Wilder’s Smoothed RSI20 (Factor Sum>0.999):
100-(100/(1+(96613*(C>C1)*(C1-C) +91783*(C1>C2)*(C2-C1) +87193*(C2>C3)*(C3-C2) +82834*(C3>C4)*(C4-C3) +78692*(C4>C5)*(C5-C4) +74758*(C5>C6)*(C6-C5) +71020*(C6>C7)*(C7-C6) +67469*(C7>C8)*(C8-C7) +64095*(C8>C9)*(C9-C8) +60890*(C9>C10)*(C10-C9) +57846*(C10>C11)*(C11-C10) +54954*(C11>C12)*(C12-C11) +52206*(C12>C13)*(C13-C12) +49596*(C13>C14)*(C14-C13) +47116*(C14>C15)*(C15-C14) +44760*(C15>C16)*(C16-C15) +42522*(C16>C17)*(C17-C16) +40396*(C17>C18)*(C18-C17) +38376*(C18>C19)*(C19-C18) +36457*(C19>C20)*(C20-C19) +34635*(C20>C21)*(C21-C20) +32903*(C21>C22)*(C22-C21) +31258*(C22>C23)*(C23-C22) +29695*(C23>C24)*(C24-C23) +28210*(C24>C25)*(C25-C24) +26800*(C25>C26)*(C26-C25) +25460*(C26>C27)*(C27-C26) +24187*(C27>C28)*(C28-C27) +22977*(C28>C29)*(C29-C28) +21828*(C29>C30)*(C30-C29) +20737*(C30>C31)*(C31-C30) +19700*(C31>C32)*(C32-C31) +18715*(C32>C33)*(C33-C32) +17779*(C33>C34)*(C34-C33) +16890*(C34>C35)*(C35-C34) +16046*(C35>C36)*(C36-C35) +15244*(C36>C37)*(C37-C36) +14481*(C37>C38)*(C38-C37) +13757*(C38>C39)*(C39-C38) +13069*(C39>C40)*(C40-C39) +12416*(C40>C41)*(C41-C40) +11795*(C41>C42)*(C42-C41) +11205*(C42>C43)*(C43-C42) +10645*(C43>C44)*(C44-C43) +10113*(C44>C45)*(C45-C44) +9607*(C45>C46)*(C46-C45) +9127*(C46>C47)*(C47-C46) +8671*(C47>C48)*(C48-C47) +8237*(C48>C49)*(C49-C48) +7825*(C49>C50)*(C50-C49) +7434*(C50>C51)*(C51-C50) +7062*(C51>C52)*(C52-C51) +6709*(C52>C53)*(C53-C52) +6374*(C53>C54)*(C54-C53) +6055*(C54>C55)*(C55-C54) +5752*(C55>C56)*(C56-C55) +5465*(C56>C57)*(C57-C56) +5191*(C57>C58)*(C58-C57) +4932*(C58>C59)*(C59-C58) +4685*(C59>C60)*(C60-C59) +4451*(C60>C61)*(C61-C60) +4228*(C61>C62)*(C62-C61) +4017*(C62>C63)*(C63-C62) +3816*(C63>C64)*(C64-C63) +3625*(C64>C65)*(C65-C64) +3444*(C65>C66)*(C66-C65) +3272*(C66>C67)*(C67-C66) +3108*(C67>C68)*(C68-C67) +2953*(C68>C69)*(C69-C68) +2805*(C69>C70)*(C70-C69) +2665*(C70>C71)*(C71-C70) +2532*(C71>C72)*(C72-C71) +2405*(C72>C73)*(C73-C72) +2285*(C73>C74)*(C74-C73) +2171*(C74>C75)*(C75-C74) +2062*(C75>C76)*(C76-C75) +1959*(C76>C77)*(C77-C76) +1861*(C77>C78)*(C78-C77) +1768*(C78>C79)*(C79-C78) +1680*(C79>C80)*(C80-C79) +1596*(C80>C81)*(C81-C80) +1516*(C81>C82)*(C82-C81) +1440*(C82>C83)*(C83-C82) +1368*(C83>C84)*(C84-C83) +1300*(C84>C85)*(C85-C84) +1235*(C85>C86)*(C86-C85) +1173*(C86>C87)*(C87-C86) +1114*(C87>C88)*(C88-C87) +1059*(C88>C89)*(C89-C88) +1006*(C89>C90)*(C90-C89) +955*(C90>C91)*(C91-C90) +908*(C91>C92)*(C92-C91) +862*(C92>C93)*(C93-C92) +819*(C93>C94)*(C94-C93) +778*(C94>C95)*(C95-C94) +739*(C95>C96)*(C96-C95) +702*(C96>C97)*(C97-C96) +667*(C97>C98)*(C98-C97) +634*(C98>C99)*(C99-C98) +602*(C99>C100)*(C100-C99) +572*(C100>C101)*(C101-C100) +543*(C101>C102)*(C102-C101) +516*(C102>C103)*(C103-C102) +490*(C103>C104)*(C104-C103) +466*(C104>C105)*(C105-C104) +443*(C105>C106)*(C106-C105) +420*(C106>C107)*(C107-C106) +399*(C107>C108)*(C108-C107) +379*(C108>C109)*(C109-C108) +361*(C109>C110)*(C110-C109) +342*(C110>C111)*(C111-C110) +325*(C111>C112)*(C112-C111) +309*(C112>C113)*(C113-C112) +294*(C113>C114)*(C114-C113) +279*(C114>C115)*(C115-C114) +265*(C115>C116)*(C116-C115) +252*(C116>C117)*(C117-C116) +239*(C117>C118)*(C118-C117) +227*(C118>C119)*(C119-C118) +216*(C119>C120)*(C120-C119) +205*(C120>C121)*(C121-C120) +195*(C121>C122)*(C122-C121) +185*(C122>C123)*(C123-C122) +176*(C123>C124)*(C124-C123) +167*(C124>C125)*(C125-C124) +159*(C125>C126)*(C126-C125) +151*(C126>C127)*(C127-C126) +143*(C127>C128)*(C128-C127) +136*(C128>C129)*(C129-C128) +129*(C129>C130)*(C130-C129) +123*(C130>C131)*(C131-C130) +117*(C131>C132)*(C132-C131) +111*(C132>C133)*(C133-C132) +105*(C133>C134)*(C134-C133) +100*(C134>C135)*(C135-C134))/(96613*(C<C1)*(C-C1) +91783*(C1<C2)*(C1-C2) +87193*(C2<C3)*(C2-C3) +82834*(C3<C4)*(C3-C4) +78692*(C4<C5)*(C4-C5) +74758*(C5<C6)*(C5-C6) +71020*(C6<C7)*(C6-C7) +67469*(C7<C8)*(C7-C8) +64095*(C8<C9)*(C8-C9) +60890*(C9<C10)*(C9-C10) +57846*(C10<C11)*(C10-C11) +54954*(C11<C12)*(C11-C12) +52206*(C12<C13)*(C12-C13) +49596*(C13<C14)*(C13-C14) +47116*(C14<C15)*(C14-C15) +44760*(C15<C16)*(C15-C16) +42522*(C16<C17)*(C16-C17) +40396*(C17<C18)*(C17-C18) +38376*(C18<C19)*(C18-C19) +36457*(C19<C20)*(C19-C20) +34635*(C20<C21)*(C20-C21) +32903*(C21<C22)*(C21-C22) +31258*(C22<C23)*(C22-C23) +29695*(C23<C24)*(C23-C24) +28210*(C24<C25)*(C24-C25) +26800*(C25<C26)*(C25-C26) +25460*(C26<C27)*(C26-C27) +24187*(C27<C28)*(C27-C28) +22977*(C28<C29)*(C28-C29) +21828*(C29<C30)*(C29-C30) +20737*(C30<C31)*(C30-C31) +19700*(C31<C32)*(C31-C32) +18715*(C32<C33)*(C32-C33) +17779*(C33<C34)*(C33-C34) +16890*(C34<C35)*(C34-C35) +16046*(C35<C36)*(C35-C36) +15244*(C36<C37)*(C36-C37) +14481*(C37<C38)*(C37-C38) +13757*(C38<C39)*(C38-C39) +13069*(C39<C40)*(C39-C40) +12416*(C40<C41)*(C40-C41) +11795*(C41<C42)*(C41-C42) +11205*(C42<C43)*(C42-C43) +10645*(C43<C44)*(C43-C44) +10113*(C44<C45)*(C44-C45) +9607*(C45<C46)*(C45-C46) +9127*(C46<C47)*(C46-C47) +8671*(C47<C48)*(C47-C48) +8237*(C48<C49)*(C48-C49) +7825*(C49<C50)*(C49-C50) +7434*(C50<C51)*(C50-C51) +7062*(C51<C52)*(C51-C52) +6709*(C52<C53)*(C52-C53) +6374*(C53<C54)*(C53-C54) +6055*(C54<C55)*(C54-C55) +5752*(C55<C56)*(C55-C56) +5465*(C56<C57)*(C56-C57) +5191*(C57<C58)*(C57-C58) +4932*(C58<C59)*(C58-C59) +4685*(C59<C60)*(C59-C60) +4451*(C60<C61)*(C60-C61) +4228*(C61<C62)*(C61-C62) +4017*(C62<C63)*(C62-C63) +3816*(C63<C64)*(C63-C64) +3625*(C64<C65)*(C64-C65) +3444*(C65<C66)*(C65-C66) +3272*(C66<C67)*(C66-C67) +3108*(C67<C68)*(C67-C68) +2953*(C68<C69)*(C68-C69) +2805*(C69<C70)*(C69-C70) +2665*(C70<C71)*(C70-C71) +2532*(C71<C72)*(C71-C72) +2405*(C72<C73)*(C72-C73) +2285*(C73<C74)*(C73-C74) +2171*(C74<C75)*(C74-C75) +2062*(C75<C76)*(C75-C76) +1959*(C76<C77)*(C76-C77) +1861*(C77<C78)*(C77-C78) +1768*(C78<C79)*(C78-C79) +1680*(C79<C80)*(C79-C80) +1596*(C80<C81)*(C80-C81) +1516*(C81<C82)*(C81-C82) +1440*(C82<C83)*(C82-C83) +1368*(C83<C84)*(C83-C84) +1300*(C84<C85)*(C84-C85) +1235*(C85<C86)*(C85-C86) +1173*(C86<C87)*(C86-C87) +1114*(C87<C88)*(C87-C88) +1059*(C88<C89)*(C88-C89) +1006*(C89<C90)*(C89-C90) +955*(C90<C91)*(C90-C91) +908*(C91<C92)*(C91-C92) +862*(C92<C93)*(C92-C93) +819*(C93<C94)*(C93-C94) +778*(C94<C95)*(C94-C95) +739*(C95<C96)*(C95-C96) +702*(C96<C97)*(C96-C97) +667*(C97<C98)*(C97-C98) +634*(C98<C99)*(C98-C99) +602*(C99<C100)*(C99-C100) +572*(C100<C101)*(C100-C101) +543*(C101<C102)*(C101-C102) +516*(C102<C103)*(C102-C103) +490*(C103<C104)*(C103-C104) +466*(C104<C105)*(C104-C105) +443*(C105<C106)*(C105-C106) +420*(C106<C107)*(C106-C107) +399*(C107<C108)*(C107-C108) +379*(C108<C109)*(C108-C109) +361*(C109<C110)*(C109-C110) +342*(C110<C111)*(C110-C111) +325*(C111<C112)*(C111-C112) +309*(C112<C113)*(C112-C113) +294*(C113<C114)*(C113-C114) +279*(C114<C115)*(C114-C115) +265*(C115<C116)*(C115-C116) +252*(C116<C117)*(C116-C117) +239*(C117<C118)*(C117-C118) +227*(C118<C119)*(C118-C119) +216*(C119<C120)*(C119-C120) +205*(C120<C121)*(C120-C121) +195*(C121<C122)*(C121-C122) +185*(C122<C123)*(C122-C123) +176*(C123<C124)*(C123-C124) +167*(C124<C125)*(C124-C125) +159*(C125<C126)*(C125-C126) +151*(C126<C127)*(C126-C127) +143*(C127<C128)*(C127-C128) +136*(C128<C129)*(C128-C129) +129*(C129<C130)*(C129-C130) +123*(C130<C131)*(C130-C131) +117*(C131<C132)*(C131-C132) +111*(C132<C133)*(C132-C133) +105*(C133<C134)*(C133-C134) +100*(C134<C135)*(C134-C135))))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Tanstaafl
Posted : Friday, May 13, 2005 11:30:13 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Bruce's solution (and the cautions he stated) looks pretty good to me.

The only thing that my spreadsheet might have done additionally would have been to back-correct the coeff's that were used so that their sum equalled unity. (I presume from the "roundness" of your coefficients that this has not been done in the formulae above).

This has a small effect on the result - it understates the final answer slightly - I don't mention it to criticise, but simply to suggest a final "elegance" tweak that might be useful for these kinds of spreadsheet solutions.

Thanks, Bruce, for jumping in here - I'm glad that I've been able to help in some small way to help you help others.

Jim Dean

Bruce_L
Posted : Friday, May 13, 2005 11:43:06 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Tanstaafl,
Normally I would agree, but the coefficients in this case are part of a ratio. I could multiply them by pi without affecting the results. Anyway, I decided I didn’t want to figure out how many digits to include in each coefficient and had my spreadsheet arbitrarily set the smallest coefficient in the series to 100.

BTW, I thought about just waiting for you to post a reply, but you have been less active on the boards recently and did not want osterlundp to have to wait if there was a reason you hadn't been around much.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
osterlundp
Posted : Friday, May 13, 2005 11:56:12 AM
Registered User
Joined: 11/30/2004
Posts: 7


Thank you-thank you-thank you!!!
Tanstaafl
Posted : Friday, May 13, 2005 12:26:06 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Bruce you are 100% correct. Sorry about that ... I forgot about the numerator/denominator aspect of the RSI.

And please don't feel you need to wait to reply on my account ... the idea is to help folks. I've been tied up by a lot of extraneous stuff recently, so have not been able to keep on top of things here.

Jim

Cesar
Posted : Friday, May 20, 2005 12:57:59 PM
Registered User
Joined: 10/7/2004
Posts: 5
Is there a way that Jim or Bruce can teach me how you are generating the formulas? The reason I ask is now I need the 4 period RSI. Of course you could give me the formula again.

Thank you,
Cesar
Bruce_L
Posted : Friday, May 20, 2005 1:17:45 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Wilder’s Smoothed RSI4 (Coefficient Sum>0.999):
100-(100/(1+(996620*(C>C1)*(C1-C) +747465*(C1>C2)*(C2-C1) +560599*(C2>C3)*(C3-C2) +420449*(C3>C4)*(C4-C3) +315337*(C4>C5)*(C5-C4) +236503*(C5>C6)*(C6-C5) +177377*(C6>C7)*(C7-C6) +133033*(C7>C8)*(C8-C7) +99775*(C8>C9)*(C9-C8) +74831*(C9>C10)*(C10-C9) +56123*(C10>C11)*(C11-C10) +42092*(C11>C12)*(C12-C11) +31569*(C12>C13)*(C13-C12) +23677*(C13>C14)*(C14-C13) +17758*(C14>C15)*(C15-C14) +13318*(C15>C16)*(C16-C15) +9989*(C16>C17)*(C17-C16) +7492*(C17>C18)*(C18-C17) +5619*(C18>C19)*(C19-C18) +4214*(C19>C20)*(C20-C19) +3160*(C20>C21)*(C21-C20) +2370*(C21>C22)*(C22-C21) +1778*(C22>C23)*(C23-C22) +1333*(C23>C24)*(C24-C23) +1000*(C24>C25)*(C25-C24))/(996620*(C<C1)*(C-C1) +747465*(C1<C2)*(C1-C2) +560599*(C2<C3)*(C2-C3) +420449*(C3<C4)*(C3-C4) +315337*(C4<C5)*(C4-C5) +236503*(C5<C6)*(C5-C6) +177377*(C6<C7)*(C6-C7) +133033*(C7<C8)*(C7-C8) +99775*(C8<C9)*(C8-C9) +74831*(C9<C10)*(C9-C10) +56123*(C10<C11)*(C10-C11) +42092*(C11<C12)*(C11-C12) +31569*(C12<C13)*(C12-C13) +23677*(C13<C14)*(C13-C14) +17758*(C14<C15)*(C14-C15) +13318*(C15<C16)*(C15-C16) +9989*(C16<C17)*(C16-C17) +7492*(C17<C18)*(C17-C18) +5619*(C18<C19)*(C18-C19) +4214*(C19<C20)*(C19-C20) +3160*(C20<C21)*(C20-C21) +2370*(C21<C22)*(C21-C22) +1778*(C22<C23)*(C22-C23) +1333*(C23<C24)*(C23-C24) +1000*(C24<C25)*(C24-C25))))

As far as an explanation of how it is generated, I use a spreadsheet.

The basic form of the formula is:

100-(100/(1+(1st term coefficient*(C>C1)*(C1-C) +2nd term coefficient*(C1>C2)*(C2-C1) ... )/(1st term coefficient*(C<C1)*(C-C1) +2nd term coefficient*(C1<C2)*(C1-C2) ... )))

1. The unadjusted coefficient for the first term is 1/w, where w is the Period.
2. The unadjusted coefficients for the rest of the terms are the previous term times (1-1/w).
3. I stop when the sum of the coefficients exceeds some arbitrary value (0.999 in this case).
4. I then adjust the terms by dividing by the last coefficient, multiplying by 1000 and rounding to the nearest integer.

It should probably be noted that step 4 isn't actually necessary. I just do it to make the formula look a little bit neater. If the coefficients were not part of a ratio, it would become a necessary step and I would adjust the terms by dividing by the sum of the coefficients instead.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Tanstaafl
Posted : Friday, May 20, 2005 1:32:06 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, Cesar:

Bruce's formula will meet your needs perfectly, I'm sure.

As to the HOW ... well that involves a bunch of Excel gobbledegook that is either something you already know enough about to do yourself, or would not be "safe" to teach you as a cookiecutter method.

Since Bruce has gotten really good at this, and he's always on call as a W employee, I suggest that you avail yourself of his helpfulness and skill for the time being.

Hopefully, W will provide an internal RSIW PCF functionthat will eliminiate the need for the series-formula for these applications.

Jim Dean

Tanstaafl
Posted : Friday, May 20, 2005 1:49:40 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Welp there ya go - Bruce added some more info which provides a good synopsis of the spreadsheet solution ... the details of implementing it involve some string manipulation in the formulae, but if you are familiar with that in Excel, you should be able to take it from there. Thanks, Bruce ... hopefully that will be enough to do the trick. My own approach to this has a lot more bells and whistles, including daysAgo and days/Bar and accuracy inputs and other smoothing methods and alternative roots, etc. That's why I did not see any sense in trying to describe it. Your focused solution is just what the doctor ordered!

Jim

Bruce_L
Posted : Friday, May 20, 2005 2:01:25 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Tanstaafl is correct, you are either going to know how to convert my explanation into a spreadsheet or you aren't. Writing the spreadsheet itself isn't something I'm going to be able to teach you how to do in the forums.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Cesar
Posted : Friday, May 20, 2005 3:11:36 PM
Registered User
Joined: 10/7/2004
Posts: 5
Bruce,
Thank you for the quick reply and the explanation on how to do it. Now that I have the method to do it myself, I expect it to be soon supported.

Jim,
You are correct. You do not know if I am absolute beginner (thus opening the door for lots of simple questions about Excel, when it would have been just easier to give the formula) or an ex-Microsoft developer who worked on Excel (which I am). It is just easier to give the answer but I always like to know how it came to be.

As always you guys give good quick answers.

Thanks again,
Cesar



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.