You can do that already: when you set TICKS, g->asset->pTicks[i] is a pointer to a list of TICK pointers within bar i. You can then use this list for computing the moments and other statistics within the bar. Use the Moment function, not the StdDev function.

In live trading though, ticks are not stored in an array, so you'd need to update the statistics in a TMF in real time.