Can anyone explain me how to get this indicator(mq4) into esignal pro (efs). Sorry I am new to esignal or should I call their tech support.
Cheers!
Got it in EFS
function preMain() {
setStudyTitle("FPSqueeze");
setCursorLabelName("FPSqueeze", 0);
setDefaultBarFgColor(Color.blue, 0);
setPlotType(PLOTTYPE_HISTOGRAM,0);
setDefaultBarThickness(4,0);
//addBand(0,PS_SOLID,1,Color.black,"zero");
var BBlow=null;
var BBhigh=null;
var KClow=null;
var KChigh=null;
var Mom=null;
var vHigh=null;
var vLow=null;
var vClose=null;
var fp1 = new FunctionParameter("nMA", FunctionParameter.NUMBER);
fp1.setName("Squeeze Moving Average");
fp1.setLowerLimit(1);
fp1.setDefault(20);
var fp2 = new FunctionParameter("nSD", FunctionParameter.NUMBER);
fp2.setName("Standard Deviation");
fp2.setLowerLimit (1);
fp2.setDefault(2.0);
var fp3 = new FunctionParameter("nColorSqueeze", FunctionParameter.COLOR);
fp3.setName("Squeeze Color");
fp3.setDefault(Color.red);
var fp4 = new FunctionParameter("nColorAction", FunctionParameter.COLOR);
fp4.setName("Action Color");
fp4.setDefault(Color.lime);
}
function ATR(nInputLength) {
var dSum = 0;
var dH = high(0, -nInputLength);
var dL = low(0, -nInputLength);
var dC = close(-1, -nInputLength);
if (dH == null || dL == null || dC == null) {
return;
}
for (i = 0; i < nInputLength; ++i) {
var vTrueHigh = Math.max(dH
, dC);
var vTrueLow = Math.min(dL, dC);
var vTrueRange = (vTrueHigh - vTrueLow);
dSum += vTrueRange;
}
dSum /= nInputLength;
return dSum;
}
function main(nMA, nSD, nColorSqueeze, nColorAction) {
//Bollinger Band Variables using 1.4 Standard Deviation
var myStudy1 = upperBB (nMA,nSD);
var myStudy2 = lowerBB (nMA,nSD);
var momStudy1 = ema(10,mom(12));
var macdstudy = new macdHist(12,26,9);
BBlow = myStudy2.getValue(0);
BBhigh = myStudy1.getValue(0);
Mom = momStudy1.getValue(0);
macdvalue = macdstudy.getValue(0);
var BarCntr;
var nRangeFactor = 1.5;
if (getBarState() == BARSTATE_NEWBAR)
BarCntr += 1;
if (BarCntr < nMA) {
return;
} else {
var dKeltnerBasis= call("/Library/KeltnerEMA.efs", nMA);
var dATR = ATR(nMA);
KClow = (dKeltnerBasis - (nRangeFactor * dATR));
KChigh = (dKeltnerBasis + (nRangeFactor * dATR));
}
//Logic to create red or blue squeeze signal
if ((BBhigh <= KChigh) || (BBlow >= KClow)) {
drawShapeRelative(0,0,Shape.CIRCLE,null,nColorSqueeze,Shape.TOP);
}
if ((BBhigh > KChigh) || (BBlow < KClow)) {
drawShapeRelative(0,0,Shape.CIRCLE,null,nColorAction,Shape.TOP);
}
if (Mom > 0) {
setBarFgColor(Color.blue);
}
else {
setBarFgColor(Color.red);
}
drawTextPixel( 1, 93, "FPSqueeze v0.1: www.forexproject.com", Color.black, null, Text.RELATIVETOLEFT | Text.RELATIVETOBOTTOM | Text.BOLD, "Arial",10 );
return ((Mom+macdvalue)/2);
}