MarketScript > Attributes |
Formula attributes can be specified in square brackets following the formula expression.
lag( "/GCL" * 2.32, 1 calendar ); [#6] // output precision in six decimal places
Precision attribute can be used to specify output precision of the formula.Number following '#' character defines number of decimal places after decimal point
wagg(
"/GCL",
startday:mon
);
[#2] // round to two decimal places
("/GCL[0]" + "/GCL[1]") / 2;
[validuntil:20-03-2012] //prodces no values after 20-03-2012
("/GCL[0]" + "/GCL[1]") / 2;
[validfrom:01-03-2012] //prodces no values before 01-03-2012
Combined:
("/GCL[0]" + "/GCL[1]") / 2;
[validfrom:01-03-2012, validuntil:20-03-2012]
//prodces no values before 01-03-2012 and after 20-03-2012
Multiple attributes can be specified in separate square brackets, or in single separated by commas
("/GCL[0]" + "/GCL[1]") / 2;
[#4] // precision 4 decimal places
[validfrom:01-03-2012, validuntil:20-03-2012]
("/GCL[0]" + "/GCL[1]") / 2;
[#4, validfrom:01-03-2012, validuntil:20-03-2012]