Hi,
Using the eSignal 10.6 Formula Wizard, I created a very simple study that draws a vertical line the First Time my criteria are met. When I try to run this study in eSignal 12, it will not even load into the chart and it freezes eSignal 12. The only way forward is to force a shutdown of eSignal 12 using the Windows 7 "close the program" option, and then start up signal 12 again. It is the only study I am having this issue with. Any ideas on a solution?
Thanks,
Paul
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description
//{{EFSWizard_Declarations
var vSMA3 = new MAStudy(3, 0, "Close", MAStudy.SIMPLE);
var vLastAlert = -1;
//}}EFSWizard_Declarations
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(true);
setStudyTitle("Close vs 3 SMA Trend - First Bar Line");
//}}EFSWizard_PreMain
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
if (
close() > vSMA3.getValue(MAStudy.MA)
) onAction1()
//}}EFSWizard_Expression_1
//{{EFSWizard_Expression_2
else if (
close() < vSMA3.getValue(MAStudy.MA)
) onAction2();
//}}EFSWizard_Expression_2
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return null;
//}}EFSWizard_Return
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
if (vLastAlert != 1) drawLineRelative(-1, 0, -1, 999999, PS_DOT, 2, Color.RGB(50,205,50), "UT");
removeLine("DT");
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//{{EFSWizard_Action_2
function onAction2() {
if (vLastAlert != 2) drawLineRelative(-1, 0, -1, 999999, PS_DOT, 2, Color.red, "DT");
removeLine("UT");
vLastAlert = 2;
}
//}}EFSWizard_Action_2
//}}EFSWizard_Actions
Using the eSignal 10.6 Formula Wizard, I created a very simple study that draws a vertical line the First Time my criteria are met. When I try to run this study in eSignal 12, it will not even load into the chart and it freezes eSignal 12. The only way forward is to force a shutdown of eSignal 12 using the Windows 7 "close the program" option, and then start up signal 12 again. It is the only study I am having this issue with. Any ideas on a solution?
Thanks,
Paul
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description
//{{EFSWizard_Declarations
var vSMA3 = new MAStudy(3, 0, "Close", MAStudy.SIMPLE);
var vLastAlert = -1;
//}}EFSWizard_Declarations
function preMain() {
/**
* This function is called only once, before any of the bars are loaded.
* Place any study or EFS configuration commands here.
*/
//{{EFSWizard_PreMain
setPriceStudy(true);
setStudyTitle("Close vs 3 SMA Trend - First Bar Line");
//}}EFSWizard_PreMain
}
function main() {
/**
* The main() function is called once per bar on all previous bars, once per
* each incoming completed bar, and if you don't have 'setComputeOnClose(true)'
* in your preMain(), it is also called on every tick.
*/
//{{EFSWizard_Expressions
//{{EFSWizard_Expression_1
if (
close() > vSMA3.getValue(MAStudy.MA)
) onAction1()
//}}EFSWizard_Expression_1
//{{EFSWizard_Expression_2
else if (
close() < vSMA3.getValue(MAStudy.MA)
) onAction2();
//}}EFSWizard_Expression_2
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return null;
//}}EFSWizard_Return
}
function postMain() {
/**
* The postMain() function is called only once, when the EFS is no longer used for
* the current symbol (ie, symbol change, chart closing, or application shutdown).
*/
}
//{{EFSWizard_Actions
//{{EFSWizard_Action_1
function onAction1() {
if (vLastAlert != 1) drawLineRelative(-1, 0, -1, 999999, PS_DOT, 2, Color.RGB(50,205,50), "UT");
removeLine("DT");
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//{{EFSWizard_Action_2
function onAction2() {
if (vLastAlert != 2) drawLineRelative(-1, 0, -1, 999999, PS_DOT, 2, Color.red, "DT");
removeLine("UT");
vLastAlert = 2;
}
//}}EFSWizard_Action_2
//}}EFSWizard_Actions
Comment