Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/15/2006 Posts: 19
|
I would like to write a PCF for just a 2-period RSI (simple, not exponential). Just like an RSI that you would see in StockCharts.com or eSignal (just shortening the timeframe from 14 to 2).
Thanks so much.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following:
100 * ((C > C1) * (C1 - C) + .5 * ((C1 > C2) * (C2 - C1) + .5 * ((C2 > C3) * (C3 - C2) + .5 * ((C3 > C4) * (C4 - C3) + .5 * ((C4 > C5) * (C5 - C4) + .5 * ((C5 > C6) * (C6 - C5) + .5 * ((C6 > C7) * (C7 - C6) + .5 * ((C7 > C8) * (C8 - C7) + .5 * ((C8 > C9) * (C9 - C8) + .5 * ((C9 > C10) * (C10 - C9) + .5 * ((C10 > C11) * (C11 - C10) + .5 * ((C11 > C12) * (C12 - C11) + .5 * ((C12 > C13) * (C13 - C12) + .5 * ((C13 > C14) * (C14 - C13) + .5 * ((C14 > C15) * (C15 - C14) + .5 * ((C15 > C16) * (C16 - C15) + .5 * ((C16 > C17) * (C17 - C16)))))))))))))))))) / (ABS(C - C1) + .5 * (ABS(C1 - C2) + .5 * (ABS(C2 - C3) + .5 * (ABS(C3 - C4) + .5 * (ABS(C4 - C5) + .5 * (ABS(C5 - C6) + .5 * (ABS(C6 - C7) + .5 * (ABS(C7 - C8) + .5 * (ABS(C8 - C9) + .5 * (ABS(C9 - C10) + .5 * (ABS(C10 - C11) + .5 * (ABS(C11 - C12) + .5 * (ABS(C12 - C13) + .5 * (ABS(C13 - C14) + .5 * (ABS(C14 - C15) + .5 * (ABS(C15 - C16) + .5 * (ABS(C16 - C17))))))))))))))))))
It matches the following Wilder's RSI Settings in TeleChart:
RSI Period: 2 Use Wilders Smoothing: Checked Avg Period: 1 Average Type: Doesn't matter (because the Avg Period is 1).
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs!
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/15/2006 Posts: 19
|
Thanks. Works perfect. Thanks again!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |