×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

MessageLog

68 bytes added, 10:15, 9 February 2012
no edit summary
Displays one or more specified expressions in the PowerLanguage Editor Output Log. Any combination of string, true/false, numerical series, or numerical expressions can be specified.
==== Usage ====
<syntaxhighlight>MessageLog(Expression1,Expression2,etc.)</syntaxhighlight>
==== Parameters ==== [[:'''Expression]] ''' - a string, true/false, numerical series, or numerical expression; any number of valid expressions, separated by commas, can be used .
::A string expression must be enclosed in quotation marks, for example ''MessageLog("Hello World!")''.
::A numerical expression can be formatted to specify the minimum number of characters, including the decimal point, and the number of decimal places, to be used for the output:
A :::'''Expression:C:D''string expression'::::Where: :::::'''C''' must be enclosed in quotation marks- minimum number of characters,::::: [["String Expression"]] '''D''' - number of decimal places.
 A '''''numerical expression''''' can be formatted to specify the minimum number of characters, including the decimal point, and the number of decimal places, to be used for the output:  [[Expression:C:D]]  Where: [[C]] - minimum number of characters [[D]] - number of decimal places   The default output format for a numerical expression is two decimal places and a minimum of seven characters. :::If the number of decimal places in the numerical expression is more than the specified number, the value will be will be rounded off to the specified number of decimal places.  :::If the number of characters in the output is less than the specified minimum, leading spaces will be added to bring the output to the specified minimum value.
==== Example ====<syntaxhighlight>MessageLog(.1); will </syntaxhighlight>Will display 0.10 in the PowerLanguage Editor Output Log, with three leading spaces inserted  MessageLog(1.555555:6:3); will display 1.556 in the PowerLanguage Editor Output Log, with oneleading space inserted
<syntaxhighlight>MessageLog("Current Time is:",CurrentTime1.555555:56:03); will </syntaxhighlight>Will display 1.556 in the string expression "Current Time is:", followed by the output of the CurrentTimePowerLanguage Editor Output Log, with one leading space inserted, inthe PowerLanguage Editor Output Log</syntaxhighlight>.
<syntaxhighlight>MessageLog("Current Time is:",CurrentTime:5:0);</syntaxhighlight>
Will display the string expression "Current Time is:", followed by the output of the CurrentTime, with one leading space inserted, in the PowerLanguage Editor Output Log.
[[Category:Output]]

Navigation menu