Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 69
|
Bruce,
You wrote this fx last time for a generic OBV xUP it's 10sma:
9 * SGN(C - C1) * V + 8 * SGN(C1 - C2) * V1 + 7 * SGN(C2 - C3) * V2 + 6 * SGN(C3 - C4) * V3 + 5 * SGN(C4 - C5) * V4 + 4 * SGN(C5 - C6) * V5 + 3 * SGN(C6 - C7) * V6 + 2 * SGN(C7 - C8) * V7 + SGN(C8 - C9) * V8 > 0 AND 9 * SGN(C1 - C2) * V1 + 8 * SGN(C2 - C3) * V2 + 7 * SGN(C3 - C4) * V3 + 6 * SGN(C4 - C5) * V4 + 5 * SGN(C5 - C6) * V5 + 4 * SGN(C6 - C7) * V6 + 3 * SGN(C7 - C8) * V7 + 2 * SGN(C8 - C9) * V8 + SGN(C9 - C10) * V9 <= 0
Is this the correct way to translate the SGN function:
SGN(C-C1) = (((C-C1)/(C-C1)2).05) i.e., (X / absX) ? If not are you able to write a simplified fx re. SGN?
Thanks
SC
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Your method will produce a division by zero error if C = C1, but that's the general idea - although I would probably adjust the parentheses somewhat:
(C-C1)/(((C-C1)2).5)
Without knowing the specific restrictions and having a complete list of the syntax of the program where you are using this, I cannot suggest what might be the best method (I'm assuming from the fact that you are squaring and then taking the square root that you don't have an ABS() function either).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 69
|
Hi Bruce,
You're right the trading platform I use does not have an ABS fn. I would be using the above syntax for the c/o of OBV (?- does the fx you wrote give the 10sma or 0 c/o?).
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It is a cross of OBV up through its own Moving Average. OBV is a Cumulative Indicator and a crossup of zero would be meaningless.
Dealing with OBV & MS in PCF's - how to interp their "values"
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |