I've been running a few EFS on 25 individual charts for some time, and on earlier builds, they ran ok. Everyonce in awhile they system would freeze on the open, but usually "catchup" after a minute or two. Lately, the system stays locked for a a few minutes on the open, and somedays requires a task manager to kill it. It is probably worse given the stocks I am watching....how much volume they are doing, etc. I know it is the EFS that are causing the system to perform as it is on the open, because without any EFS on the charts, it never misses a beat.
The system: Dual 3.2ghz Xeons with HT, 1gb or Ram, 4 head Matrox and Dual Head Nvidia display adapters.
I'll attach a screen shot of the Performance monitor screen capture.
The EFS that seems to be causing the problems:
NearHigh_Low.efs:
***********************************
vLastAlert=-1;
function preMain(){
setPriceStudy(true);
setStudyTitle("NearHigh_low");
}
function main(){
var nearhigh = callFunction("/OHLC/gettodayohlc1.efs","main","High");
var nearlow = callFunction ("/OHLC/gettodayohlc1.efs","main","Low");
if (close() >=nearhigh -.10){
onAction1();
}
else if (close() <=nearlow +.10){
onAction2();
}
else{
setChartBG(Color.lightgrey);
}
return null;
}
function onAction1(){
setChartBG(Color.RGB(169,233,150));
vLastAlert = 1;
}
function onAction2(){
setChartBG(Color.RGB(254,188,200));
vLastAlert = 2;
}
//function onAction2(){
//setChartBG(Color.red);
//vLastAlert = 2;
//
//function onAction3(){
//setChartBG(Color.yellow);
//vLastAlert = 3;
//}
And:
gettodayohlc1.efs:
/************************************************** **************************************************
Copyright © eSignal, a division of Interactive Data Corporation. 2002. All rights reserved.
This sample eSignal Formula Script (EFS) may be modified and saved under a new
filename; however, eSignal is no longer responsible for the functionality once modified.
eSignal reserves the right to modify and overwrite this EFS file with each new release.
************************************************** ************************************************** */
function preMain() {
}
/** This formula was created to allow for back to back callFuntion() calls from an
external formula.
i.e.
HH = callFunction("/OHLC/getTodayOHLC1.efs","main","High");
LL = callFunction("/OHLC/getTodayOHLC1.efs","main","Low");
**/
var vSymbol;
var vInterval;
function main(sBarItem) {
if(sBarItem == null) {
return;
}
var vBar;
var vBarTime;
var vAbsTime;
var vIndex;
var nState = getBarState();
vSymbol = getSymbol();
vInterval = getInterval();
vSymbol += ",D";
if(vInterval == null)
return;
if(vInterval == "D" || vInterval == "W" || vInterval == "M")
return;
vBarTime = getValue("time");
if(vBarTime != null) {
vIndex = getFirstBarIndexOfDay(vBarTime, vSymbol);
if (vIndex == null) vIndex = 0;
if (vIndex != null) {
vBar = getValueAbsolute(sBarItem, vIndex, vSymbol);
return vBar;
}
}
return;
**************************************************
Any assistance with improving the performance of these would be greatly appreciated. I searched for EFS perfomance, but wasnt' sure if what I found was similar.
Thank you,
cas
edit: Note that my CPU usage never goes higher than 40%, even when esignal is frozen at the open, and everything else on the system works fine...so it is just esignal that is freezing.
The system: Dual 3.2ghz Xeons with HT, 1gb or Ram, 4 head Matrox and Dual Head Nvidia display adapters.
I'll attach a screen shot of the Performance monitor screen capture.
The EFS that seems to be causing the problems:
NearHigh_Low.efs:
***********************************
vLastAlert=-1;
function preMain(){
setPriceStudy(true);
setStudyTitle("NearHigh_low");
}
function main(){
var nearhigh = callFunction("/OHLC/gettodayohlc1.efs","main","High");
var nearlow = callFunction ("/OHLC/gettodayohlc1.efs","main","Low");
if (close() >=nearhigh -.10){
onAction1();
}
else if (close() <=nearlow +.10){
onAction2();
}
else{
setChartBG(Color.lightgrey);
}
return null;
}
function onAction1(){
setChartBG(Color.RGB(169,233,150));
vLastAlert = 1;
}
function onAction2(){
setChartBG(Color.RGB(254,188,200));
vLastAlert = 2;
}
//function onAction2(){
//setChartBG(Color.red);
//vLastAlert = 2;
//
//function onAction3(){
//setChartBG(Color.yellow);
//vLastAlert = 3;
//}
And:
gettodayohlc1.efs:
/************************************************** **************************************************
Copyright © eSignal, a division of Interactive Data Corporation. 2002. All rights reserved.
This sample eSignal Formula Script (EFS) may be modified and saved under a new
filename; however, eSignal is no longer responsible for the functionality once modified.
eSignal reserves the right to modify and overwrite this EFS file with each new release.
************************************************** ************************************************** */
function preMain() {
}
/** This formula was created to allow for back to back callFuntion() calls from an
external formula.
i.e.
HH = callFunction("/OHLC/getTodayOHLC1.efs","main","High");
LL = callFunction("/OHLC/getTodayOHLC1.efs","main","Low");
**/
var vSymbol;
var vInterval;
function main(sBarItem) {
if(sBarItem == null) {
return;
}
var vBar;
var vBarTime;
var vAbsTime;
var vIndex;
var nState = getBarState();
vSymbol = getSymbol();
vInterval = getInterval();
vSymbol += ",D";
if(vInterval == null)
return;
if(vInterval == "D" || vInterval == "W" || vInterval == "M")
return;
vBarTime = getValue("time");
if(vBarTime != null) {
vIndex = getFirstBarIndexOfDay(vBarTime, vSymbol);
if (vIndex == null) vIndex = 0;
if (vIndex != null) {
vBar = getValueAbsolute(sBarItem, vIndex, vSymbol);
return vBar;
}
}
return;
**************************************************
Any assistance with improving the performance of these would be greatly appreciated. I searched for EFS perfomance, but wasnt' sure if what I found was similar.
Thank you,
cas
edit: Note that my CPU usage never goes higher than 40%, even when esignal is frozen at the open, and everything else on the system works fine...so it is just esignal that is freezing.
Comment