You are trying to get the (H+L+C)/3 for each year for different stocks? Maybe just use TimeFrameSet(inYearly) . Not clear on what you want to do.
--- In [email protected], Inquisitive Voyager <hedonist2...@...> wrote: > > (1)requirement: I want to create dynamic variables for each tickers > according to data it possess. > > (2)details:suppose there is EOD data from 2000 to 2010.I have to calculate > suppose average pivot(H+L+C)/3 etc per year. > > Every ticker doesn't have same data bars.some were listed in 2000,some in > 2004,some in 2008 and like this. > > (3)point of application: > > > _fd=WriteVal(BeginValue(DateTime()),formatDateTime );// first date > _ld=WriteVal(LastValue(DateTime()),formatDateTime) ;//last date > > _fy=StrToNum(StrRight(_fd,4));// first year > _ly=StrToNum(StrRight(_ld,4));// last year. > > > now I have to create dynamic years between _fy and _ly. > > suppose _fy=2002 and _ly =2010,then AFL should create variable years between > these two ,so that avg value per year could be calculated. > > (4)I went for - > > for(i=_fy;i<=_ly;i++) > { > > VarSet("_year"+i,i); > > } > > but it is not working . > > does any body shall come up with the solution ? > > regards >
