How do I get the function "getPreviousTradingDay()" and close("inv("D")) to display Previous Trading Day date/time before the market open, 9:30am EST?
/ Example:
If today is Wednesday and time is 9:00am, getPreviousTradingDay() will display Monday.
If today is Wednesday and time is 9:31am, getPreviousTradingDay() will display Tuesday.
I would like it to display 'Tuesday" at 9:00am.
Code:
nTime = getValue("rawtime");
if (nTime != null) {
var nPreviousDay = getPreviousTradingDay(nTime);
debugPrintln("nPreviousDay:" + nPreviousDay);
xPrevClose = close(inv("D"));
var vPrevClose = xPrevClose.getValue(-1);
debugPrintln("vPrevClose:" + vPrevClose);
}
/ Example:
If today is Wednesday and time is 9:00am, getPreviousTradingDay() will display Monday.
If today is Wednesday and time is 9:31am, getPreviousTradingDay() will display Tuesday.
I would like it to display 'Tuesday" at 9:00am.
Code:
nTime = getValue("rawtime");
if (nTime != null) {
var nPreviousDay = getPreviousTradingDay(nTime);
debugPrintln("nPreviousDay:" + nPreviousDay);
xPrevClose = close(inv("D"));
var vPrevClose = xPrevClose.getValue(-1);
debugPrintln("vPrevClose:" + vPrevClose);
}
Comment