Displaying time frame in scan / explorer

I have looked at the page which described multiple timeframe logic in AFL (timeframeset() etc)- but i am looking to display time frame label in my scan/explorer report which suggests what timeframe bars are used to arrive at metrics.

Also, if i am using different time frames in AFL - how do i store that as a text variable and display different time frames for different metrics eg: 9 period EMA on weekly bars; 30 period SMA on daily bars...

Again i am not asking on how to get the numbers (that i figured out), i am asking how to get the corresponding variables populated "Daily", "Weekly"

Thanks ...Satish

selected_interval = Interval(2);

TimeFrameSet(inWeekly);
    compressed_interval = Interval(2);
TimeFrameRestore();

// No expanding of compressed_interval variable
// required since it is just string not array of numbers.

Filter = Status("LastBarInRange");

AddTextColumn(selected_interval, "selected_interval", 1);
AddTextColumn(compressed_interval, "compressed_interval", 1);

906

5 Likes

Thank you - that worked!