Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/31/2010 Posts: 106
|
Hey Bruce,
I am using a simple PCF I wrote, but would like to add the following and can't figure it out.
What I have: L1 > L2 AND L2 < L3 AND L2 > AVGC63.2
What I want to add: L1 > (The upper band of an envelope channel (attached tp price history) with the settings (x))
(x) = a changable value. (say 63/0.25
Thank you...
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
63/.25 is 252???
How does that create an envelope?
Thanks
|
|
Registered User Joined: 10/31/2010 Posts: 106
|
It doesn't.
I wrote - "say 63/0.25" to give him an example imput for the "changeable value"...
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
Changeable value of what?
|
|
Registered User Joined: 10/31/2010 Posts: 106
|
Are you asking because you have the skill to write what I need? If not, please wait for Bruces's reply to me and then I'll be glad to answer any futher questions you have...
|
|
Registered User Joined: 10/9/2011 Posts: 485
|
PCF cannot have parameters. Its hard coded. So if you want to change some parameters you have to reopen the pcf and add those parameters. This is an enhancement that has been added in the past though that is pending to support parameters in pcf.
In regards to your envelope question, bruce would be the best person to answer that question.
|
|
Registered User Joined: 10/31/2010 Posts: 106
|
As far as Bruce being the right guy to help, that's why I addressed the post to him! But thank you kindly for talking the time.
Also, I know I need to open it up to change it. Typically when one askes Bruce to script an indicator, people forget to mention the values of the indicator. I simply gave him some.
Hey all, please refrain from adding to this post until Bruce gets a chance to reply. Thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
As mentioned by diceman and busterram, there really isn't a way to create a Personal Criteria Formula with adjustable settings. You would need to manually adjust the Condition Formula if the settings change.
An envelope channel in TC2000 version 12 is just a moving average +/- a %. So an upper simple envelope channel 63, 0.25 can be written as follows.
1.0025 * AVGC63
And a lower simple envelope channel 63, 0.25 can be written as follows.
.9975 * AVGC63
If you are comparing the low of yesterday, I'm assuming you would be comparing it to the upper envelope channel from yesterday, so the PCF fragment checking for L1 to be above the simple upper envelope channel 63, 0.25 could be written as follows.
L1 > 1.0025 * AVGC63.1
You could create a condition which is adjustable if you don't use a formula. You would add a 1-period moving average offset by 1 to price and then add the envelope channel to the offset moving average. You would also need to another 1-period moving average offset by 1 to price but with the Average of setting set to Low instead of Last.
This would allow you to click on the offset moving average of the low and select Create Scan Condition to check for it being above the top channel of the envelope channel applied to the 1 period offset moving average of price.
Create Conditions from Your Chart (5:25)
Building a Scan with Multiple Conditions (7:29)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/31/2010 Posts: 106
|
Oops, forgot to say thank you!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |