Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/5/2008 Posts: 117
|
The below PCF's appear in an article by Christian Pratsch in the April Edition of S & C. When I try to use the formulas I keep getting an error message "Unmatched Parentheses." Thanks in advance for the help.
Long: (STOC12,1 > 78) OR ((STOC12,1 < 78) AND (STOC12,1 > AVG(STOC12,1,3)))
Short: (STOC12,1 < 78) OR ((STOC12,1 > 78) AND (STOC 12,1 < AVG(STOC12,1,3)))
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
I don't use Stochastic PCFs, but you should be able to figure it out here: http://forums.worden.com/default.aspx?g=posts&t=66571.
I'd taka a crack at it, but I'm going out on a coffee & donut run. :)
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Haven't finished my coffee yet, but this syntax returns no error messages. Whether it does what the author intended is a question for someone else. :) ...
STOC12.1 > 78 OR STOC12.1 < 78 AND STOC12.1 > AVG(STOC12.1,3)
I prefer the dots to the commas (in this case) which allowed me to ditch a bunch of the parenthesis.
Good luck!
|
|
Registered User Joined: 1/5/2008 Posts: 117
|
Thanks, really appreciate you taking the time to do that. Seems to be working fine.
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Happy to help!
I'm lazy, so whenever I need a PCF I ask Bruce (he spoils me) but in this case a quick look at the documentation shows the correct syntax. I'm still not sure what the difference is between an indicator version and a function version, but maybe Bruce can explain the significance (if any) Monday.
Also, it's a shame the PCF in the S&C Mag returns an error. It's not the first time I've encountered errors in the code in that magazine. I know publishing ain't easy, but c'mon ... a little proofreading would be awesome.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I wish there were a difference between the indicator and function versions. I really do.
It would be very nice if the function version took another indicator formula as one of its arguments and could be used kind of like how Data Source works on plotted indicators but with other formulas as arguments instead of a plotted indicator.
Unfortunately there pretty much isn't a difference and it doesn't work that way (except when it does for example with moving averages, minimum, maximum, greatest, least, sum, and all of the math functions).
The only time it seems to make any difference when both versios of the syntax exist as far as I can tell is averages, minimimum, maximum, and one indicator. That indicator is Bollinger Bands. The function version allows you to specify a fractional width setting while the indicator version does not (because the period gets interpreted as indicating the next parameter instead of as a decimal marker in the indicator version).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |