Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 794
|
My formula is (C/XAvgC13) 1 period w 5XMA
How do I develop a PCF to show when it is 5% under and the the crossing point?
Also when it crosses on a realtime basis?
TY
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
To be sure I understand you...
You are plotting C/XAVGC13 on the chart?
You have a 5xma on this plot?
If this is the case then you can use Visual Difference sorting to find stocks where your indicator is close, crossing or has crossed its own MA. This will even work with intraday charts and RT.
Check out this video:
Comparing indicators using Visual Difference sorts
- Craig Here to Help!
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
I understand that point but I would like to write a PCF in order that I can put it into another format.
|
|
Registered User Joined: 2/2/2005 Posts: 3
|
Craig -- I would like to thank you for your help. My PCF was originally wrong (I am embarassed that I didn't check it more carefully) so my problem is resolved. Again, thank you for all the info you gave me. Regards, NJA
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Craig,
I believe the last post was placed incorrectly in this stream.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Quicktdr:
The visual sorting is your only option for RT and Intraday charts.
As for a PCF representing the relationship between your indicator and its average, you cannot group operators within the brackets of the AVG() function, so XAVG((C/XAVGC13),5) would not be a valid argument in TeleChart's PCF Language.
I've come up with two approximations (and they are both super-darn close):
Formula 1: 100 * (C / XAVGC13) / (XAVGC5 / XAVG(XAVGC13,5))
Formula 2: 100 * C / XAVGC13) / ((C / XAVGC13 + 4 / 6 * (C1 / XAVGC13.1 + 4 / 6 * (C2 / XAVGC13.2 + 4 / 6 * (C3 / XAVGC13.3 + 4 / 6 * (C4 / XAVGC13.4 + 4 / 6 * (C5 / XAVGC13.5 + 4 / 6 * (C6 / XAVGC13.6 + 4 / 6 * (C7 / XAVGC13.7 + 4 / 6 * (C8 / XAVGC13.8 + 4 / 6 * (C9 / XAVGC13.9 + 4 / 6 * (C10 / XAVGC13.10 + 4 / 6 * (C11 / XAVGC13.11 + 4 / 6 * (C12 / XAVGC13.12 + 4 / 6 * (C13 / XAVGC13.13 + 4 / 6 * (C14 / XAVGC13.14 + 4 / 6 * (C15 / XAVGC13.15 + 4 / 6 * (C16 / XAVGC13.16))))))))))))))))) / (3 - 2 * (4 / 6) ^ 16))
Both plot (C/XAVGC13) as a percentage of an approximation of the 5xma of itself. The first formula approximates the average of your indicator by averaging the numerator and denominator of the indicator separately instead of averaging the indicator itself (which is a pretty good approximation in this case and keeps the formula short). The second formula correctly averages the entire indicator, but is much longer with accuracy limited by the number of terms used for the approximation.
- Craig Here to Help!
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Thank you for your prompt reply.
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Your PCF is only showing spikes. Is there a way of tweaking formula for candidates that are within 5% of crossing?
In other words I want my formula to be pointing up but not yet crossing, thus the 5% variable.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
The formula plots (C/XAVGC13) as a percentage of an aproximation of the 5xma of itself
So you can limit the values to .95 to 1.05 if you like.
Keep in mind most of the time a 5xma is going to be very close to its parent. I am sure you can see this on the plot of C/XAVGC13 with a 5xma. You will likely find many stocks within 5%.
For crossovers try this:
(C/XAVGC13)>(XAVGC5/XAVG(XAVGC13,5)) AND (C1/XAVGC13.1)<(XAVGC5.1/XAVG(XAVGC13.1,5))
- Craig Here to Help!
|
|
Registered User Joined: 10/7/2004 Posts: 794
|
Craig,
TY I believe this may be what I was looking for.
|
|
Registered User Joined: 2/20/2005 Posts: 6
|
I have plotted moving average of 50 & 200 on the price graph. I am trying to find the crossing point for various stocks by following PCF.
AVGC200.2 > AVGC50.2 AND AVGC50 > AVGC200
It doesn't seem to work.
|
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
I replied to your other post here:
Formula for crossing moving averages
- Craig Here to Help!
|
|
Guest-1 |