I encountered some code that I am trying to understand. Below is part of the EFS for 123up (FORMULAS>HELPERS>123up.efs).
I would greatly appreciate it if someone could explain the following lines to me, starting under the var...
Thank you.
function main(nBars) {
var i = 0;
var nStateTotal = 0;
if(low(-nBars) == null) return;
for(i = 0; i < nBars-1; i++) {
if(low(-i) >= low(-i-1)) {
nStateTotal = nStateTotal + 1;
} else {
break;
}
}
I would greatly appreciate it if someone could explain the following lines to me, starting under the var...
Thank you.
function main(nBars) {
var i = 0;
var nStateTotal = 0;
if(low(-nBars) == null) return;
for(i = 0; i < nBars-1; i++) {
if(low(-i) >= low(-i-1)) {
nStateTotal = nStateTotal + 1;
} else {
break;
}
}
Comment