I am new here:
how do I get the system to show the pivots for the coming day
b e f o r e the market opening?
thank you!
etmal
how do I get the system to show the pivots for the coming day
b e f o r e the market opening?
thank you!
etmal
function preMain(){
setPriceStudy(true);
setStudyTitle("Forward Pivot");
setShowCursorLabel(false);
}
function main(){
var vSymbol = getSymbol();
vSymbol = vSymbol+",D";
var vClose = close(0,vSymbol);
var vHigh = high(0,vSymbol);
var vLow = low(0,vSymbol);
var vPivot = (vClose+vHigh+vLow)/3;
if(getBarState()==BARSTATE_NEWBAR){
drawLineRelative(1, vPivot, 20, vPivot, PS_SOLID, 2, Color.magenta, "Pivot");
drawTextRelative(21, vPivot, formatPriceNumber(vPivot), Color.magenta, null, Text.BOLD|Text.VCENTER, "Arial", 11, "text");
}
return;
}
function preMain(){
setPriceStudy(true);
setStudyTitle("Forward Pivot");
setShowCursorLabel(false);
}
function main(){
var today = new Date();
var hhmm = (today.getHours()*100)+today.getMinutes();
var vSymbol = getSymbol();
vSymbol = vSymbol+",D";
if(hhmm >= 930 && hhmm < 1559){
var vClose = close(-1,vSymbol);
var vHigh = high(-1,vSymbol);
var vLow = low(-1,vSymbol);
}else{
var vClose = close(0,vSymbol);
var vHigh = high(0,vSymbol);
var vLow = low(0,vSymbol);
}
var vPivot = (vClose+vHigh+vLow)/3;
drawLineRelative(1, vPivot, 20, vPivot, PS_SOLID, 2, Color.magenta, "Pivot");
drawTextRelative(21, vPivot, formatPriceNumber(vPivot), Color.magenta, null, Text.BOLD|Text.VCENTER, "Arial", 11, "text");
return;
}
Comment