How to switch time frames

Hi Everyone,

I am exploring "TimeFrameSet" function.
below is my code.

TimeFrameSet( in5Minute );

FiveMinuteHigh = High ;

TimeFrameSet(inDaily);
TodayHigh= High;
yesterdayClose= Ref(C,-1);
TimeFrameRestore();

Filter= 1;
AddColumn(FiveMinuteHigh ,"FiveMinuteHigh",1.2);
AddColumn(TodayHigh,"TodayHigh",1.2);
AddColumn(yesterdayClose,"yesterdayClose",1.2);

But in the exploration my code is not showing values for daily time frame. It is showing values only to 5 minutes. Can some one rectify the code?
i am looking for "High" values of 5 minute candle along with the Day candle.

TimeframeSet_Error

Your TodayHigh and yesterdayClose arrays are still compressed to daily bars. You need to expand them with TimeFrameExpand() before using them. You may also want to learn about the function TimeFrameGetPrice().

4 Likes

@Kum001 - do you have AmiBroker license? Your email used on this forum is not in licensed users database and you are using forum for 10 months already.