Would someone please see if the following will set
Start=0;
on the first tick of the first bar of the day, regardless of the time interval and time template settings? Thanks.
function preMain(){
setPriceStudy(true);
setStudyTitle("FBreset");
debugClear();
}
var Start=null;
function main(){
var vTime = getValue("Time");
if(vTime != null&&getBarState()==BARSTATE_NEWBAR&&getCurrentBa rIndex()==0) {
var vFirstIndex = getFirstBarIndexOfDay(vTime);
if(vFirstIndex == 0) {
debugPrintln("Start=0;"+vFirstIndex);
Start=0;
}
}
}
Start=0;
on the first tick of the first bar of the day, regardless of the time interval and time template settings? Thanks.
function preMain(){
setPriceStudy(true);
setStudyTitle("FBreset");
debugClear();
}
var Start=null;
function main(){
var vTime = getValue("Time");
if(vTime != null&&getBarState()==BARSTATE_NEWBAR&&getCurrentBa rIndex()==0) {
var vFirstIndex = getFirstBarIndexOfDay(vTime);
if(vFirstIndex == 0) {
debugPrintln("Start=0;"+vFirstIndex);
Start=0;
}
}
}
Comment