Registered User Joined: 6/22/2010 Posts: 27
|
I'd like to create criteria that produce a text that can be displayed in a column. ie to test for conditions and output a word.
I found an exaple question from 2008 in which you said it could not be done - but lots has changed since then. Here is that example;
If {
[(Bar.Close(n-4) > Bar.Close(n-3)) AND
(Bar.Close(n-3) > Bar.Close(n-2)) AND
(Bar.Close(n-2) > Bar.Close(n-1)) AND
(Bar.Close(n-1) > Price(n))] Then
Column.Value = “SHORT”
}
ELSEIF{
[(Bar.Close(n-4) < Bar.Close(n-3)) AND
(Bar.Close(n-3) < Bar.Close(n-2)) AND
(Bar.Close(n-2) < Bar.Close(n-1)) AND
(Bar.Close(n-1) < Price(n))] Then
Column.Value = “LONG”
}
ELSE{
Column.Value = “”
}
ENDIF
The code example is not important to me - I'm looking for the script to output text.
Is there a listing of script codes and thier formating criteria? ie the format the system expects for an IF statement a above?
Thanks,
Ethan
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There is not a way to do this currently. Thank you for the suggestion. It has been assigned case number 9193.
The PCF Formula Descriptions topic contains a compehensive list of the syntax which is valid in the Personal Criteria Formula Language and the Handy PCF example formulas to help you learn the syntax of PCFs! topic has some basic examples of how to use the syntax in PCFs.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|