Can someone kindly enlighten me as to why my example indicator (below) will not draw a line for the entire length of chart history but instead only start from current time going forwards (dynamic only, from loading time)?
Apologies in advance if it is blindingly obvious....
1000 Thanks, DD
/*************************
.DD Test
***************************/
function preMain() {
setPriceStudy(false);
setStudyTitle("DD Test")
setCursorLabelName("DD Test",0);
setDefaultBarFgColor(Color.blue,0)
setShowTitleParameters( true );
}
var LRs = null;
function main() {
if (LRs == null) LRs = middleLinearReg(21, 2,close());
return sma(8, LRs);
}
Apologies in advance if it is blindingly obvious....
1000 Thanks, DD
/*************************
.DD Test
***************************/
function preMain() {
setPriceStudy(false);
setStudyTitle("DD Test")
setCursorLabelName("DD Test",0);
setDefaultBarFgColor(Color.blue,0)
setShowTitleParameters( true );
}
var LRs = null;
function main() {
if (LRs == null) LRs = middleLinearReg(21, 2,close());
return sma(8, LRs);
}
Comment