TC2000.com• Download software • Tutorial videos • Subscription & data-feed pricing • Class schedule

TC2000Brokerage.com• New account application • Trading resources • Margin rates • Stock & option commissions

Worden Discussion Forum » Customer Training & Support » PCFs, EasyScan and Custom Indicators » Cascades of Moving Averages

Bruce,

Much work for the weekend... Can you help me with an equation for RSI... need the equation for RSI both in Value and Linear Regression for a period of 9 and 18 periods. Plus, do you have the equation to calcuation the XAVG too again on a 9 period? It would be great if you could just post the equations so I have all weekend to work on fine tunning for correlating with imagery of the charts... the previous help you supplied for PPO and the offset feature is working well. Thank you much appreciate for that! Jim

A plain RSI9 without Wilder's smoothing is just the following.

RSI9

But an RSI - Wilder's indicator with Wilder's smoothing is a lot longer.

50 * (C - XAVGC17.1) / 9 / (.11112122 * (ABS(C - C1) + 8 / 9 * (ABS(C1 - C2) + 8 / 9 * (ABS(C2 - C3) + 8 / 9 * (ABS(C3 - C4) + 8 / 9 * (ABS(C4 - C5) + 8 / 9 * (ABS(C5 - C6) + 8 / 9 * (ABS(C6 - C7) + 8 / 9 * (ABS(C7 - C8) + 8 / 9 * (ABS(C8 - C9) + 8 / 9 * (ABS(C9 - C10) + 8 / 9 * (ABS(C10 - C11) + 8 / 9 * (ABS(C11 - C12) + 8 / 9 * (ABS(C12 - C13) + 8 / 9 * (ABS(C13 - C14) + 8 / 9 * (ABS(C14 - C15) + 8 / 9 * (ABS(C15 - C16) + 8 / 9 * (ABS(C16 - C17) + 8 / 9 * (ABS(C17 - C18) + 8 / 9 * (ABS(C18 - C19) + 8 / 9 * (ABS(C19 - C20) + 8 / 9 * (ABS(C20 - C21) + 8 / 9 * (ABS(C21 - C22) + 8 / 9 * (ABS(C22 - C23) + 8 / 9 * (ABS(C23 - C24) + 8 / 9 * (ABS(C24 - C25) + 8 / 9 * (ABS(C25 - C26) + 8 / 9 * (ABS(C26 - C27) + 8 / 9 * (ABS(C27 - C28) + 8 / 9 * (ABS(C28 - C29) + 8 / 9 * (ABS(C29 - C30) + 8 / 9 * (ABS(C30 - C31) + 8 / 9 * (ABS(C31 - C32) + 8 / 9 * (ABS(C32 - C33) + 8 / 9 * (ABS(C33 - C34) + 8 / 9 * (ABS(C34 - C35) + 8 / 9 * (ABS(C35 - C36) + 8 / 9 * (ABS(C36 - C37) + 8 / 9 * (ABS(C37 - C38) + 8 / 9 * (ABS(C38 - C39) + 8 / 9 * (ABS(C39 - C40) + 8 / 9 * (ABS(C40 - C41) + 8 / 9 * (ABS(C41 - C42) + 8 / 9 * (ABS(C42 - C43) + 8 / 9 * (ABS(C43 - C44) + 8 / 9 * (ABS(C44 - C45) + 8 / 9 * (ABS(C45 - C46) + 8 / 9 * (ABS(C46 - C47) + 8 / 9 * (ABS(C47 - C48) + 8 / 9 * (ABS(C48 - C49) + 8 / 9 * (ABS(C49 - C50) + 8 / 9 * (ABS(C50 - C51) + 8 / 9 * (ABS(C51 - C52) + 8 / 9 * (ABS(C52 - C53) + 8 / 9 * (ABS(C53 - C54) + 8 / 9 * (ABS(C54 - C55) + 8 / 9 * (ABS(C55 - C56) + 8 / 9 * (ABS(C56 - C57) + 8 / 9 * (ABS(C57 - C58) + 8 / 9 * (ABS(C58 - C59) + 8 / 9 * (ABS(C59 - C60) + 8 / 9 * (ABS(C60 - C61) + 8 / 9 * (ABS(C61 - C62) + 8 / 9 * (ABS(C62 - C63) + 8 / 9 * (ABS(C63 - C64) + 8 / 9 * (ABS(C64 - C65) + 8 / 9 * (ABS(C65 - C66) + 8 / 9 * (ABS(C66 - C67) + 8 / 9 * (ABS(C67 - C68) + 8 / 9 * (ABS(C68 - C69) + 8 / 9 * (ABS(C69 - C70) + 8 / 9 * (ABS(C70 - C71) + 8 / 9 * (ABS(C71 - C72) + 8 / 9 * (ABS(C72 - C73) + 8 / 9 * (ABS(C73 - C74) + 8 / 9 * (ABS(C74 - C75) + 8 / 9 * (ABS(C75 - C76) + 8 / 9 * (ABS(C76 - C77) + 8 / 9 * (ABS(C77 - C78) + 8 / 9 * (ABS(C78 - C79))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) + 50

So we can calculate an 18 period linear regression slope of a the plain RSI9.

(8.5 * RSI9.1. + 7.5 * RSI9.1.1 + 6.5 * RSI9.1.2 + 5.5 * RSI9.1.3 + 4.5 * RSI9.1.4 + 3.5 * RSI9.1.5 + 2.5 * RSI9.1.6 + 1.5 * RSI9.1.7 + .5 * RSI9.1.8 - .5 * RSI9.1.9 - 1.5 * RSI9.1.10 - 2.5 * RSI9.1.11 - 3.5 * RSI9.1.12 - 4.5 * RSI9.1.13 - 5.5 * RSI9.1.14 - 6.5 * RSI9.1.15 - 7.5 * RSI9.1.16 - 8.5 * RSI9.1.17) / 484.5

And an 18 period moving linear regression of the plain RSI9.

RSI9.18 + 8.5 * (8.5 * RSI9.1. + 7.5 * RSI9.1.1 + 6.5 * RSI9.1.2 + 5.5 * RSI9.1.3 + 4.5 * RSI9.1.4 + 3.5 * RSI9.1.5 + 2.5 * RSI9.1.6 + 1.5 * RSI9.1.7 + 0.5 * RSI9.1.8 - 0.5 * RSI9.1.9 - 1.5 * RSI9.1.10 - 2.5 * RSI9.1.11 - 3.5 * RSI9.1.12 - 4.5 * RSI9.1.13 - 5.5 * RSI9.1.14 - 6.5 * RSI9.1.15 - 7.5 * RSI9.1.16 - 8.5 * RSI9.1.17) / 484.5

But we can't create similar linear regression based Indicator Formulas based on the Wilder's smoothed version of RSI.

A 9-period exponential moving average of a plain RSI9 is just the following.

XAVG(RSI9,9)

We can't do anything similar for the Wilder's smoothed version.

If you want an example of the construction of manually expanded 9-period exponential moving average, it could be done as follows for price (this can also be written as just XAVGC9 on its own without expansion).

.20019827 * (C + .8 * (C1 + .8 * (C2 + .8 * (C3 + .8 * (C4 + .8 * (C5 + .8 * (C6 + .8 * (C7 + .8 * (C8 + .8 * (C9 + .8 * (C10 + .8 * (C11 + .8 * (C12 + .8 * (C13 + .8 * (C14 + .8 * (C15 + .8 * (C16 + .8 * (C17 + .8 * (C18 + .8 * (C19 + .8 * (C20 + .8 * (C21 + .8 * (C22 + .8 * (C23 + .8 * (C24 + .8 * (C25 + .8 * (C26 + .8 * (C27 + .8 * (C28 + .8 * (C29 + .8 * (C30)))))))))))))))))))))))))))))))

You basically need to replace C with the properly formatted bars ago version of whatever you trying to average if you need to use an expansion.

The Monday, September 05, 2005 9:32:18 AM ET post by bustermu explores why the works in a more generalized way.

You don't need to do manual expansions if there is a single argument (such as just RSI9 on its own) to be averaged. In such cases, you can use the XAVG() function.

Thanks Bruce...very much appreciate all that you do- Jim

I am not paying to use your service to become an expert in cascading moving averages.

If your product was as flexible and efficient as you claim, i shouldn't have to.