In my efs, I calculate fast and slow stochastics through calling study.getValue(). The function oneSecondHasElapsed() is defined to make sure the vFast and vSlow are only calculated every one second or longer. My question is when I apply this efs to stocks like SPY and QQQ, shall StochStudy be still called whenever new tick comes? I checked the document on the difference between call() and callFunction(). I guess in the implementation of StochStudy, call("\library\StochasticLL.efs") is used. Thus I am wondering whether my oneSecondHasElapsed() can effectively limit the computation overhead. This question may be of little concern to most users. However, because my system is quite complicated, I am trying to sqeeze out all unnacessary overhead. Otherwise in some busy time period, the esignal would halt due to being overwhelmed by large number of imcoming tick data.
function main() {
if ( oneSecondHasElapsed() == true ) {
var vFast = StochStudy.getValue(StochStudy.FAST);
var vSlow = StochStudy.getValue(StochStudy.SLOW);
}
.......
}
function main() {
if ( oneSecondHasElapsed() == true ) {
var vFast = StochStudy.getValue(StochStudy.FAST);
var vSlow = StochStudy.getValue(StochStudy.SLOW);
}
.......
}
Comment