Hello, I’m trying to plot volume profile for a “QUARTER” (past 3 months) period, but not sure how to code it. The code below is only to plot the VAH, VAL, and POC.
# =================================
# Volume Profile Definition Section
# =================================
def profiles = 50;
def customRowHeight = 1.0;
def multiplier = 1;
def onExpansion = ShowTodayOnly;
def yyyymmdd = GetYYYYMMDD();
def seconds = SecondsFromTime(0);
def month = GetYear() * 12 + GetMonth();
def day_number = DaysFromDate(First(yyyymmdd)) + GetDayOfWeek(First(yyyymmdd));
def dom = GetDayOfMonth(yyyymmdd);
def dow = GetDayOfWeek(yyyymmdd – dom + 1);
def expthismonth = (if dow > 5 then 27 else 20) – dow;
def exp_opt = month + (dom > expthismonth);
def quarter = ;
def period = ;
rec count = CompoundValue(1, if period != period[1] then (count[1] + period – period[1]) % multiplier else count[1], 0);
def cond = count < count[1] + period – period[1];
Like this:
Like Loading...