Hi there again.
I'm trying to make a simple code that indicates the inclination of an external line in a binary form, although the binary value would be defined by the user.
I've checked everything but again no solution, the output is nothing!
Thaks in advance. Here is the code.
var fpArray = new Array();
function preMain() {
setPriceStudy(false);
setStudyTitle("Incl STO Med");
setDefaultBarFgColor(Color.RGB(255, 255, 255), 0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
setDefaultBarFgColor(Color.RGB(255, 255, 255), 1);
setPlotType(PLOTTYPE_LINE,1);
setDefaultBarThickness(1,1);
var x=0;
fpArray[x] = new FunctionParameter("Length_Stoch_RSI", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(10);
}
fpArray[x] = new FunctionParameter("Length_DEMA1", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(6);
}
fpArray[x] = new FunctionParameter("Length_DEMA2", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(4);
}
fpArray[x] = new FunctionParameter("CoefDEMA", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(0);
setDefault(0.5);
}
fpArray[x] = new FunctionParameter("Incl_Value", FunctionParameter.NUMBER);
with(fpArray[x++]){
setDefault(1);
}
}
function main(Length_Stoch_RSI,Length_DEMA1,Length_DEMA2,Co efDEMA,Incl_Value) {
var sto = efsExternal("B.F. - StochRSI Med.efs", Length_Stoch_RSI,Length_DEMA1,Length_DEMA2,CoefDEM A);
var sto0 = sto;
var sto_1 = offsetSeries(sto,-1);
function UPX(sto0,sto_1,Incl_Value){
var sto00 = sto0.getValue(0);
var sto_11 = sto_1.getValue(0);
if(sto00 > sto_11) {
Incl_Value
}
};
function DNX(sto0,sto_1,Incl_Value){
var sto00 = sto0.getValue(0);
var sto_11 = sto_1.getValue(0);
if(sto00 < sto_11) {
Incl_Value
}
};
return new Array(UPX,DNX);
}
I'm trying to make a simple code that indicates the inclination of an external line in a binary form, although the binary value would be defined by the user.
I've checked everything but again no solution, the output is nothing!
Thaks in advance. Here is the code.
var fpArray = new Array();
function preMain() {
setPriceStudy(false);
setStudyTitle("Incl STO Med");
setDefaultBarFgColor(Color.RGB(255, 255, 255), 0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
setDefaultBarFgColor(Color.RGB(255, 255, 255), 1);
setPlotType(PLOTTYPE_LINE,1);
setDefaultBarThickness(1,1);
var x=0;
fpArray[x] = new FunctionParameter("Length_Stoch_RSI", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(10);
}
fpArray[x] = new FunctionParameter("Length_DEMA1", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(6);
}
fpArray[x] = new FunctionParameter("Length_DEMA2", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(4);
}
fpArray[x] = new FunctionParameter("CoefDEMA", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(0);
setDefault(0.5);
}
fpArray[x] = new FunctionParameter("Incl_Value", FunctionParameter.NUMBER);
with(fpArray[x++]){
setDefault(1);
}
}
function main(Length_Stoch_RSI,Length_DEMA1,Length_DEMA2,Co efDEMA,Incl_Value) {
var sto = efsExternal("B.F. - StochRSI Med.efs", Length_Stoch_RSI,Length_DEMA1,Length_DEMA2,CoefDEM A);
var sto0 = sto;
var sto_1 = offsetSeries(sto,-1);
function UPX(sto0,sto_1,Incl_Value){
var sto00 = sto0.getValue(0);
var sto_11 = sto_1.getValue(0);
if(sto00 > sto_11) {
Incl_Value
}
};
function DNX(sto0,sto_1,Incl_Value){
var sto00 = sto0.getValue(0);
var sto_11 = sto_1.getValue(0);
if(sto00 < sto_11) {
Incl_Value
}
};
return new Array(UPX,DNX);
}
Comment