I found the following weird thing while debuging my EFS. If I apply the following EFS to "$SPX,5", it can be seen that main() is ccaled roughtly every 6 seconds ( the interval of $SPX update time ).
/***************************************/
var q = 1;
function preMain()
{
setPriceStudy(true);
}
function main() {
debugPrintln(q);
q = q + 1;
}
/****************************************/
However if I added two lines in it, and run it again, the main() is called in much much higher frequency. I guess whenever the volume of QQQ and SPY change, this EFS is notified and main() is called once, which is way wrong and deteriorate the performance. I guess quite a lot of eSignal user are not aware of this. Any comments?
/***************************************/
var q = 1;
function preMain()
{
setPriceStudy(true);
}
function main() {
debugPrintln(q);
q = q + 1;
var c = volume(0, -22, "SPY,5");
var d = volume(0, -22, "QQQ,5");
}
/****************************************/
-- Clearpicks
/***************************************/
var q = 1;
function preMain()
{
setPriceStudy(true);
}
function main() {
debugPrintln(q);
q = q + 1;
}
/****************************************/
However if I added two lines in it, and run it again, the main() is called in much much higher frequency. I guess whenever the volume of QQQ and SPY change, this EFS is notified and main() is called once, which is way wrong and deteriorate the performance. I guess quite a lot of eSignal user are not aware of this. Any comments?
/***************************************/
var q = 1;
function preMain()
{
setPriceStudy(true);
}
function main() {
debugPrintln(q);
q = q + 1;
var c = volume(0, -22, "SPY,5");
var d = volume(0, -22, "QQQ,5");
}
/****************************************/
-- Clearpicks
Comment