Hi there I need efs help to plot today's pivot point on intraday charts as it is formed relative to the current days (high+low+close)/3.
Here is an attempt at getting it to work but it does not plot on the chart but on a separate pane.
function premain(){
setPriceStudy(true);
setStudyTitle("PivotPoint");
setCursorLabelName("PP");
setDefaultBarThickness(1,0);
setDefaultBarStyle(PS_SOLID);
}
function main(){
var vTime = getValue("Time");
if (vTime != null) {
var vFirstIndex = getFirstBarIndexOfDay( vTime );
if (vFirstIndex != null) {
var vHigh = getValueAbsolute("High",vFirstIndex,"ES #F,D");
var vLow = getValueAbsolute("Low",vFirstIndex,"ES #F,D");
var vClose = getValueAbsolute("Close",vFirstIndex,"ES #F,D");}}
var vPP = (vHigh+vLow+vClose)/3;
return vPP;}
Any help will be very much appreciated as I am not familiar with efs script
Regards KV
Here is an attempt at getting it to work but it does not plot on the chart but on a separate pane.
function premain(){
setPriceStudy(true);
setStudyTitle("PivotPoint");
setCursorLabelName("PP");
setDefaultBarThickness(1,0);
setDefaultBarStyle(PS_SOLID);
}
function main(){
var vTime = getValue("Time");
if (vTime != null) {
var vFirstIndex = getFirstBarIndexOfDay( vTime );
if (vFirstIndex != null) {
var vHigh = getValueAbsolute("High",vFirstIndex,"ES #F,D");
var vLow = getValueAbsolute("Low",vFirstIndex,"ES #F,D");
var vClose = getValueAbsolute("Close",vFirstIndex,"ES #F,D");}}
var vPP = (vHigh+vLow+vClose)/3;
return vPP;}
Any help will be very much appreciated as I am not familiar with efs script
Regards KV
Comment