/*
I'm attempting to use an Amibroker exploration which in one go will indicate how many periods a stock has traded in different multi time frames.
ie, Monthly, weekly and daily.
This is my attempt below but the exploration results come out all the same.
Any suggestions?
Is it is possible?
I've researched this a bit but can't suss it out.
*/
TimeFrameSet(inMonthly);
Period1 = LastValue(Cum(1)) -1; // total number of MONTHLY bars traded
TimeFrameRestore();
TimeFrameSet(inWeekly);
Period2 = LastValue(Cum(1)) -1; // total number of WEEKLY bars traded
TimeFrameRestore();
TimeFrameSet(inDaily);
Period3 = LastValue(Cum(1)) -1; // total number of DAILY bars traded
TimeFrameRestore();
Filter = 1;
AddColumn(Period1, "Period1" ); // Monthly
AddColumn(Period2, "Period2" ); // Weekly
AddColumn(Period3, "Period3"); // Daily
// or
AddColumn(TimeFrameExpand(Period1, inMonthly), "Period1" ); // Monthly
AddColumn(TimeFrameExpand(Period2, inWeekly), "Period2" ); // Weekly
AddColumn(TimeFrameExpand(Period3, inDaily), "Period3" ); // Daily
I'm attempting to use an Amibroker exploration which in one go will indicate how many periods a stock has traded in different multi time frames.
ie, Monthly, weekly and daily.
This is my attempt below but the exploration results come out all the same.
Any suggestions?
Is it is possible?
I've researched this a bit but can't suss it out.
*/
TimeFrameSet(inMonthly);
Period1 = LastValue(Cum(1)) -1; // total number of MONTHLY bars traded
TimeFrameRestore();
TimeFrameSet(inWeekly);
Period2 = LastValue(Cum(1)) -1; // total number of WEEKLY bars traded
TimeFrameRestore();
TimeFrameSet(inDaily);
Period3 = LastValue(Cum(1)) -1; // total number of DAILY bars traded
TimeFrameRestore();
Filter = 1;
AddColumn(Period1, "Period1" ); // Monthly
AddColumn(Period2, "Period2" ); // Weekly
AddColumn(Period3, "Period3"); // Daily
// or
AddColumn(TimeFrameExpand(Period1, inMonthly), "Period1" ); // Monthly
AddColumn(TimeFrameExpand(Period2, inWeekly), "Period2" ); // Weekly
AddColumn(TimeFrameExpand(Period3, inDaily), "Period3" ); // Daily