The comments in the code should explain what I'm doing:
My questions:
Is there already something built into eSignal or the EFS1 or 2 library that does what I'm trying to achieve above?
Can you see any mistakes in the code or logic?
How does one test this code before we hit a rollover date?
Thanks
PHP Code:
var sym1 = getSymbol();
var sym2 = sym1.split(" ");
// If today is a rollover day and we're using the continuous contract symbol
// then warn the user to switch to the correct month.
var bRolloverToday = IsTodayRolloverDay();
if(sym2.length > 1 && bRolloverToday && sym2[1] == "#F") {
// popup warning that today is a rollover day but yesterday's
// data is for a different contract
msgBox("Warning: You are using a continuous contract (#F) which means that this " +
"indicator is using incorrect data from yesterday. Please switch to " +
"the next month's contract.", "Warning - data problem");
}
Is there already something built into eSignal or the EFS1 or 2 library that does what I'm trying to achieve above?
Can you see any mistakes in the code or logic?
How does one test this code before we hit a rollover date?
Thanks
Comment