Announcement

Collapse
No announcement yet.

esignal provided efs and dead code

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • esignal provided efs and dead code

    I've downloaded a few .efs files from esignal which contain code that has been "commented out". In particular, the following code for Blau Candlestick Oscillator has some code at the bottom which may or may not have anything to do with the live code.

    What is it? What is it for? How do you incorporate it into the rest of the study? Is the rest of the study of any value without that code? What's going on? And why wouldn't the programmer take the 30 seconds it would take to type in a comment that explains the 'dead code'?

    /************************************************** *****************
    Provided By : TS Support, LLC for eSignal. (c) Copyright 2002
    ************************************************** ******************/

    function preMain()
    {
    setStudyTitle("Blau's CI");
    setCursorLabelName("Blau's CI",0);
    setDefaultBarFgColor(Color.red,0);
    addBand(0, PS_DASH, 2, Color.purple);

    }
    var EMA_1 = 0;
    var EMA1_1 = 0;
    var vEMA_1 = 0;
    var vEMA1_1 = 0;
    function main(r,s)
    {
    if (r == null)
    r = 32;
    if(s == null)
    s = 12;

    var K = 2 / (r + 1);
    var K1 = 2 / (s + 1);

    EMA = K * (close() - open()) + (1 - K) * EMA_1;
    EMA1 = K1 * EMA + (1 - K1) * EMA1_1;
    vEMA = K * (high() - low()) + (1 - K) * vEMA_1;
    vEMA1 = K1 * vEMA + (1 - K1) * vEMA1_1;
    if (getBarState() == BARSTATE_NEWBAR){
    EMA_1 = EMA;
    EMA1_1 = EMA1;
    vEMA_1 = vEMA;
    vEMA1_1 = vEMA1;
    }
    if(vEMA1 != 0)
    return EMA1 / vEMA1;
    else
    return;
    }

    /*
    {w. Blau's Candlestick Indicator}

    Inputs: r(32), Zeroline(0);

    Value1 = ErgCSI(r, 5, 1);

    Value2 = XAverage(CSI(r, 5, 1), 5);

    Plot1(Value1, "ErgCSI");

    Plot2(Value2, "SigLin");

    Plot3(ZeroLine, "Zero");
    */

  • #2
    Hi,

    If you are talking about:

    /*
    {w. Blau's Candlestick Indicator}

    Inputs: r(32), Zeroline(0);

    Value1 = ErgCSI(r, 5, 1);

    Value2 = XAverage(CSI(r, 5, 1), 5);

    Plot1(Value1, "ErgCSI");

    Plot2(Value2, "SigLin");

    Plot3(ZeroLine, "Zero");
    */
    Those look like codes for another charting packing. He must have put them in there to help himself code this in efs and forgot to delete them. They have no effect on efs, and if you uncomment them it will make efs error out.
    Garth

    Comment


    • #3
      Hi guys...

      Sorry for the stupid question...but where could I find this indicator? I thought I looked thru the TSsupport's efs listings twice but didnt see it. Could someone post the link?

      Thanks ALOT!

      Zan

      Comment


      • #4
        Zan
        You can find Blau's indicators here
        Alex
        PS. Should the link not work properly the efs formulae are in TS Support group at FileShare in the Misc folder

        Comment


        • #5
          Originally posted by Alexis C. Montenegro
          Zan
          You can find Blau's indicators here
          Alex
          PS. Should the link not work properly the efs formulae are in TS Support group at FileShare in the Misc folder

          Comment


          • #6
            Doh..meant to say thanks!

            Zan

            Comment


            • #7
              Zan,

              keep in mind that the eco.efs (the blau candlestick oscillator) does not update properly in real time.

              You have to keep refreshing the chart manually.

              it's a great indicator though, I've posted a few charts in how I'm using it:

              http://share.esignal.com/groupconten...png&groupid=48

              Comment

              Working...
              X