PRINT

Top  Previous  Next

Prints values to the log window (found under the Debug menu) and the print log files (see below).

 

Syntax

 

PRINT [expression, expression,...]

 

expression                An expression to be printed, separated by commas or semicolons

 

PRINT  without any parameters writes out a blank line.

 

Example

VARIABLES: variableOne, variableTwo TYPE: String

 

variableOne = "Hello I am "

variableTwo = "Bob"

 

PRINT variableOne, variableTwo

PRINT "Don't blame me, blame ", variableTwo

 

 

You can also print mathematical expressions which will be evaluated:

 

PRINT ( AbsoluteValue ( random ( 10 ) - 100 ) )

 

 

Printing is extremely useful for debugging.  For instance, if you are trying to figure out why something won't work, can be useful to put several print statements like:

 

PRINT "The date: ", instrument.date, "Close: ", instrument.close

PRINT "The variable in question: ", entryRiskOrSomeOtherVariable

PRINT ""

 

You can print any expression, variable, parameter, indicator, or object.

 

Print Log Files

PRINT sends output to the log window and to two additional files:

 

C:\Program Files\TradingBlox\Results\PrintOutput.csv

C:\Program Files\TradingBlox\Log Files\Normal.log

 

PrintOutput.csv is re-written every time a test is run.  Normal.log stores up to 1 MB of data, so it has results from as many tests as it can hold.  After it is full, it will create Normal.log.1, Normal.log.2, etc. up to 10 MB of print results.

 

These files are comma delimited for use in other programs.