Hi~
I am trying to create an efs study that would plot the high of the first 15min bar.
I am using the one below, but that one prints the high for every 15min bar. and I only want to plot the high of the first 15min bar.
I assume the issue is with this line:
xHigh = high(inv(15));
Please let me know what I am doing wrong.
Thanks,
anarco
function preMain() {
setPriceStudy(true);
setStudyTitle("OR High 15 min");
setCursorLabelName("TH");
setDefaultBarStyle(PS_DASH);
setDefaultBarFgColor(Color.red);
setDefaultBarThickness(2);
setPlotType(PLOTTYPE_FLATLINES);
}
var bInit = false;
var xHigh = null;
function main() {
if(isMonthly() || isWeekly() || isDaily())
return;
if(bInit == false){
xHigh = high(inv(15));
bInit = true;
}
var vHigh = getSeries(xHigh);
return (vHigh);
}
I am trying to create an efs study that would plot the high of the first 15min bar.
I am using the one below, but that one prints the high for every 15min bar. and I only want to plot the high of the first 15min bar.
I assume the issue is with this line:
xHigh = high(inv(15));
Please let me know what I am doing wrong.
Thanks,
anarco
function preMain() {
setPriceStudy(true);
setStudyTitle("OR High 15 min");
setCursorLabelName("TH");
setDefaultBarStyle(PS_DASH);
setDefaultBarFgColor(Color.red);
setDefaultBarThickness(2);
setPlotType(PLOTTYPE_FLATLINES);
}
var bInit = false;
var xHigh = null;
function main() {
if(isMonthly() || isWeekly() || isDaily())
return;
if(bInit == false){
xHigh = high(inv(15));
bInit = true;
}
var vHigh = getSeries(xHigh);
return (vHigh);
}
Comment