Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Gold Customer
Joined: 7/26/2007 Posts: 26
|
I'm having trouble writing a PCF to use in an Easyscan for Wilder's 2 period RSI where:
two days ago RSI2 was below 65
and yesterday RSI2 was below RSI2 two days ago
and today RSI2 is below RSI2 yesterday
I searched the existing RSI2 posts and couldn't find what I needed. Any help would be appreciated.
Thanks,
Joe
|
|
Registered User Joined: 1/28/2005 Posts: 125
|
joemar1961;
> two days ago RSI2 was below 65
(RSI2.1.2 < 65)
> and yesterday RSI2 was below RSI2 two days ago
AND (RSI2.1.1 < RSI2.1.2)
> and today RSI2 is below RSI2 yesterday
AND (RSI2.1 < RSI2.1.1)
PCF Name: RSI2.1 down
((RSI2.1.2 < 65) AND (RSI2.1.1 < RSI2.1.2) AND (RSI2.1 < RSI2.1.1))
EasyScan:
WatchList to Scan:
[Add condition]s
...
. RSI2.2 down - True
ejr39
|
|
Gold Customer
Joined: 7/26/2007 Posts: 26
|
Thanks, but to my knowledge the Worden RSI is not the same as Wilder's RSI. If I am making a scan that utilizes Wilder's 2 period RSI then I would need the formula for Wilder's 2 period RSI.
But then I need to know how to use that formula for one day ago and two days ago.
Thanks,
Joe
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
joemar1961,
If you are talking a Wilder's RSI with the following settings:
- RSI Period: 2
- Use Wilders Smoothing: Checked
- Avg Period: 1
- Average Type: Doesn't matter (because the Avg Period is 1)
Then you might want to try the following formulas:
two days ago RSI2 was below 65:
50 * (C2 - XAVGC3.3) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 65
yesterday RSI2 was below RSI2 two days ago:
50 * (C1 - XAVGC3.2) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 50 * (C2 - XAVGC3.3) / 2 / (.500030519440884 * (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)))))))))))))))) + 50
today RSI2 is below RSI2 yesterday:
50 * (C - XAVGC3.1) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 50 * (C1 - XAVGC3.2) / 2 / (.500030519440884 * (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)))))))))))))))) + 50
Put together would be:
50 * (C2 - XAVGC3.3) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 65 AND 50 * (C1 - XAVGC3.2) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 50 * (C2 - XAVGC3.3) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 AND 50 * (C - XAVGC3.1) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 50 * (C1 - XAVGC3.2) / 2 / (.500030519440884 * (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)))))))))))))))) + 50
That said, I might seriously consider using the following instead:
50 * (C2 - XAVGC3.3) / 2 / (.500030519440884 * (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)))))))))))))))) + 50 < 65 AND C1 < C2 AND C < C1
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF)
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
Cascades of Moving Averages
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 7/26/2007 Posts: 26
|
Thank you so much Bruce. I will try those and see how they work.
But now I'm wondering why the formula you provided here for today's Wilder's 2 period RSI is different from the one that was posted a couple years ago which started with:
100 - ( 100 / ( 1 + ( -500.0305 * (C0-C1>0) and then went on for 14 lines. Is one version more accurate than the other?
Thanks for the help.
Joe
|
|
Gold Customer
Joined: 7/26/2007 Posts: 26
|
While we're at it can you also provide me with the formula for this same RSI2 but this time for 3 days ago. I would like to double check myself.
Thank you so much,
Joe
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
joemar1961,
Neither version is more accurate, the version in this topic is more efficient.
2-Period Wilder's Smoothed RSI (3-Periods Ago):
50 * (C3 - XAVGC3.4) / 2 / (.500030519440884 * (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)))))))))))))))) + 50
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 7/26/2007 Posts: 26
|
Thanks Bruce. I appreciate it.
Joe
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/28/2005 Posts: 125
|
joemar1961;
Evaluate the 2-period 2-days ago RSI using Wilder's smoothing
with the 2-period 2-days ago RSI Simple and the 2-period 2-days
ago RSI Exponential
In a Middle or Bottom Window
(remove all other indicators)
. Custom Indicator (2 days ago, Wilder's RSI - Period:2 Average:1 - Wilder's smoothing PCF)
__ Draw Color: white
__ Draw Style: Normal
__ Check: Visible
__ UNCheck: Center Zero Line
__ UNCheck: Plot using price scle
__ Smoothing Average: 1 Simple or Exponential (1 = no moving average)
__ Indicator Formula:
50 * (C2 - XAVGC3.3) / 2 / (.500030519440884 * (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)))))))))))))))) + 50
. Custom Indicator (2-days ago, Wilder's RSI - Period:2 Average:1 - Simple)
__ Draw Color:
__ Draw Style: Normal
__ Check: Visible
__ UNCheck: Center Zero Line
__ UNCheck: Plot using price scle
__ Smoothing Average: 1 Simple or Exponential (1 = no moving average)
__ Indicator Formula: (RSI2.1.2)
Which charted is identical (overlays) to the following
. Custom Indicator (2-days ago, Wilder's RSI - Period:2 Average:1 - Exponential)
__ Draw Color:
__ Draw Style: Normal
__ Check: Visible
__ UNCheck: Center Zero Line
__ UNCheck: Plot using price scle
__ Smoothing Average: 1 Simple or Exponential (1 = no moving average)
__ Indicator Formula: XAVG(RSI2.1.2,1)
In the lower right corner of the screen, click the small scaling box
until the scale color is white - the RSI formula with Wilder's
smoothing is NOT on a 100 to 0 scale.
Note that all the lines travel together, the RSI2.1.2 and the XAVG(RSI2.2.2,) formulas
while less smooth are more definitive and may be a tad faster. AND the simple
formulas don’t have the added problem of guessing what the scale values are.
ejr39
|
|
Gold Customer
Joined: 7/26/2007 Posts: 26
|
Thank you.
|
|
Guest-1 |