I spent the past few days working with custom metrics for the first time. They allow you to insert values into your Backtest Trade Report for each and every trade!.
The example Tomasz provides above works perfectly. Set up a sandbox.afl and copy and run the sample code.
I believe you can replace “ATR” with whatever “Column Heading” you like, and ATR(15) with just about any calculation you like. If you haven’t already, I suggest you read up on how Static Variables work.
One tidbit I found somewhat burried in the documentation is that each static variable contains timestamps automatically added. Using trade.entrydate you can retrieve the static variables value at that exact point in time.
Perhaps someone else can better explain or provide a link that explains the contents of static variables.