I want to calculate the 20 day average of 1 minute values. This only needs to be done once per day. I don't need to have the system updating that on every bar.
Will this do that?
if (bInit == false) {
xAdj = sma(2500,vSymbol);
xAdjvalue - xAdj.getValue(0);
bInit = true;
}
When I use xAdjvalue I don't want it to recalculte the 2500 bar long average - just use the value already caluculated.
Would this also do that?
xAdjvalue = sma(2500,vSymbol,0);
Thanks, jgr
Will this do that?
if (bInit == false) {
xAdj = sma(2500,vSymbol);
xAdjvalue - xAdj.getValue(0);
bInit = true;
}
When I use xAdjvalue I don't want it to recalculte the 2500 bar long average - just use the value already caluculated.
Would this also do that?
xAdjvalue = sma(2500,vSymbol,0);
Thanks, jgr
Comment