[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TS8 intrabarpersist



PureBytes Links

Trading Reference Links

At 10:06 AM 12/11/2005, xxx wrote:

>Where did you find out about this variable type?

I don't recall. Possibly in the list of new features.

You can read about it in the on-line Users Guide. Search for 
"IntraBarPersist" or read the info on the Variable statement 
(see below).

There are also new data types "float", "double",  and "int".

Bob 

----------------------------------------------------

Variable (Reserved Word)    same as Var, Vars, Variables

The reserved word Variable (or Var, Vars, Variables) is used to 
specify the name of a user-declared variable, its initial value, and 
optional data type.  This must be done before a user-declared variable 
can be used in an assign statement or formula.  Multiple variables 
names may be declared using a single Variable statement where the 
names are separated by commas.

Syntax-Common

Variable: Name(Value) ;

Where Name is the unique name of the user-declared variable, and Value 
is either a Numeric, True/False or String value used as the initial 
value of the variable.

Syntax-Complete

Variable: <IntraBarPersist> <DataType> VarName(InitialValue<,datan>) 
<, <IntraBarPersist> <DataType> VarName(InitialValue<,datan>)> ;

Variable is the variable declaration statement that may alternately be 
typed as Var, Vars or Variables.

IntraBarPersist indicates that a variables value can be updated on every tick.  By 
default, variable values are only updated at the close of each bar. 

DataType is the optionally supplied data type (float, double, int, 
bool, string) of the variable

VarName is the user specified variable name that can be up to 20 
characters long and must begin with an alphabetic character (names are 
not case sensitive)

InitialValue is the initial value of the variable

datan is an optional parameter that identifies the data stream the 
variable is tied to and may be data1 through data50.  

Remarks

A variable name can contain up to 20 alphanumeric characters plus the 
period ( . ) and the underscore ( _ ).

A variable name can not start with a number or a period ( . ).

The default value of a variable is declared by a number in parenthesis 
after the input name.

Multiple variables names may be declared using a single Variable 
statement where the names are separated by commas.

The use of the reserved words Variable,Var, Vars, and Variables is identical.

Examples

Variable: Count(10);

declares the variable Count and initializes the value to ten.

Var: MADiff(0), MyAverage(0);

declares the variables MADiff and MyAverage and initializes their 
values to zero.