- add summary row(s) to the exploration output

Exploration / Indicators
(AmiBroker 5.20)

SYNTAX AddSummaryRows( flags, format = 0, onlycols = 0, ...)
FUNCTION AddSummaryRows automatically adds "summary" row(s) to the exploration output.

The flags parameter can be combination of the following:

  • 1 - add TOTAL row
  • 2 - add AVERAGE row
  • 4 - add MIN row
  • 8 - add MAX row
  • 16 - add COUNT row
  • 32 - add STANDARD DEVIATION row (new in 5.70)

format - defines the numeric formating in WriteVal style so 1.2 for example means 2 decimal digits.
If default value of zero is used (or parameter not specified) the default formatting of "maximum precision" is used - upto 15 digits are printed

onlycols - defines for which columns you want to display summary row values. Note that if you do not specify any columns - ALL will be printed.

If you are using onlycols, you can define upto 10 columns, columns, like in SetSortColumns are numbered starting from 1. For example:

AddSummaryRows( 1, 1.2, 3, 5, 7, 9 );

Display sum for columns: 3, 5, 7, and 9.

Generally you should call this funciton only once, using combination of flags desired. But it is possible to call AddSummaryRows multiple times and the result will be "accumulation" (i.e. bitwise OR) in case of "flag" parameter. format and onlycols are always overwritten by last call.

EXAMPLE Filter=1;
AddColumn(V, "Volume" );
AddSummaryRows( 31, 1.2 );
// add Total, Average, Min, Max, and Count rows (1+2+4+8+16)=31 - with two decimal places summary rows are added at the top of the list
SEE ALSO AddColumn() function , AddTextColumn() function


The AddSummaryRows function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.