Automation Excel.xlsx | 39K | |
Stock.iok | 14K | |
Test.xlsx | 30K |
IF([Row]<14,
null,
SUBSET_SUM([Close],
INTERSECTION(SUBSET([Row],[Row],"<="),SUBSET([Row],[Row]-13,">=")))
/14
)
SCRIPT(`
var a0 = formula("CELL([A0],"+currentrow+")");
var n = formula("CELL([i],"+currentrow+")");
var val;
var str;
if (a0==null || n==null) {
val = 0;
str = "";
} else {
var val = Math.pow(13/14, n)*a0;
var str = "13/14^"+n+"*"+a0;
for (var row = 1; row <= allrecordcount; row++) {
var iRow = formula("CELL([I],"+row+")");
var gRow = formula("CELL([G],"+row+")");
if (iRow!=null && iRow <= n) {
val += Math.pow((13/14), n-iRow)*gRow/14;
str += " + (1/14)^"+(n-iRow+1)+"*"+gRow;
}
}
}
val;
`, "currentrow", CURRENTROW(), "allrecordcount", ALLRECORDCOUNT())
Moving average script formula.iok | 11K |
It looks like you're new here. If you want to get involved, click one of these buttons!