I am getting null values from series functions getMonth etc and
zero values from open, high, close, low functions when in replay mode and using sym(...).
Here is the test script: TestReplay.efs
// replay test
/* Instructions to reproduce issue:
Open the $DAX-XET,5 in an advanced chart.
Open the Formula Output window.
Add this formula.
See the correct output of date/time and close for DAX and Continuous Contract
Now go into Bar Replay Mode.
The date/time are now null and the open/high/low/close for the Contract is zero.
The value for the current symbol in the chart is correct.
*/
function preMain() {
setPriceStudy(true);
setStudyTitle("Replay Test");
setShowCursorLabel(false);
}
function main() {
if (getCurrentBarIndex() != 0) return(NaN);
var Symbol = "AX 1!-DT,5";
var BarIndex = 0;
debugPrintln(getYear(BarIndex, sym(Symbol)) + "/" + getMonth(BarIndex, sym(Symbol)) + "/" + getDay(BarIndex, sym(Symbol)) + " " +
getHour(BarIndex, sym(Symbol)) + ":" + getMinute(BarIndex, sym(Symbol)));
debugPrintln("Index Open = " + open(BarIndex).toFixed(2) + " Contract Open = " + (open(BarIndex, sym(Symbol)) + 0).toFixed(2));
debugPrintln("Index High = " + high(BarIndex).toFixed(2) + " Contract High = " + (high(BarIndex, sym(Symbol)) + 0).toFixed(2));
debugPrintln("Index Low = " + low(BarIndex).toFixed(2) + " Contract Low = " + (low(BarIndex, sym(Symbol)) + 0).toFixed(2));
debugPrintln("Index Close = " + close(BarIndex).toFixed(2) + " Contract Close = " + (close(BarIndex, sym(Symbol)) + 0).toFixed(2));
}
You will get data when in live mode for all function calls.
In Replay Mode you only get data when there is no “sym(Symbol)” in the function call. The date/time functions return null and the open, high,low, close functions return zero.
See attached file for output.
Is this a bug? Is there something else I'm missing or not doing correctly?
Thanks,
Ivan
zero values from open, high, close, low functions when in replay mode and using sym(...).
Here is the test script: TestReplay.efs
// replay test
/* Instructions to reproduce issue:
Open the $DAX-XET,5 in an advanced chart.
Open the Formula Output window.
Add this formula.
See the correct output of date/time and close for DAX and Continuous Contract
Now go into Bar Replay Mode.
The date/time are now null and the open/high/low/close for the Contract is zero.
The value for the current symbol in the chart is correct.
*/
function preMain() {
setPriceStudy(true);
setStudyTitle("Replay Test");
setShowCursorLabel(false);
}
function main() {
if (getCurrentBarIndex() != 0) return(NaN);
var Symbol = "AX 1!-DT,5";
var BarIndex = 0;
debugPrintln(getYear(BarIndex, sym(Symbol)) + "/" + getMonth(BarIndex, sym(Symbol)) + "/" + getDay(BarIndex, sym(Symbol)) + " " +
getHour(BarIndex, sym(Symbol)) + ":" + getMinute(BarIndex, sym(Symbol)));
debugPrintln("Index Open = " + open(BarIndex).toFixed(2) + " Contract Open = " + (open(BarIndex, sym(Symbol)) + 0).toFixed(2));
debugPrintln("Index High = " + high(BarIndex).toFixed(2) + " Contract High = " + (high(BarIndex, sym(Symbol)) + 0).toFixed(2));
debugPrintln("Index Low = " + low(BarIndex).toFixed(2) + " Contract Low = " + (low(BarIndex, sym(Symbol)) + 0).toFixed(2));
debugPrintln("Index Close = " + close(BarIndex).toFixed(2) + " Contract Close = " + (close(BarIndex, sym(Symbol)) + 0).toFixed(2));
}
You will get data when in live mode for all function calls.
In Replay Mode you only get data when there is no “sym(Symbol)” in the function call. The date/time functions return null and the open, high,low, close functions return zero.
See attached file for output.
Is this a bug? Is there something else I'm missing or not doing correctly?
Thanks,
Ivan
Comment