Could someone who understands .efs better than I do, take a look at this formula. Its real time plotting changes if you reload it. I really like this indicator. It would be great if someone could get it to plot correctly in real time.
Thanks for any help!
Steve
EFS Code:
code:
/ **************************************************
*****************
Description : This Indicator plots PFE (Polarized Fractal Efficiency) indicator
Provided By : Developed by TS Support, LLC for eSignal. (c) Copyright 2002
**************************************************
******************/
function preMain()
{
setStudyTitle("Polarized Fractal Efficiency");
setCursorLabelName("EMA", 0);
setCursorLabelName("BUYZONE", 1);
setCursorLabelName("SELLZONE", 2);
setDefaultBarFgColor(Color.aqua, 0);
setDefaultBarFgColor(Color.blue, 1);
setDefaultBarFgColor(Color.red, 2);
}
var First = true;
var EMA = 0.0;
var EMA_1 = 0.0;
function main()
{
var PFE = 0.0;
var C2C = 0.0;
var Counter = 0;
var FracEff = 0.0;
var Close = getValue("Close", 0, -10);
PFE = Math.sqrt(Math.pow((Close[0] - Close[9]),2) + 100);
for (Counter = 1; Counter < 10; Counter++)
{
C2C += Math.sqrt(Math.pow((Close[Counter - 1] - Close[Counter]), 2) + 1);
}
if ((Close[0] - Close[9]) > 0) FracEff = Math.round((PFE / C2C) * 100);
else FracEff = Math.round(-(PFE / C2C) * 100);
if (First)
{
EMA = FracEff;
First = false;
}
else EMA = Math.round(FracEff * 0.333 + EMA_1 * (1 - 0.333));
if (getBarState() == BARSTATE_NEWBAR) EMA_1 = EMA;
return new Array(EMA, 50, -50);
}
Thanks for any help!
Steve
EFS Code:
code:
/ **************************************************
*****************
Description : This Indicator plots PFE (Polarized Fractal Efficiency) indicator
Provided By : Developed by TS Support, LLC for eSignal. (c) Copyright 2002
**************************************************
******************/
function preMain()
{
setStudyTitle("Polarized Fractal Efficiency");
setCursorLabelName("EMA", 0);
setCursorLabelName("BUYZONE", 1);
setCursorLabelName("SELLZONE", 2);
setDefaultBarFgColor(Color.aqua, 0);
setDefaultBarFgColor(Color.blue, 1);
setDefaultBarFgColor(Color.red, 2);
}
var First = true;
var EMA = 0.0;
var EMA_1 = 0.0;
function main()
{
var PFE = 0.0;
var C2C = 0.0;
var Counter = 0;
var FracEff = 0.0;
var Close = getValue("Close", 0, -10);
PFE = Math.sqrt(Math.pow((Close[0] - Close[9]),2) + 100);
for (Counter = 1; Counter < 10; Counter++)
{
C2C += Math.sqrt(Math.pow((Close[Counter - 1] - Close[Counter]), 2) + 1);
}
if ((Close[0] - Close[9]) > 0) FracEff = Math.round((PFE / C2C) * 100);
else FracEff = Math.round(-(PFE / C2C) * 100);
if (First)
{
EMA = FracEff;
First = false;
}
else EMA = Math.round(FracEff * 0.333 + EMA_1 * (1 - 0.333));
if (getBarState() == BARSTATE_NEWBAR) EMA_1 = EMA;
return new Array(EMA, 50, -50);
}
Comment