Hi all,
I have to admit that I'm fairly new to esignal and I'm doing my first steps with the java script software.
I was trying to establish a simple indicator which shows me a simple triangle in the chart when the statment (eg close > close 1) is true. I've tried it with the wizard but seems not to work. Here is what I tried:
//
//}}EFSWizard_Description
//{{EFSWizard_Declarations
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("");
setCursorLabelName("FAKE LONG FDAX", 5);
setDefaultBarStyle(PS_SOLID,5);
setDefaultBarFgColor(Color.blue,5);
setDefaultBarThickness(2, 0);
setPlotType(PLOTTYPE_SQUARE, 5);
//}}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(1) < low(2) &&
close > high(1)
) onAction1();
//}}EFSWizard_Expression_1
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return ;
//}}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() {
drawShapeRelative(0, low(), Shape.TRIANGLE, "", Color.RGB(155,0,0), Shape.LEFT, "Fake Long");
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//}}EFSWizard_Actions
Somebody got an idea about that?
Regards
Volker
I have to admit that I'm fairly new to esignal and I'm doing my first steps with the java script software.
I was trying to establish a simple indicator which shows me a simple triangle in the chart when the statment (eg close > close 1) is true. I've tried it with the wizard but seems not to work. Here is what I tried:
//
//}}EFSWizard_Description
//{{EFSWizard_Declarations
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("");
setCursorLabelName("FAKE LONG FDAX", 5);
setDefaultBarStyle(PS_SOLID,5);
setDefaultBarFgColor(Color.blue,5);
setDefaultBarThickness(2, 0);
setPlotType(PLOTTYPE_SQUARE, 5);
//}}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(1) < low(2) &&
close > high(1)
) onAction1();
//}}EFSWizard_Expression_1
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return ;
//}}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() {
drawShapeRelative(0, low(), Shape.TRIANGLE, "", Color.RGB(155,0,0), Shape.LEFT, "Fake Long");
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//}}EFSWizard_Actions
Somebody got an idea about that?
Regards
Volker
Comment