-
Scilab / C question
Hello everyone, first post! I've been out of the coding game for a LONG time and I was wondering if someone here might know the answer to this question....
I'm working on back testing a trading algo using scilab which looks to be C based (has a lot of C based operations at a minimum). I don't know how to read this FOR loop, could you please explain it to me?
cprice is a single column x 10 row filled with double values
Code:
ma = 20;
for k = size(cprice,1):-1:ma
M(k,1)=mean(cprice(k-ma+1:k));
V(k,1)=sqrt(variance(cprice(k-ma+1:k)));
end
Thanks for any help you might be able to provide
-
-
Yeah, thanks. I was looking for the answer in the wrong place.