Hello,
I was wondering if there was a way to reload my EFS script in real time? Currently I have a script that prints the high and low of the day as well as the high and low of every 60mins. Currently I have to keep reloading the script manually every time there is a new high or low printed. The script reloads every time i change time frames, but since I have this script running on about 12 charts simultaneously it takes away my concentration from actually trading, which is the complete opposite of what the script was designed for in the first place.
Simply put, I just want my script to reload automatically if there is a new high or new low made both for the entire day and for each 60min period.
I was reading through this thread, http://forum.esignalcentral.com/show...day*#post23172
but it made no sense to me. Is there a way I can just insert the reload() function without having to declare variables? Or do I have to declare variables to make it automatically refresh when there is a new high/low?
Thanks in advance,
Brian
Here's what I have so far:
Generated EFS Code
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}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("for esignal forums");
setCursorLabelName("HIGH", 0);
setCursorLabelName("LOW", 1);
setCursorLabelName("50%", 2);
setCursorLabelName("1Day50%", 3);
setCursorLabelName("1DayHIGH", 4);
setCursorLabelName("1DayLOW", 5);
setDefaultBarStyle(PS_DASH, 0);
setDefaultBarStyle(PS_DASH, 1);
setDefaultBarStyle(PS_DOT, 2);
setDefaultBarStyle(PS_DOT, 3);
setDefaultBarStyle(PS_SOLID, 4);
setDefaultBarStyle(PS_SOLID, 5);
setDefaultBarFgColor(Color.grey, 0);
setDefaultBarFgColor(Color.grey, 1);
setDefaultBarFgColor(Color.blue, 2);
setDefaultBarFgColor(Color.red, 3);
setDefaultBarFgColor(Color.black, 4);
setDefaultBarFgColor(Color.black, 5);
setDefaultBarThickness(2, 0);
setDefaultBarThickness(2, 1);
setDefaultBarThickness(2, 2);
setDefaultBarThickness(3, 3);
setDefaultBarThickness(3, 4);
setDefaultBarThickness(3, 5);
setPlotType(PLOTTYPE_FLATLINES, 0);
setPlotType(PLOTTYPE_FLATLINES, 1);
setPlotType(PLOTTYPE_LINE, 2);
setPlotType(PLOTTYPE_FLATLINES, 3);
setPlotType(PLOTTYPE_FLATLINES, 4);
setPlotType(PLOTTYPE_FLATLINES, 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
//}}EFSWizard_Expression_1
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return new Array(
high(0, inv("60")),
low(0, inv("60")),
hl2(inv("60")),
hl2(inv("390")),
high(0, inv("390")),
low(0, inv("390"))
);
//}}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() {
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//}}EFSWizard_Actions
I was wondering if there was a way to reload my EFS script in real time? Currently I have a script that prints the high and low of the day as well as the high and low of every 60mins. Currently I have to keep reloading the script manually every time there is a new high or low printed. The script reloads every time i change time frames, but since I have this script running on about 12 charts simultaneously it takes away my concentration from actually trading, which is the complete opposite of what the script was designed for in the first place.
Simply put, I just want my script to reload automatically if there is a new high or new low made both for the entire day and for each 60min period.
I was reading through this thread, http://forum.esignalcentral.com/show...day*#post23172
but it made no sense to me. Is there a way I can just insert the reload() function without having to declare variables? Or do I have to declare variables to make it automatically refresh when there is a new high/low?
Thanks in advance,
Brian
Here's what I have so far:
Generated EFS Code
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}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("for esignal forums");
setCursorLabelName("HIGH", 0);
setCursorLabelName("LOW", 1);
setCursorLabelName("50%", 2);
setCursorLabelName("1Day50%", 3);
setCursorLabelName("1DayHIGH", 4);
setCursorLabelName("1DayLOW", 5);
setDefaultBarStyle(PS_DASH, 0);
setDefaultBarStyle(PS_DASH, 1);
setDefaultBarStyle(PS_DOT, 2);
setDefaultBarStyle(PS_DOT, 3);
setDefaultBarStyle(PS_SOLID, 4);
setDefaultBarStyle(PS_SOLID, 5);
setDefaultBarFgColor(Color.grey, 0);
setDefaultBarFgColor(Color.grey, 1);
setDefaultBarFgColor(Color.blue, 2);
setDefaultBarFgColor(Color.red, 3);
setDefaultBarFgColor(Color.black, 4);
setDefaultBarFgColor(Color.black, 5);
setDefaultBarThickness(2, 0);
setDefaultBarThickness(2, 1);
setDefaultBarThickness(2, 2);
setDefaultBarThickness(3, 3);
setDefaultBarThickness(3, 4);
setDefaultBarThickness(3, 5);
setPlotType(PLOTTYPE_FLATLINES, 0);
setPlotType(PLOTTYPE_FLATLINES, 1);
setPlotType(PLOTTYPE_LINE, 2);
setPlotType(PLOTTYPE_FLATLINES, 3);
setPlotType(PLOTTYPE_FLATLINES, 4);
setPlotType(PLOTTYPE_FLATLINES, 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
//}}EFSWizard_Expression_1
//}}EFSWizard_Expressions
//{{EFSWizard_Return
return new Array(
high(0, inv("60")),
low(0, inv("60")),
hl2(inv("60")),
hl2(inv("390")),
high(0, inv("390")),
low(0, inv("390"))
);
//}}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() {
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//}}EFSWizard_Actions
Comment