Rather special stock charts. Thank you, experts.
How can a complete large table be used to create an independent graph in the control panel without extracting subsets
For example, this stock data is processed by a script to generate multiple stock data, and the price data of each stock vary greatly.
It is difficult to obtain a perfect Graph using wrap in Graph Builder.
d0=Current Data Table();r=N Row(d0);
VV={"Date","Open","High","Low","Close","Volume"};
for(k=1,k<=4,k++,
d0<<Select Where(1);d0<<Select Columns(Eval(VV));d1=d0<<Subset(Output Table("ts"),Selected Rows(1),columns(Eval(VV)));
if(k==1,a="A",if(k==2,a="B";g=10,if(k==3,a="C";g=100,a="D")));
if(k>2,For(j=2,j<=NItems(VV)-1,j++,i=1;ca=VV[j];ar=d1<<GetAsMatrix(ca);for(i=1,i<=r,i++,ar[i,1]=round(ar[i,1]*g,0));d1[0,ca]=ar;));
ca="code";New Column(ca,Character,"Nominal");Current Data Table()[0,ca]= a;
m=5;ca="M"||char(m);New Column(ca);Column(ca)<<Formula( if(lag(code,m-1)==code,round(mean(close[Index(Row()-m+1,Row())]),2))) ;d1<<run formulas;Column(ca)<<deleteFormula;
m=10;ca="M"||char(m);New Column(ca);Column(ca)<<Formula( if(lag(code,m-1)==code,round(mean(close[Index(Row()-m+1,Row())]),2))) ;d1<<run formulas;Column(ca)<<deleteFormula;
if(k==1,dt=d1;dt<<setName("ts2");current data table()<<Go To(code);current data table()<<Move Selected Columns(To first);,current data table(dt);dt<<Concatenate(Data Table(d1),Append to first table);Close(d1,nosave));
);
How to use scripts to create independent graphs for each stock in the control panel?