Hello,
I've been using the script below to view just todays efs data while the chart above it displays multi-days of price data. Sometimes however I want to view multi-days of efs data also. I've been trying to use Formula Parameters so I can easily 'bypass' the script below via Edit Studies, but am having no luck. I am hoping someone knows of an efs where this has been done. Or maybe there is an easier way?
Any help would be appreciated
Thanks
shaeffer
function preMain() {
var bCurrentDay = false;
function main() {
if(getBarState()==BARSTATE_ALLBARS){
bCurrentDay=false;
}
if (bCurrentDay == false && getDay(0) != getDay(-1)){
var xTime = getValue("time");
var xDate = new Date();
var sTime = (xTime.getMonth()+1+"/"+xTime.getDate()+"/"+xTime.getFullYear());
var sToday = (xDate.getMonth()+1+"/"+xDate.getDate()+"/"+xDate.getFullYear());
if ( sTime == sToday ) {
bCurrentDay = true;
}
}
if (bCurrentDay==false){
return;
}
I've been using the script below to view just todays efs data while the chart above it displays multi-days of price data. Sometimes however I want to view multi-days of efs data also. I've been trying to use Formula Parameters so I can easily 'bypass' the script below via Edit Studies, but am having no luck. I am hoping someone knows of an efs where this has been done. Or maybe there is an easier way?
Any help would be appreciated
Thanks
shaeffer
function preMain() {
var bCurrentDay = false;
function main() {
if(getBarState()==BARSTATE_ALLBARS){
bCurrentDay=false;
}
if (bCurrentDay == false && getDay(0) != getDay(-1)){
var xTime = getValue("time");
var xDate = new Date();
var sTime = (xTime.getMonth()+1+"/"+xTime.getDate()+"/"+xTime.getFullYear());
var sToday = (xDate.getMonth()+1+"/"+xDate.getDate()+"/"+xDate.getFullYear());
if ( sTime == sToday ) {
bCurrentDay = true;
}
}
if (bCurrentDay==false){
return;
}
Comment