Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/28/2005 Posts: 6,049
|
I was trying to create a force index:
(C-C1)*V
The answer is smoothed by a 2 period exponential moving average.
Then that answer is smoothed by a 14 period exponential moving average.
This is easy to do with "child" indicators. However the scaling on the 2 period smoothing is so large it makes the 14 result too small.(to view)
Is it possible to have both the 2 and 14 smoothing in one equation so the only output is the 14 ?
Thanks
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
It sure is.
Edit your CUSTOM INDICATOR and set this as the formula:
0.666971637694419 * (((C-C1)*V) + 1 / 3 * (((C1-C2)*V1) + 1 / 3 * (((C2-C3)*V2) + 1 / 3 * (((C3-C4)*V3) + 1 / 3 * (((C4-C5)*V4) + 1 / 3 * (((C5-C6)*V5) + 1 / 3 * (((C6-C7)*V6))))))))
then, still in the CUSTOM INDICATOR window set the SMOOTHING to 14 exponential.
- Craig Here to Help!
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Thanks Craig.
I was hoping some version of the double smoothing:
XAVG(XAVGC2,14) could be used.
(which I believe is a 14 period smoothing of a 2 period smoothing.)
That way it would be easier to experiment with different values.
Is it as simple as doing a version of C,C1,and V something like:
(XAVG(XAVGC2,14)-XAVG(XAVGC2.1,14.1))*(XAVG(XAVGV2,14)) ????
In the PCF language is 2 times the limit of an average smoothing itself.
(without using child indicators or "raw" math)
Thanks
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
You have to smooth the smoothed equation (which my method above does). You cannot exponentially smooth the elements first.
My method above has no child indicators.
Changing the second smoothing in my method is easy (change the 14 to anything). If you want to change the first smoothing (2-day above) just let me know and I will write it up for you.
- Craig Here to Help!
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Craig
Realize that I know your equation "worked" and did what I wanted. (That was why I thanked you first)
However I have found it much more desirable to have a complete equation "if possible" rather than add smoothing in a custom indicator. I'm talking in general terms and not necessarily about this equation.
As I understand it. (I could be wrong)
I cant use your equation in a watchlist tab. I cant use your equation in an easy scan. I cant use SGN(equation) to indicate a positive/negative condition. I cant create a percent true "spike" EQ>0 and EQ.1<0 I cant create a percent true "spike" EQ<0 and EQ.1>0
Most of this is caused by the 14 exp smoothing at the end. Even though it is not a child indicator it has the same undesirable qualities.
This is why I was probing. If something could be done using the "XAVG(XAVGC2,14)" format it would be much more desirable. I was trying to determine if you simply chose to write out the exp mav (2) because it was simple or is it not doable with the XAVG function.
I also had some ideas of looking into TRIX. While I know it can be done. It is much more desirable (because of the above) if you can triple smooth within the XAVG function.
That was what led me to ask if double smoothing was the max the PCF language could handle.
Thanks
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
diceman,
1) The EMA of a sum is the sum of the EMA's. The EMA of a product of is not generally the product of the EMA's unless one of the factors is constant.
2) The PCF Language is capable of the application of an arbitrary number of EMA's to any quantity. You cannot, however, use the function XAVG(.,.) on V*(C0-C1).
3) I suggest you plot V*(C0-C1) as a Cumulative Indicator and interpret it exactly as you would MS or OBV. It is possible to give a reasonable interpretation to EMA's applied to V*(C0-C1) but I have never seen anyone with that talent including myself. One would have to be a savant to do so. Even I can interpret the Cumulative Indicator.
Thanks, Jim Murphy
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Thanks for the response bustermu.
I was about 95% sure that:
(XAVG(XAVGC2,14)-XAVG(XAVGC2.1,14.1))*(XAVG(XAVGV2,14))
would not produce the desired result. I was using it as an example of the form that would be preferable.
(I am not even sure if this gives an error message or if I put the ".1s" in the correct spot.)
It is interesting that there is a "smoothing" option in the CI window but not in the PCF window. This means I can create CIs that are not directly transferable to PCFs. (although "long hand" methods can be used to achieve the desired result)
Thanks
|
|
Guest-1 |