There are two likely reasons why there are no values being calculated for these columns:
The line added to ExampleFunctionConfigurationPopulator is not quite right. This defines the new functions against the name “EXAMPLE_FUNCTIONS” in the configuration database, but this entry is then replaced by a line further on in the file which defines “EXAMPLE_FUNCTIONS” as the union of “FINANCIAL_FUNCTIONS”, “STANDARD_FUNCTIONS”, and “CUBE_FUNCTIONS”. Modifying the code to https://gist.github.com/andrewgriffin/7929888 should address this. The new functions are written into a new configuration entry (called “custom”) and that is then merged into the overall “EXAMPLE_FUNCTIONS” set used by the engine.
The function is now in the repository, and is correctly defined, but only tells the system how to calculate DOUBLE_CLOSE at the SECURITY level. The grid of values displayed in the web interface shows values at the PORTFOLIO_NODE, POSITION, and TRADE level. One option is to add the following line to MyFunctions.java:
The function repository will now include rules to get from a value at the security level to values at the TRADE/POSITION level (by multiplying the security level value by the trade/position quantity) and to the PORTFOLIO_NODE level (by summing the position values). Depending on the meaning of the DOUBLE_CLOSE value, you might not want the value from the security level to be multiplied by the trade/position quantity. In which case, the AnalyticsFunctions.addUnitScalingAndSummingFunction may be more suitable. If producing a value at the aggregate level in this way makes no sense, or if a custom aggregation strategy is needed, then further alternatives are the addUnitScalingFunction and addScalingFunction methods from the same class.