Is there any way in which I can get a Library efs into a Wizard generated efs.
I thought that maybe if I put together a simple wizard efs (see below) using ROC study that say go long ROC>0 and short if ROC<0 then I could open it in EFS Editor and edit the body of the formula text in some way to use the Library StochRSI instead of ROC. Is there a way to do this? I wouldn't know where to start trying to write it from scratch.
The Wizard is such an excellent tool for those of us who aren't programmers but it always seems like it is the poor relation in terms of development. There are masses of standard efs studies which are provided for our use but the Wizard only allows the use of the few "builtin" studies although and even then it doesn't allow MAchannel off that list. But if I could edit
var vROC20 = new ROCStudy(20, "Close");
to say something like
var vStochRSI = Library StochRSI.efs(20, "Close");
that would be excellent.
Anyway, thanks if someone can help.
Regards
Rob
ROC efs
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vROC20 = new ROCStudy(20, "Close");
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("ROC Trader");
//}}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 (
vROC20.getValue(ROCStudy.ROC) > 0
) onAction1()
//}}EFSWizard_Expression_1
//{{EFSWizard_Expression_2
else if (
vROC20.getValue(ROCStudy.ROC) < 0
) 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) Strategy.doLong("", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
if (vLastAlert != 1) drawShapeRelative(0, low()-0.5, Shape.CIRCLE, "", Color.RGB(0,0,255), Shape.LEFT);
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//{{EFSWizard_Action_2
function onAction2() {
if (vLastAlert != 2) Strategy.doShort("", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
if (vLastAlert != 2) drawShapeRelative(0, high()+0.5, Shape.CIRCLE, "", Color.RGB(255,0,0), Shape.LEFT);
vLastAlert = 2;
}
//}}EFSWizard_Action_2
//}}EFSWizard_Actions
I thought that maybe if I put together a simple wizard efs (see below) using ROC study that say go long ROC>0 and short if ROC<0 then I could open it in EFS Editor and edit the body of the formula text in some way to use the Library StochRSI instead of ROC. Is there a way to do this? I wouldn't know where to start trying to write it from scratch.
The Wizard is such an excellent tool for those of us who aren't programmers but it always seems like it is the poor relation in terms of development. There are masses of standard efs studies which are provided for our use but the Wizard only allows the use of the few "builtin" studies although and even then it doesn't allow MAchannel off that list. But if I could edit
var vROC20 = new ROCStudy(20, "Close");
to say something like
var vStochRSI = Library StochRSI.efs(20, "Close");
that would be excellent.
Anyway, thanks if someone can help.
Regards
Rob
ROC efs
//{{EFSWizard_Description
//
// This formula was generated by the Alert Wizard
//
//}}EFSWizard_Description 7532
//{{EFSWizard_Declarations
var vROC20 = new ROCStudy(20, "Close");
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("ROC Trader");
//}}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 (
vROC20.getValue(ROCStudy.ROC) > 0
) onAction1()
//}}EFSWizard_Expression_1
//{{EFSWizard_Expression_2
else if (
vROC20.getValue(ROCStudy.ROC) < 0
) 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) Strategy.doLong("", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
if (vLastAlert != 1) drawShapeRelative(0, low()-0.5, Shape.CIRCLE, "", Color.RGB(0,0,255), Shape.LEFT);
vLastAlert = 1;
}
//}}EFSWizard_Action_1
//{{EFSWizard_Action_2
function onAction2() {
if (vLastAlert != 2) Strategy.doShort("", Strategy.CLOSE, Strategy.THISBAR, Strategy.DEFAULT, 0);
if (vLastAlert != 2) drawShapeRelative(0, high()+0.5, Shape.CIRCLE, "", Color.RGB(255,0,0), Shape.LEFT);
vLastAlert = 2;
}
//}}EFSWizard_Action_2
//}}EFSWizard_Actions
Comment