I am currently working on an EFS that will send an alert when it identifies if a False Bar exists and is also checking when the MACD is changing directions. I have reviewed several existing EFS's that deal with one of the variables but not both.
The issue I am having is that when I combine the variables for both items, the system crashes. If anyone can assist me with this or point me in the right direction to get an answer, it would be greatly appreciated.
I have already searched through existing EFS and had no luck finding anything that helped
Here is the data I am using for identifying the existence of a False bar:
And here is the data related to MACD turning:
When I attempt to load the EFS I have created, it must not like something in the combination I have created and crashes.
Thanks in advance for any assistence
Sincerely
Royce
The issue I am having is that when I combine the variables for both items, the system crashes. If anyone can assist me with this or point me in the right direction to get an answer, it would be greatly appreciated.
I have already searched through existing EFS and had no luck finding anything that helped
Here is the data I am using for identifying the existence of a False bar:
PHP Code:
var vStoch = null;
function preMain() {
setPriceStudy(true);
var fp1 = new FunctionParameter("Length", FunctionParameter.NUMBER);
fp1.setLowerLimit(1);
fp1.setDefault(14); //Edit this value to set a new default
var fp2 = new FunctionParameter("K", FunctionParameter.NUMBER);
fp2.setLowerLimit(1);
fp2.setDefault(3); //Edit this value to set a new default
var fp3 = new FunctionParameter("D", FunctionParameter.NUMBER);
fp3.setLowerLimit(1);
fp3.setDefault(3); //Edit this value to set a new default
var fp4 = new FunctionParameter("Upper", FunctionParameter.NUMBER);
fp4.setLowerLimit(0);
fp4.setDefault(75); //Edit this value to set a new default
var fp5 = new FunctionParameter("Lower", FunctionParameter.NUMBER);
fp5.setLowerLimit(0);
fp5.setDefault(25); //Edit this value to set a new default
}
function main(Length,K,D,Upper,Lower) {
if(vStoch==null) vStoch = new GetStochStudy(Length, K, D);
if (vStoch.getValue(GetStochStudy.MARKS) == 1){
drawShapeRelative(0,0,Shape.SQUARE,"",Color.black,Shape.RELATIVETOTOP|Shape.ONTOP,"MarksUp"+ BarCount);
}else{
removeShape("MarksUp"+BarCount);
}
if (vStoch.getValue(GetStochStudy.MARKS) == 2){
drawShapeRelative(0,-4,Shape.SQUARE,"",Color.black,Shape.RELATIVETOBOTTOM|Shape.ONTOP,"MarksDn"+ BarCount);
}else{
removeShape("MarksDn"+BarCount);
}
PHP Code:
var vMACD = null;
function preMain() {
setPriceStudy(false);
var fp1 = new FunctionParameter("Fast", FunctionParameter.NUMBER);
fp1.setLowerLimit(1);
fp1.setDefault(5);
var fp2 = new FunctionParameter("Slow", FunctionParameter.NUMBER);
fp2.setLowerLimit(1);
fp2.setDefault(12);
var fp3 = new FunctionParameter("Smoothing", FunctionParameter.NUMBER);
fp3.setLowerLimit(1);
fp3.setDefault(10);
var fp4 = new FunctionParameter("Source", FunctionParameter.STRING);
fp4.setName("Source");
fp4.addOption("Close");
fp4.addOption("High");
fp4.addOption("Low");
fp4.addOption("Open");
fp4.addOption("HL/2");
fp4.addOption("HLC/3");
fp4.addOption("OHLC/4");
fp4.setDefault("Close");
var fp5 = new FunctionParameter("TypeOsc", FunctionParameter.BOOLEAN);
fp5.setName("SMA (Oscillator)");
fp5.setDefault(false);
var fp6 = new FunctionParameter("TypeSig", FunctionParameter.BOOLEAN);
fp5.setName("SMA (Signal)");
fp5.setDefault(true);
function main(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig) {
if (vMACD == null) vMACD = new MACDStudy(Fast, Slow, Smoothing, Source, TypeOsc, TypeSig);
Thanks in advance for any assistence
Sincerely
Royce
Comment