Announcement

Collapse
No announcement yet.

Automated GET EFS's

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automated GET EFS's

    Here is the AutoMOB EFS formula. This simply plots MOB's based off certain elliott wave points. In no way is this guaranteed to be right or wrong, just sample code showing you you might do it.

    YOU NEED BUILD 566 or later for this to work and the Advanced GET studies as part of your eSignal subscription.

    You can get there here: http://share.esignal.com/groupconten...r=&groupid=132

    m.

    PHP Code:
    var pivots = new GetPivotsStudy();
    var 
    elliott = new GetElliottStudy(3000505350);

    var 
    nLastMRW        null// Last Most Recent Wave (used for reloading)
    var nLastMRWIndex       null;
    var 
    dLastMRWHigh    null;
    var 
    dLastMRWLow        null;
    var 
    bMOBDrawn        false;


    var 
    arPivots        = new Array();
    var 
    arPivotBar        = new Array();


    function 
    preMain() {
            
    setPriceStudy(true);
        
    setStudyTitle("Auto MOB");
    }

    function 
    main() {
        
    // What's the most recent wave?  If it has changed since last remembered, reload the EFS.
        // If the elliot waves change, you can count on the pivots updating.
        
    var nMRW elliott.getValue(GetElliottStudy.MOSTRECENTWAVE);
        var 
    nMRWIndex elliott.getValue(GetElliottStudy.MOSTRECENTWAVEBARINDEX);
        
        if(
    getCurrentBarIndex() == 0) {
            if(
    nLastMRW == null) {
                if(
    nMRWIndex != null) {
                    
    nLastMRW nMRW;
                    
    nLastMRWIndex nMRWIndex;
                    
    dLastMRWHigh high(nMRWIndex);
                    
    dLastMRWLow low(nMRWIndex);
                }

            } else if(
    nLastMRW != nMRW || nMRWIndex nLastMRWIndex || low(nMRWIndex) != dLastMRWLow || high(nMRWIndex) != dLastMRWHigh) {
                
    nLastMRW null;
                
    nLastMRWIndex null;
                
    dLastMRWHigh null;    
                
    dLastMRWLow null;
                
    reloadEFS();
                return;
            } else {
                
    nLastMRWIndex nMRWIndex;
                
    dLastMRWHigh high(nMRWIndex);
                
    dLastMRWLow low(nMRWIndex);
            }
        }


        var 
    nBarState getBarState();
        
    // If ALLBARS, init the wave arrays and vars.
        // If newbar, shift the bar indexes
        
    if(nBarState == BARSTATE_ALLBARS) {
            
    clearLineTool(LineTool.MOB);
            
    clearShape();
            
            
    arPivots.length        0;
            
    arPivotBar.length    0;
            
            
    bMOBDrawn false;
        }

        if(
    nBarState == BARSTATE_NEWBAR) {
            var 
    nPivot pivots.getValue(GetPivotsStudy.PIVOTS, -1);
            if(
    nPivot != null) {
                
    arPivots.push(nPivot);
                
    arPivotBar.push(getCurrentBarIndex());
            }
        
        }
            
        if(
    bMOBDrawn == false && getCurrentBarIndex() == 0) {
            
    bMOBDrawn true;
            
            var 
    nStart arPivots.length-1;
            var 
    i;
            var 
    nCount 0;
            
            for(
    nStart>= 0i--) {
                var 
    vPivot arPivots[i];
                var 
    vBar arPivotBar[i]-1;
                
                
    // debugPrintln("I: " + i + " Pivot: " + vPivot + " Bar: " + vBar);
                
                // 1 primary
                // 2 major
                // 3 intermediate
                // 4 minor
                // if negative, a downsize pivot.
                
    if(vPivot == 1) {
                    
    addLineTool(LineTool.MOBvBarhigh(vBar), Color.magentaColor.magentaColor.black"mob");
                    
    drawShapeRelative(vBar20Shape.UPTRIANGLE""Color.blueShape.RELATIVETOTOP"Pt" getValue("rawtime"vBar));
                    
    drawShapeRelative(vBar10Shape.UPTRIANGLE""Color.blueShape.RELATIVETOBOTTOM"Pb" getValue("rawtime"vBar));
                    
    nCount++;
                } else if(
    vPivot == -1) {
                    
    addLineTool(LineTool.MOBvBarlow(vBar), Color.magentaColor.magentaColor.black"mob");
                    
    drawShapeRelative(vBar20Shape.DOWNTRIANGLE""Color.redShape.RELATIVETOTOP"Pt" getValue("rawtime"vBar));
                    
    drawShapeRelative(vBar10Shape.DOWNTRIANGLE""Color.redShape.RELATIVETOBOTTOM"Pb" getValue("rawtime"vBar));
                    
    nCount++;
                    
    /**
                } else if(vPivot == 2) {
                    addLineTool(LineTool.MOB, vBar, high(vBar), Color.yellow, Color.yellow, Color.black, "mob");
                    drawShapeRelative(vBar, 20, Shape.UPTRIANGLE, "", Color.yellow, Shape.RELATIVETOTOP, "Pt" + getValue("rawtime", vBar));
                    drawShapeRelative(vBar, 10, Shape.UPTRIANGLE, "", Color.yellow, Shape.RELATIVETOBOTTOM, "Pb" + getValue("rawtime", vBar));
                    nCount++;
                } else if(vPivot == -2) {
                    addLineTool(LineTool.MOB, vBar, low(vBar), Color.yellow, Color.yellow, Color.black, "mob");
                    drawShapeRelative(vBar, 20, Shape.DOWNTRIANGLE, "", Color.yellow, Shape.RELATIVETOTOP, "Pt" + getValue("rawtime", vBar));
                    drawShapeRelative(vBar, 10, Shape.DOWNTRIANGLE, "", Color.yellow, Shape.RELATIVETOBOTTOM, "Pb" + getValue("rawtime", vBar));
                    nCount++;
                    **/
                
    }
                
                if(
    nCount 4)
                    break;
            }
            
          
        }


    Matt Gundersen

  • #2
    Here is the AutoFIB EFS formula. This plots fibonacci extensions and retracements based off various elliott wave types. In no way is this guaranteed to be right or wrong, just sample code showing you you might do it.

    YOU NEED BUILD 566 or later for this to work and you need to have the Advanced GET studies as part of your subscription.

    You can get there here: http://share.esignal.com/groupconte...er=&groupid=132

    PHP Code:
    var LINEMARGIN            5;
    var 
    RIGHTTEXT            true;

    function 
    preMain() {
        
    setStudyTitle("Auto FIB");
        
    setPriceStudy(true);
    }

    var 
    elliott = new GetElliottStudy(3000505350);

    var 
    nLastMRW        null// Last Most Recent Wave (used for reloading)
    var nLastMRWIndex   null;
    var 
    dLastMRWHigh    null;
    var 
    dLastMRWLow        null;

    var 
    arWaves        = new Array();
    var 
    arWaveBar        = new Array();
    var 
    bFibDrawn        false;

    function 
    dumpWaves() {
        
    debugPrintln("Dumping Waves");
        var 
    i;
        for(
    0arWaveBar.lengthi++) {
            
    debugPrintln("    Wave[" "]" arWaves[i] + " Index: " arWaveBar[i]);
        }
    }



    var 
    WAVE_A            7
    var WAVE_B            8
    var WAVE_C            9

    var WAVENOTFOUND        1// this is a bar index

    function isABC(nWave) {
        
    nWave Math.abs(nWave);
        if(
    nWave == || nWave == || nWave == 9)
            return 
    true;
        return 
    false;
    }



    function 
    findPriorWave(nWave) {
        var 
    i;

        if(
    arWaves.length == 0)
            return 
    WAVENOTFOUND;

        var 
    nStart arWaves.length-1;
        
    nStart--;
        for(
    nStart>= 0i--) {
            var 
    nWaveBar Math.abs(arWaves[i]);

            
    // If a 4 stop searching
            
    if(nWaveBar == || nWaveBar == WAVE_A || nWaveBar == WAVE_B)
                return 
    WAVENOTFOUND;

            if(
    nWaveBar == nWave)
                return 
    arWaveBar[i];
        }    

        return 
    WAVENOTFOUND;
    }

    function 
    findWavePriorToWave5(nWave) {
        var 
    i;

        if(
    arWaves.length == 0)
            return 
    WAVENOTFOUND;

        var 
    bTrigger false;
        var 
    nStart arWaves.length-1;
        
    nStart--;
        for(
    nStart>= 0i--) {
            var 
    nWaveBar Math.abs(arWaves[i]);
            
            if(
    bTrigger == true)
                break;

            
    // If a 4 stop searching
            
    if(nWaveBar == || nWaveBar == WAVE_C)
                
    bTrigger true;

            if(
    nWaveBar == nWave)
                return 
    arWaveBar[i];
        }    

        return 
    WAVENOTFOUND;
    }


    function 
    findWaveBeforeABC() {
        var 
    i;

        if(
    arWaves.length == 0)
            return 
    WAVENOTFOUND;

        var 
    nStart arWaves.length-1;
        
    nStart--;
        var 
    bTrigger false;
        for(
    nStart>= 0i--) {
            var 
    nWaveBar Math.abs(arWaves[i]);
            
            if(
    bTrigger == true) {
                return 
    arWaveBar[i];        
            }

            if(
    nWaveBar == WAVE_A
                
    bTrigger true;
            else if(
    nWaveBar WAVE_A)
                return 
    WAVENOTFOUND;

        }    

        return 
    WAVENOTFOUND;
    }

    function 
    findPriorWaveABC(nWave) {
        var 
    i;

        if(
    arWaves.length == 0)
            return 
    WAVENOTFOUND;

        var 
    nStart arWaves.length-1;
        
    nStart--;
        for(
    nStart>= 0i--) {
            var 
    nWaveBar Math.abs(arWaves[i]);

            
    // If a 4 stop searching
            
    if(nWaveBar WAVE_A)
                return 
    WAVENOTFOUND;

            if(
    nWaveBar == nWave)
                return 
    arWaveBar[i];
        }    

        return 
    WAVENOTFOUND;
    }


    function 
    findCurrentWave(nWave) {
        if(
    arWaves.length == 0)
            return 
    WAVENOTFOUND;

        var 
    nStart arWaves.length-1;
        var 
    nWaveBar Math.abs(arWaves[nStart]);

        if(
    nWaveBar == nWave)
            return 
    arWaveBar[nStart];

        return 
    WAVENOTFOUND;
    }


    function 
    findOnePriorWave(nWave) {
        if(
    arWaves.length 2)
            return 
    WAVENOTFOUND;

        var 
    nStart arWaves.length-1;
        var 
    nWaveBar Math.abs(arWaves[nStart-1]);

        if(
    nWaveBar == nWave)
            return 
    arWaveBar[nStart-1];

        return 
    WAVENOTFOUND;
    }


    function 
    getRetracement(dHdLdPercentnMRW) {
        if(
    nMRW 0) {
            return 
    dL - ((dL-dH) * dPercent);
        } else if(
    nMRW 0) {
            return 
    dL + ((dH-dL) * dPercent);
        }
        return 
    null;
    }
                    
    function 
    getExtension(dHdLdExtdPercentnMRW) {
        if(
    nMRW 0) {
            return 
    dExt + ((dL-dH) * dPercent);
        } else if(
    nMRW 0) {
            return 
    dExt - ((dH-dL) * dPercent);
        }
        return 
    null;
    }

    function 
    getHL(nBarbFirstnMRW) {
        if(
    nMRW 0) {
            if(
    bFirst) {
                return 
    low(nBar);
            } else {
                return 
    high(nBar);
            }
        } else if(
    nMRW 0) {
            if(
    bFirst) {
                return 
    high(nBar);
            } else {
                return 
    low(nBar);
            }
        }
        
        return 
    null;
    }


    function 
    addText(sTextnXdY) {
        if(
    RIGHTTEXT == true) {
            
    drawTextAbsolute(LINEMARGINdYsText
                
    Color.bluenull,
                
    Text.BOTTOM Text.LEFT Text.ONTOP Text.BOLD
                
    nullnullsText "-" getValue("rawtime"));
        } else {
            
    drawTextRelative(nXdYsText
                
    Color.bluenull,
                
    Text.BOTTOM Text.RIGHT Text.ONTOP Text.BOLD
                
    nullnullsText "-" getValue("rawtime"));
        }

    }

    function 
    getWaveColor(nWave) {
        if(
    nWave 0) {
            return 
    Color.red;
        } else if(
    nWave 0) {
            return 
    Color.lime;
        } 
        
        return 
    Color.black;
    }

    function 
    formatWave(nWave) {
        var 
    nRawWave nWave;
        
        
    nWave Math.abs(nWave);
        var 
    vRet "" nWave;
        if(
    nWave == WAVE_A
            
    vRet "A";
        else if(
    nWave == WAVE_B)
            
    vRet "B";
        else if(
    nWave == WAVE_C)
            
    vRet "C";
            
        return 
    vRet;
    }

    /****
    W2 Ret is measured from end of W5 to end of W1
    W3 Ext is based on measurement from end of W5 to end of W1 but starting the extension from end of W2
    W4 Ret is measured from end of W2 to end of W3
    W5 Ext is based on measurement from end of W5 to end of W3 but starting the extension from end of W4

    W2 is 0.50 to 0.75 retracement of W1 (up to 0.99)
    W3 is 1.618, 2.618, 4.25, 6.25 of W1 measured from end of W2
    W4 is 0.382 to 0.50 of W3 (up to 0.618)
    W5 is 0.618 of W1 to W3 measured from end of W4 (up to 1.00)

    Wave B is like W2
    Wave C is 1.00 of  WA measured from end of WB
    ***/

    function main() {
        
    // What's the most recent wave?  If it has changed since last remembered, reload the EFS.
        
    var nMRW elliott.getValue(GetElliottStudy.MOSTRECENTWAVE);
        var 
    nMRWIndex elliott.getValue(GetElliottStudy.MOSTRECENTWAVEBARINDEX);
        if(
    getCurrentBarIndex() == 0) {
            if(
    nLastMRW == null) {
                if(
    nMRWIndex != null) {
                    
    nLastMRW nMRW;
                    
    nLastMRWIndex nMRWIndex;
                    
    dLastMRWHigh high(nMRWIndex);
                    
    dLastMRWLow low(nMRWIndex);
                }

            } else if(
    nLastMRW != nMRW || nMRWIndex nLastMRWIndex || low(nMRWIndex) != dLastMRWLow || high(nMRWIndex) != dLastMRWHigh) {
                
    nLastMRW null;
                
    nLastMRWIndex null;
                
    dLastMRWHigh null;    
                
    dLastMRWLow null;

                
    reloadEFS();
                return;
            } else {
                
    nLastMRWIndex nMRWIndex;
                
    dLastMRWHigh high(nMRWIndex);
                
    dLastMRWLow low(nMRWIndex);
            }
        }


        var 
    nBarState getBarState();
        
    // If ALLBARS, init the wave arrays and vars.
        // If newbar, shift the bar indexes
        
    if(nBarState == BARSTATE_ALLBARS) {
            
    clearText();
            
    clearLineTool(LineTool.SEGMENT);
            
    arWaves.length        0;
            
    arWaveBar.length    0;
            
    bFibDrawn        false;
        } else if(
    nBarState == BARSTATE_NEWBAR) {
            
    // Get the current wave for a specific bar and add the wave and bar to the arrays
            
    var nWave elliott.getValue(GetElliottStudy.WAVE);
            if(
    nWave != null) {
                
    arWaves.push(nWave);
                
    arWaveBar.push(getCurrentBarIndex());
            }

        }


        
    // If on the most recent bar and the ellipses haven't been drawn, search for them
        // and draw them.
        // Should the MRW change, a reload will occur and this will re-execute.
        
    if(bFibDrawn == false && getCurrentBarIndex() == 0) {
            
    bFibDrawn true;
            
            
    // dumpWaves();
            // Use nMRW to determine which way to draw wave.

            
    drawTextAbsolute(115"CurWave: " formatWave(nMRW),
                
    Color.blackgetWaveColor(nMRW), 
                
    Text.RELATIVETOLEFT Text.RELATIVETOBOTTOM Text.FRAME Text.BOLD
                
    nullnull"OB");
            

            if(
    Math.abs(nMRW) == 3) {
                var 
    nBar1 findPriorWave(1);
                var 
    nBar2 findPriorWave(2);
                var 
    nBar5 findPriorWave(5);
                var 
    nBarC findPriorWave(WAVE_C);
                
                if(
    nBar5 == WAVENOTFOUND)
                    
    nBar5 nBarC;
                    
                if(
    nBar1 != WAVENOTFOUND && nBar2 != WAVENOTFOUND && nBar5 != WAVENOTFOUND) {
                    var 
    vH getHL(nBar5truenMRW);
                    var 
    vL getHL(nBar1falsenMRW);
                    var 
    v2 getHL(nBar2truenMRW);

                    
    addLineTool(LineTool.SEGMENTnBar5vH0vH1Color.black"tag");
                    
    addLineTool(LineTool.SEGMENTnBar5vL0vL1Color.black"tag");
                    
    addLineTool(LineTool.SEGMENTnBar1v20v21Color.black"tag");
                    
                    var 
    v1618 getExtension(vHvLv21.618nMRW);
                    var 
    v2618 getExtension(vHvLv22.618nMRW);
                    var 
    v425  getExtension(vHvLv24.25,  nMRW);
                    var 
    v625  getExtension(vHvLv26.25,  nMRW);

                    
    addLineTool(LineTool.SEGMENTnBar2v1618,  LINEMARGINv1618,  2Color.blue"tag");
                    
    addLineTool(LineTool.SEGMENTnBar2v2618,  LINEMARGINv2618,  2Color.blue"tag");
                    
    addLineTool(LineTool.SEGMENTnBar2v425,   LINEMARGINv425,   2Color.blue"tag");
                    
    addLineTool(LineTool.SEGMENTnBar2v625,   LINEMARGINv625,   2Color.blue"tag");

                    
    addText("1.618"nBar2v1618);                
                    
    addText("2.618"nBar2v2618);                
                    
    addText("4.25",  nBar2v425);                
                    
    addText("6.25",  nBar2v625);                
                    
                    
            
                }
            } else if(
    Math.abs(nMRW) == 4) { // 
                
    var nBar2 findPriorWave(2);
                var 
    nBar3 findPriorWave(3);
                
                if(
    nBar2 != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                    var 
    vH getHL(nBar2truenMRW);
                    var 
    vL getHL(nBar3falsenMRW);
                    
                    
    addLineTool(LineTool.SEGMENTnBar2vHnBar3vH1Color.black"tag");
                    
    addLineTool(LineTool.SEGMENTnBar2vLnBar3vL1Color.black"tag");

                    var 
    v382 getRetracement(vHvL0.382nMRW);
                    var 
    v50  getRetracement(vHvL0.5nMRW);
                    var 
    v618 getRetracement(vHvL0.618nMRW);
                    
                    
    addLineTool(LineTool.SEGMENTnBar3v382LINEMARGINv3822Color.blue"tag");
                    
    addLineTool(LineTool.SEGMENTnBar3v50,  LINEMARGINv50,  2Color.blue"tag");
                    
    addLineTool(LineTool.SEGMENTnBar3v618LINEMARGINv6182Color.blue"tag");

                    
    addText("0.382"nBar3v382);                
                    
    addText("0.50",  nBar3v50);                
                    
    addText("0.618"nBar3v618);                
                
                }
                
            } else if(
    Math.abs(nMRW) == 5) {
                var 
    nBar3 findWavePriorToWave5(3);
                var 
    nBar4 findWavePriorToWave5(4);
                var 
    nBar5 findWavePriorToWave5(5);
                var 
    nBarC findWavePriorToWave5(WAVE_C);
                
                if(
    nBar5 == WAVENOTFOUND)
                    
    nBar5 nBarC;
                    
                if(
    nBar3 != WAVENOTFOUND && nBar4 != WAVENOTFOUND && nBar5 != WAVENOTFOUND) {
                    var 
    vH getHL(nBar5truenMRW);
                    var 
    vL getHL(nBar3falsenMRW);
                    var 
    v4 getHL(nBar4truenMRW);
                    
                    
                    
    addLineTool(LineTool.SEGMENTnBar5vHnBar3vH1Color.black"tag");
                    
    addLineTool(LineTool.SEGMENTnBar5vLnBar3vL1Color.black"tag");
                    
    addLineTool(LineTool.SEGMENTnBar3v4nBar4v41Color.black"tag");

                    var 
    v618 getExtension(vHvLv40.618nMRW);
                    var 
    v100 getExtension(vHvLv41.0nMRW);
                    
                    
    addLineTool(LineTool.SEGMENTnBar4v100LINEMARGINv100,  2Color.blue"tag");
                    
    addLineTool(LineTool.SEGMENTnBar4v618LINEMARGINv6182Color.blue"tag");

                    
    addText("1.0",      nBar4v100);
                    
    addText("0.618"nBar4v618);                
                    
                }

                
            } else if(
    Math.abs(nMRW) == WAVE_C) {
                var 
    nBarA findPriorWaveABC(WAVE_A);
                var 
    nBarB findPriorWaveABC(WAVE_B);
                
                if(
    nBarA != WAVENOTFOUND && nBarB != WAVENOTFOUND) {
                    var 
    nBarX findWaveBeforeABC();
                    
                    if(
    nBarX != WAVENOTFOUND) {
                        var 
    vH getHL(nBarXtruenMRW);
                        var 
    vL getHL(nBarAfalsenMRW);
                        var 
    vB getHL(nBarBtruenMRW);

                        
    addLineTool(LineTool.SEGMENTnBarXvHnBarAvH1Color.black"tag");
                        
    addLineTool(LineTool.SEGMENTnBarXvLnBarAvL1Color.black"tag");

                        var 
    v100 getExtension(vHvLvB1.00nMRW);
                        
                        
    addLineTool(LineTool.SEGMENTnBarBv100LINEMARGINv100,  2Color.blue"tag");
                        
    addText("1.0",      nBarBv100);
                        
                    }
                    
                }

            
            } else if(
    Math.abs(nMRW) == WAVE_B) {
            }




        }


        return;
        

    Matt Gundersen

    Comment


    • #3
      Here is the AutoEllipse EFS formula. This plots ellipses based off various elliott wave counts. In no way is this guaranteed to be right or wrong, just sample code showing you you might do it.

      YOU NEED BUILD 566 or later for this to work and you need to have the Advanced GET studies as part of your subscription.

      PHP Code:
      function preMain() {
          
      setStudyTitle("Auto Ellipse");
          
      setPriceStudy(true);
      }

      var 
      elliott = new GetElliottStudy(3000505350);

      var 
      nLastMRW        null// Last Most Recent Wave (used for reloading)
      var nLastMRWIndex   null;
      var 
      arWaves            = new Array();
      var 
      arWaveBar        = new Array();
      var 
      bEllipsesDrawn    false;
      var 
      dLastMRWHigh    null;
      var 
      dLastMRWLow        null;


      function 
      initWaves() {
          
      clearLineTool(LineTool.ELLIPSE);
          
          
      arWaves.length        0;
          
      arWaveBar.length    0;
          
      bEllipsesDrawn        false;
      }

      function 
      dumpWaves() {
          
      debugPrintln("Dumping Waves");
          var 
      i;
          for(
      0arWaveBar.lengthi++) {
              
      debugPrintln("    Wave[" "]" arWaves[i] + " Index: " arWaveBar[i]);
          }
      }

      var 
      WAVE_A            7
      var WAVE_B            8
      var WAVE_C            9

      var WAVENOTFOUND    1// this is a bar index

      function isABC(nWave) {
          
      nWave Math.abs(nWave);
          if(
      nWave == || nWave == || nWave == 9)
              return 
      true;
          return 
      false;
      }



      function 
      findPriorWave(nWave) {
          var 
      i;

          if(
      arWaves.length == 0)
              return 
      WAVENOTFOUND;

          var 
      nStart arWaves.length-1;
          
      nStart--;
          for(
      nStart>= 0i--) {
              var 
      nWaveBar Math.abs(arWaves[i]);

              
      // If a 4 stop searching
              
      if(nWaveBar == || nWaveBar == WAVE_A || nWaveBar == WAVE_B)
                  return 
      WAVENOTFOUND;

              if(
      nWaveBar == nWave)
                  return 
      arWaveBar[i];
          }    

          return 
      WAVENOTFOUND;
      }

      function 
      findPriorWaveABC(nWave) {
          var 
      i;

          if(
      arWaves.length == 0)
              return 
      WAVENOTFOUND;

          var 
      nStart arWaves.length-1;
          for(
      nStart>= 0i--) {
              var 
      nWaveBar Math.abs(arWaves[i]);

              
      // If a 4 stop searching
              
      if(nWaveBar <= 5)
                  return 
      WAVENOTFOUND;

              if(
      nWave == WAVE_C && nWaveBar WAVE_C)
                  return 
      WAVENOTFOUND;

              if(
      nWave == WAVE_B && nWaveBar WAVE_B)
                  return 
      WAVENOTFOUND;

              if(
      nWaveBar == nWave)
                  return 
      arWaveBar[i];
          }    

          return 
      WAVENOTFOUND;
      }


      function 
      findCurrentWave(nWave) {
          if(
      arWaves.length == 0)
              return 
      WAVENOTFOUND;

          var 
      nStart arWaves.length-1;
          var 
      nWaveBar Math.abs(arWaves[nStart]);

          if(
      nWaveBar == nWave)
              return 
      arWaveBar[nStart];

          return 
      WAVENOTFOUND;
      }


      function 
      findOnePriorWave(nWave) {
          if(
      arWaves.length 2)
              return 
      WAVENOTFOUND;

          var 
      nStart arWaves.length-1;
          var 
      nWaveBar Math.abs(arWaves[nStart-1]);

          if(
      nWaveBar == nWave)
              return 
      arWaveBar[nStart-1];

          return 
      WAVENOTFOUND;
      }


      function 
      FormatSI() {
          return 
      getSymbol() + "," getInterval();
      }



      function 
      main() {
          
      // What's the most recent wave?  If it has changed since last remembered, reload the EFS.
          
      var nMRW elliott.getValue(GetElliottStudy.MOSTRECENTWAVE);
          var 
      nMRWIndex elliott.getValue(GetElliottStudy.MOSTRECENTWAVEBARINDEX);

          if(
      getCurrentBarIndex() == 0) {
              if(
      nLastMRW == null) {
                  if(
      nMRWIndex != null) {
                      
      nLastMRW nMRW;
                      
      nLastMRWIndex nMRWIndex;
                      
      dLastMRWHigh high(nMRWIndex);
                      
      dLastMRWLow low(nMRWIndex);
                  }

              } else if(
      nLastMRW != nMRW || nMRWIndex nLastMRWIndex || low(nMRWIndex) != dLastMRWLow || high(nMRWIndex) != dLastMRWHigh) {
                  
      nLastMRW null;
                  
      nLastMRWIndex null;
                  
      dLastMRWHigh null;    
                  
      dLastMRWLow null;

                  
      // Alert.playSound("krtechop.wav");
                  
      Alert.playSound("Pairing.wav");
                  
      Alert.addToList(FormatSI(), "Elliott Wave Change");
                  
      reloadEFS();
                  return;
              } else {
                  
      nLastMRWIndex nMRWIndex;
                  
      dLastMRWHigh high(nMRWIndex);
                  
      dLastMRWLow low(nMRWIndex);
              }
          }    



          var 
      nBarState getBarState();
          
      // If ALLBARS, init the wave arrays and vars.
          // If newbar, shift the bar indexes
          
      if(nBarState == BARSTATE_ALLBARS) {
              
      initWaves();
          } else if(
      nBarState == BARSTATE_NEWBAR) {
              
      // Get the current wave for a specific bar and add the wave and bar to the arrays
              
      var nWave elliott.getValue(GetElliottStudy.WAVE);
              if(
      nWave != null) {
                  
      arWaves.push(nWave);
                  
      arWaveBar.push(getCurrentBarIndex());
              }

          }


          
      // If on the most recent bar and the ellipses haven't been drawn, search for them
          // and draw them.
          // Should the MRW change, a reload will occur and this will re-execute.
          
      if(bEllipsesDrawn == false && getCurrentBarIndex() == 0) {
              
      bEllipsesDrawn true;

              
      // debugPrintln("---- CurWave: " + nMRW);
              // dumpWaves();

              
      if(Math.abs(nMRW) == 4) {
                  
      // If in a W4, do W2/W3, and W5/W3.
                  
      var nBar4 findCurrentWave(4);
                  var 
      nBar2 findPriorWave(2);
                  var 
      nBar3 findPriorWave(3);

                  var 
      nBar5 findPriorWave(5);
                  var 
      nBarC findPriorWave(WAVE_C);

                  
      // debugPrintln("Bar2: " + nBar2);
                  // debugPrintln("Bar3: " + nBar3);
                  // debugPrintln("Bar5: " + nBar5);
                  // debugPrintln("BarC: " + nBarC);

                  
      if(nBar5 != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar5nBar3"5/3");
                  } else if(
      nBarC != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBarCnBar3"C/3");
                  }

                  if(
      nBar2 != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar2nBar3"2/3");
                  }
                  
                  if(
      nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar3nBar4"3/4");
                  }


              } else if(
      Math.abs(nMRW) == 3) {
                  
      // If in a W4, do W2/W3, and W5/W3.
                  
      var nBar3 findCurrentWave(3);
                  var 
      nBar2 findPriorWave(2);

                  var 
      nBar5 findPriorWave(5);
                  var 
      nBarC findPriorWave(WAVE_C);

                  
      // debugPrintln("Bar2: " + nBar2);
                  // debugPrintln("Bar3: " + nBar3);
                  // debugPrintln("Bar5: " + nBar5);
                  // debugPrintln("BarC: " + nBarC);

                  
      if(nBar5 != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar5nBar3"5/3");
                  } else if(
      nBarC != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBarCnBar3"C/3");
                  }

                  if(
      nBar2 != WAVENOTFOUND && nBar3 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar2nBar3"2/3");
                  }


              } else if(
      Math.abs(nMRW) == WAVE_C) {
                  
      // If in a C, A/B, B/C
                  
      var nBarA findPriorWaveABC(WAVE_A);
                  var 
      nBarB findPriorWaveABC(WAVE_B);
                  var 
      nBarC findCurrentWave(WAVE_C);
                  var 
      nBar4 findOnePriorWave(4);

                  
      // debugPrintln("BarA: " + nBarA);
                  // debugPrintln("BarB: " + nBarB);
                  // debugPrintln("BarC: " + nBarC);
                  // debugPrintln("Bar4: " + nBar4);

                  
      if(nBar4 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar4nBarC"4/C");
                      
      // 4->C (aka 4->5)
                  
      } else if(nBarA != WAVENOTFOUND && nBarB != WAVENOTFOUND) {
                      
      // If BarB is WAVENOTFOUND then B & C are on the same bar.
                      
      addLineTool(LineTool.ELLIPSEnBarAnBarB"A/B");
                      
      addLineTool(LineTool.ELLIPSEnBarBnBarC"B/C");
                  }

              } else if(
      Math.abs(nMRW) == 5) {
                  
      // projecting the W3?

                  // If in a W5, W4/W5
                  
      var nBar4 findOnePriorWave(4);
                  var 
      nBar5 findCurrentWave(5);

                  if(
      nBar4 != WAVENOTFOUND) {
                      
      addLineTool(LineTool.ELLIPSEnBar4nBar5"4/5");
                  }

                  
      // debugPrintln("Bar4: " + nBar4);
                  // debugPrintln("Bar5: " + nBar5);


              
      }




          }


          return;
          

      Matt Gundersen

      Comment


      • #4
        Matt thank you for the studies and I have two requests for your consideration.

        Would it be possible to have an autofib study that just caluclates off todays high and low. Then a second one that calculates off maybe the highest high and lowest low of last two days.

        Also, this may be harder, is there a way to have a fib study where you would say this is a study for a short so you start the pointer at the swing high and then bring it down to the swing low and then here is the cool part could you have it redraw the lines every time a new low was made. Of course you would want it to work the opposite way for longs.

        Thanks again for the other auto get studies

        John
        Last edited by corone; 04-05-2003, 08:21 AM.

        Comment


        • #5
          Hello

          i search efs code for Auto Typ 1 & 2 (buy ,sell) i have make for typ 1

          z.b Trading System Type 1 von Tom Joseph's

          Signal BUY = folgene Bedingungen

          1. Wave 4 UP (eine Elliott Welle 4 nach oben)
          2. PTI > 35 (PTI Wert muss grösser als 35 sein)
          3. OSC <= 0 (Elliott Oscillator muss kleiner oder gleich 0 sein)


          Signal SELL = folgene Bedingungen

          1. Wave 4 DOWN (eine Elliott Welle 4 nach unten )
          2. PTI > 35 (PTI Wert muss grösser als 35 sein)
          3. OSC >= 0 (Elliott Oscillator muss grösser oder gleich 0 sein)

          EFS Funktionen

          1.Wave 4
          erstellen der Elliott Studie
          GetElliottStudy(nNumBars, nPct4Overlap, nPct1LenOf3, nMavg1, nMavg2, Alternate)
          Beispiel : var elliott = new GetElliottStudy(300, 0, 50, 5, 35, 0);

          erkennen der Welle 4
          var welle = elliott.getValue(GetElliottStudy.WAVE);
          +4 = UP Welle 4
          -4 = DOWN Welle 4

          2.PTI
          erkennen des PTI Werts
          var pti=elliott.getValue(GetElliottStudy.PTI);

          3.OSC
          erstellen der OSC Studie
          GetOscStudy(nMavg1, nMavg2, Strength)
          Beispiel: var osc = new GetOscStudy(5, 35, 100);

          erkennen des OSC Werts
          var osc= osc.getValue(GetOscStudy.OSC);

          can you me help ?

          Thanks

          Comment


          • #6
            EFS?

            What is EFS? It appears you are writing PHP code to automate GET.

            I have GET EOD... is this available to me?

            Comment


            • #7
              Hallo

              EFS ist ist eine Programmiersprache in eSignal damit kann man Scripte programmieren

              PhP is only for auto color code


              here normal

              var LINEMARGIN = 5;

              here php

              PHP Code:
              var LINEMARGIN            5
              MfG
              Last edited by finger2; 10-03-2003, 03:19 PM.

              Comment


              • #8
                Darin
                EFS is the eSignal Formula Script which is the programming language used in the eSignal application.
                It is not available in any of the AdvancedGET stand alone applications.
                As finger2 shows in his example the PHP code is used in the Bulletin Board only to provide syntax highlighting of a script.
                Alex

                Comment


                • #9
                  Hello

                  i search efs code for Auto Typ 1 & 2 (buy ,sell) i have make for typ 1

                  z.b Trading System Type 1 von Tom Joseph's

                  Signal BUY = folgene Bedingungen

                  1. Wave 4 UP (eine Elliott Welle 4 nach oben)
                  2. PTI > 35 (PTI Wert muss grösser als 35 sein)
                  3. OSC <= 0 (Elliott Oscillator muss kleiner oder gleich 0 sein)


                  Signal SELL = folgene Bedingungen

                  1. Wave 4 DOWN (eine Elliott Welle 4 nach unten )
                  2. PTI > 35 (PTI Wert muss grösser als 35 sein)
                  3. OSC >= 0 (Elliott Oscillator muss grösser oder gleich 0 sein)
                  Finger

                  If your condition [3] has not a limit you'll have a signal even when the Tom's Osc goes >1.40.
                  That signal will be incorrect because you are NOT at the end of a 4 WELLE.
                  My suggestion is - basically- to point out its appropriate flexibility: in others words its range, having a pullback from 0.90 to 1.40.
                  Fabrizio L. Jorio Fili

                  Comment


                  • #10
                    Hi All

                    Am I missing something or has finger successfully coded Advanced Get type 1 and 2 trades.

                    Regards

                    Mike

                    Comment

                    Working...
                    X