Warning 509. You must use TimeFrameExpand() to expand compressed arrays after you used TimeFrameSet and/or TimeFrameCompress.

You are not using time frame functions correctly as described in the Tutorial on TimeFrame usage.

You formula contains calls to TimeFrameSet() and/or TimeFrameCompress() but you are not calling TimeFrameExpand() to expand resulting arrays.

TimeFrameExpand() IS ABSOLUTELY REQUIRED for any formula that uses TimeFrame* functions. If you don't expand time compressed data you will have incorrect timestamps (see description below in "How it works" in Tutorial on TimeFrame usage).

The Tutorial on TimeFrame usage is MUST READ for everyone wanting to use time frame functions.

TimeFrameSet( inDaily ); // will produce Warning 509 because of missing TimeFrameExpand
x = MA( Close, 5 ); // get daily MA
TimeFrameRestore();

AddColumn( x, "daily MA" ); // INCORRECT! You must call TimeFrameExpand !!!

Correct code would look like this:


TimeFrameSet( inDaily );
x = MA( Close, 5 ); // get daily MA
TimeFrameRestore();

AddColumn( TimeFrameExpand( x, inDaily ), "daily MA" ); // CORRECT ! Calling TimeFrameExpand to expand compressed array