Hello all,
I'm trying to get the correct OHLC (and subsequent Pivot Values) NOT based on Settlement prices, but on the chart time established by my time templates (in my case 8:00 a.m. - 16:15 pm.). Thanks to the previous posts by Alex and others, I've been able to modify the previous close, but erroneous values still appear on the previous High, Low and Open. Sometimes they're correct, other times incorrect, but ONE of the three is always incorrect.
I know this is corrected in V11, but I'm still using 10.6.
Can anyone help me? I'm sure I'm missing something in the EFS, but it is beyond my ability. I tried modifying the formula on the OHL in the same manner as the Close, but it did not work.
Here is what I have done so far:
/************************************************** ****************************************
Copyright © eSignal, a division of Interactive Data Corporation. 2005. All rights reserved.
This sample eSignal Formula Script (EFS) may be modified and saved under a new filename;
however, eSignal is no longer responsible for the functionality once modified.
eSignal reserves the right to modify and overwrite this EFS file with each new release.
@version 3.0 by Alexis Montenegro for eSignal
************************************************** *****************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("PreviousDayDailyBars mod");
setCursorLabelName("PD-O", 0); // Open
setCursorLabelName("PD-H", 1); // High
setCursorLabelName("PD-L", 2); // Low
setCursorLabelName("PD-C", 3); // Close
setDefaultBarStyle(PS_SOLID, 0); // Open
setDefaultBarStyle(PS_SOLID, 1); // High
setDefaultBarStyle(PS_SOLID, 2); // Low
setDefaultBarStyle(PS_SOLID, 3); // Close
setDefaultBarFgColor(Color.maroon, 0); // Open
setDefaultBarFgColor(Color.black, 1); // High
setDefaultBarFgColor(Color.black, 2); // Low
setDefaultBarFgColor(Color.RGB (128,0,255), 3); // Close
setDefaultBarThickness(2, 0); // Open
setDefaultBarThickness(2, 1); // High
setDefaultBarThickness(2, 2); // Low
setDefaultBarThickness(2, 3); // Close
setPlotType(PLOTTYPE_FLATLINES, 0); // Open
setPlotType(PLOTTYPE_FLATLINES, 1); // High
setPlotType(PLOTTYPE_FLATLINES, 2); // Low
setPlotType(PLOTTYPE_FLATLINES, 3); // Close
}
var bInit = false;
var xOpen = null;
var xHigh = null;
var xLow = null;
//var xClose = null; //removed
var vClose; //added
function main() {
if(isMonthly() || isWeekly() || isDaily())
return;
if(bInit == false){
xOpen = open(inv("D"));
xHigh = high(inv("D"));
xLow = low(inv("D"));
//xClose = close(inv("D")); //removed
bInit = true;
}
var vOpen = xOpen.getValue(-1);
var vHigh = xHigh.getValue(-1);
var vLow = xLow.getValue(-1);
//var vClose = xClose.getValue(-1); //replaced with line below
if (day(0)!=day(-1)) vClose = close (-1); //added
if(vOpen == null || vHigh == null || vLow == null || vClose == null)
return;
return new Array (vOpen,vHigh,vLow,vClose);
}
I'm trying to get the correct OHLC (and subsequent Pivot Values) NOT based on Settlement prices, but on the chart time established by my time templates (in my case 8:00 a.m. - 16:15 pm.). Thanks to the previous posts by Alex and others, I've been able to modify the previous close, but erroneous values still appear on the previous High, Low and Open. Sometimes they're correct, other times incorrect, but ONE of the three is always incorrect.
I know this is corrected in V11, but I'm still using 10.6.
Can anyone help me? I'm sure I'm missing something in the EFS, but it is beyond my ability. I tried modifying the formula on the OHL in the same manner as the Close, but it did not work.
Here is what I have done so far:
/************************************************** ****************************************
Copyright © eSignal, a division of Interactive Data Corporation. 2005. All rights reserved.
This sample eSignal Formula Script (EFS) may be modified and saved under a new filename;
however, eSignal is no longer responsible for the functionality once modified.
eSignal reserves the right to modify and overwrite this EFS file with each new release.
@version 3.0 by Alexis Montenegro for eSignal
************************************************** *****************************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("PreviousDayDailyBars mod");
setCursorLabelName("PD-O", 0); // Open
setCursorLabelName("PD-H", 1); // High
setCursorLabelName("PD-L", 2); // Low
setCursorLabelName("PD-C", 3); // Close
setDefaultBarStyle(PS_SOLID, 0); // Open
setDefaultBarStyle(PS_SOLID, 1); // High
setDefaultBarStyle(PS_SOLID, 2); // Low
setDefaultBarStyle(PS_SOLID, 3); // Close
setDefaultBarFgColor(Color.maroon, 0); // Open
setDefaultBarFgColor(Color.black, 1); // High
setDefaultBarFgColor(Color.black, 2); // Low
setDefaultBarFgColor(Color.RGB (128,0,255), 3); // Close
setDefaultBarThickness(2, 0); // Open
setDefaultBarThickness(2, 1); // High
setDefaultBarThickness(2, 2); // Low
setDefaultBarThickness(2, 3); // Close
setPlotType(PLOTTYPE_FLATLINES, 0); // Open
setPlotType(PLOTTYPE_FLATLINES, 1); // High
setPlotType(PLOTTYPE_FLATLINES, 2); // Low
setPlotType(PLOTTYPE_FLATLINES, 3); // Close
}
var bInit = false;
var xOpen = null;
var xHigh = null;
var xLow = null;
//var xClose = null; //removed
var vClose; //added
function main() {
if(isMonthly() || isWeekly() || isDaily())
return;
if(bInit == false){
xOpen = open(inv("D"));
xHigh = high(inv("D"));
xLow = low(inv("D"));
//xClose = close(inv("D")); //removed
bInit = true;
}
var vOpen = xOpen.getValue(-1);
var vHigh = xHigh.getValue(-1);
var vLow = xLow.getValue(-1);
//var vClose = xClose.getValue(-1); //replaced with line below
if (day(0)!=day(-1)) vClose = close (-1); //added
if(vOpen == null || vHigh == null || vLow == null || vClose == null)
return;
return new Array (vOpen,vHigh,vLow,vClose);
}
Comment