formatPriceNumber() |
Previous Top Next |
formatPriceNumber( value )
Returns a string with the passed value correctly formatted for the symbol in the chart that is currently displayed. Useful for converting a raw price value to a suitable display value when working with bonds, notes, currencies or any other instrument that has special formatting requirements.
Parameters
value |
the price value to be formatted |
Usage
function main() {
...
...
if ( isLastBarOnChart() == true ) {
//clear the Formula Output Window
debugClear();
//print a line of text to that window
debugPrint( "The current close value is: " + formatPriceNumber( close(0) ) + "\n" );
}
}