I'm trying to eliminate the changing colors of the candlesticks in the following efs. Does anyone know how? I know you should put in a // in front of the input but I keep getting an error when I do. Thanks for your time. Here is the EFS.
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vDonchian = new DonchianStudy(2, 1);
var vLastAlert = -1;
//}}EFSWizard_Declarations 7225
function preMain() {
//{{EFSWizard_Code_PreMain_setPriceBarColor
setColorPriceBars(true);
//}}EFSWizard_Code_PreMain_setPriceBarColor 3448
/**
* 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("donchian test");
setCursorLabelName("UP", 0);
setCursorLabelName("DN", 1);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarFgColor(Color.lightgrey, 0);
setDefaultBarFgColor(Color.lightgrey, 1);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
//}}EFSWizard_PreMain 53624
}
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 (
high() > vDonchian.getValue(DonchianStudy.UPPER)
) onAction1()
//}}EFSWizard_Expression_1 10577
//{{EFSWizard_Expression_2
else if (
low() < vDonchian.getValue(DonchianStudy.LOWER)
) onAction2()
//}}EFSWizard_Expression_2 12043
//{{EFSWizard_Expression_3
else if (
1 == 1
) onAction3();
//}}EFSWizard_Expression_3 6846
//}}EFSWizard_Expressions 58387
//{{EFSWizard_Return
return new Array(
vDonchian.getValue(DonchianStudy.UPPER),
vDonchian.getValue(DonchianStudy.LOWER)
);
//}}EFSWizard_Return 15590
}
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) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\Ding.wav");
setPriceBarColor(Color.RGB(0,255,0));
if (vLastAlert != 1) Alert.addToList(getSymbol(), "Highest High", Color.black, Color.green);
vLastAlert = 1;
}
//}}EFSWizard_Action_1 36685
//{{EFSWizard_Action_2
function onAction2() {
if (vLastAlert != 2) Alert.playSound("C:\\PROGRAM FILES\\ESIGNAL\\Sounds\\Ding.wav");
setPriceBarColor(Color.RGB(255,0,0));
if (vLastAlert != 2) Alert.addToList(getSymbol(), "Lowest Low", Color.blue, Color.red);
vLastAlert = 2;
}
//}}EFSWizard_Action_2 35124
//{{EFSWizard_Action_3
function onAction3() {
setPriceBarColor(Color.RGB(0,0,0));
vLastAlert = 3;
}
//}}EFSWizard_Action_3 10592
//}}EFSWizard_Actions 113066
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vDonchian = new DonchianStudy(2, 1);
var vLastAlert = -1;
//}}EFSWizard_Declarations 7225
function preMain() {
//{{EFSWizard_Code_PreMain_setPriceBarColor
setColorPriceBars(true);
//}}EFSWizard_Code_PreMain_setPriceBarColor 3448
/**
* 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("donchian test");
setCursorLabelName("UP", 0);
setCursorLabelName("DN", 1);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarStyle(PS_SOLID, 1);
setDefaultBarFgColor(Color.lightgrey, 0);
setDefaultBarFgColor(Color.lightgrey, 1);
setDefaultBarThickness(1, 0);
setDefaultBarThickness(1, 1);
setPlotType(PLOTTYPE_LINE, 0);
setPlotType(PLOTTYPE_LINE, 1);
//}}EFSWizard_PreMain 53624
}
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 (
high() > vDonchian.getValue(DonchianStudy.UPPER)
) onAction1()
//}}EFSWizard_Expression_1 10577
//{{EFSWizard_Expression_2
else if (
low() < vDonchian.getValue(DonchianStudy.LOWER)
) onAction2()
//}}EFSWizard_Expression_2 12043
//{{EFSWizard_Expression_3
else if (
1 == 1
) onAction3();
//}}EFSWizard_Expression_3 6846
//}}EFSWizard_Expressions 58387
//{{EFSWizard_Return
return new Array(
vDonchian.getValue(DonchianStudy.UPPER),
vDonchian.getValue(DonchianStudy.LOWER)
);
//}}EFSWizard_Return 15590
}
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) Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\Ding.wav");
setPriceBarColor(Color.RGB(0,255,0));
if (vLastAlert != 1) Alert.addToList(getSymbol(), "Highest High", Color.black, Color.green);
vLastAlert = 1;
}
//}}EFSWizard_Action_1 36685
//{{EFSWizard_Action_2
function onAction2() {
if (vLastAlert != 2) Alert.playSound("C:\\PROGRAM FILES\\ESIGNAL\\Sounds\\Ding.wav");
setPriceBarColor(Color.RGB(255,0,0));
if (vLastAlert != 2) Alert.addToList(getSymbol(), "Lowest Low", Color.blue, Color.red);
vLastAlert = 2;
}
//}}EFSWizard_Action_2 35124
//{{EFSWizard_Action_3
function onAction3() {
setPriceBarColor(Color.RGB(0,0,0));
vLastAlert = 3;
}
//}}EFSWizard_Action_3 10592
//}}EFSWizard_Actions 113066
Comment