Announcement

Collapse
No announcement yet.

Trigger/Alert.

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

  • Trigger/Alert.

    Hi,
    Below is efs formula:-

    function preMain() {
    setPriceStudy(true);
    setStudyTitle("bandraguy Key Reversal");
    setShowCursorLabel(false);
    setShowTitleParameters(false);
    }

    function main() {

    //If current bar high is higher than previous 5 bars high
    var condition1 = high(0)>Math.max(high(-1),high(-2),high(-3),high(-4),high(-5));

    // If current bar close, lower than previous 1 bar close
    var condition2 = close(0)<close(-1);

    //if both are true, draw round colored dot at the top of current bar
    if(condition1 && condition2){
    drawShape( Shape.CIRCLE, AboveBar1, Color.blue);
    }


    // If current bar low is lower than previous 5 bars low
    var condition3 = low(0)<Math.min(low(-1),low(-2),low(-3),low(-4),low(-5));

    // If current bar close, higher than previous 1 bar close
    var condition4 = close(0)>close(-1);

    //if both are true, draw round colored dot at the bottom of current bar
    if(condition3 && condition4){
    drawShape( Shape.CIRCLE, BelowBar1, Color.blue);
    }
    }
    .
    Can u help whenever a blue dot is triggered i want alert is to issued in the alert list (with sound if possible). how can i do that what should i add go get it
    thanks
    khawaja.
    Last edited by khawaja; 05-10-2010, 01:02 PM.

  • #2
    Here you go:
    Attached Files

    Comment


    • #3
      trigger/alert. pop-up

      Hi,
      Below is efs formula:-

      function preMain() {
      setPriceStudy(true);
      setStudyTitle("bandraguy Key Reversal");
      setShowCursorLabel(false);
      setShowTitleParameters(false);
      }

      function main() {

      //If current bar high is higher than previous 5 bars high
      var condition1 = high(0)>Math.max(high(-1),high(-2),high(-3),high(-4),high(-5));

      // If current bar close, lower than previous 1 bar close
      var condition2 = close(0)<close(-1);

      //if both are true, draw round colored dot at the top of current bar
      if(condition1 && condition2){
      drawShape( Shape.CIRCLE, AboveBar1, Color.blue);
      }


      // If current bar low is lower than previous 5 bars low
      var condition3 = low(0)<Math.min(low(-1),low(-2),low(-3),low(-4),low(-5));

      // If current bar close, higher than previous 1 bar close
      var condition4 = close(0)>close(-1);

      //if both are true, draw round colored dot at the bottom of current bar
      if(condition3 && condition4){
      drawShape( Shape.CIRCLE, BelowBar1, Color.blue);
      }
      }
      .
      __________________________
      Can u help whenever a blue dot is triggered i want alert is to issued in the alert list with sound. sound/alert should trigger only 1 time in the same bar without repeat of sound alert in the same bar, how can i do that what should i add go get it
      thanks
      khawaja.

      Comment


      • #4
        set trigger,alert

        Hi,
        Below is efs formula:-

        function preMain() {
        setPriceStudy(true);
        setStudyTitle("bandraguy Key Reversal");
        setShowCursorLabel(false);
        setShowTitleParameters(false);
        }

        function main() {

        //If current bar high is higher than previous 5 bars high
        var condition1 = high(0)>Math.max(high(-1),high(-2),high(-3),high(-4),high(-5));

        // If current bar close, lower than previous 1 bar close
        var condition2 = close(0)<close(-1);

        //if both are true, draw round colored dot at the top of current bar
        if(condition1 && condition2){
        drawShape( Shape.CIRCLE, AboveBar1, Color.blue);
        }


        // If current bar low is lower than previous 5 bars low
        var condition3 = low(0)<Math.min(low(-1),low(-2),low(-3),low(-4),low(-5));

        // If current bar close, higher than previous 1 bar close
        var condition4 = close(0)>close(-1);

        //if both are true, draw round colored dot at the bottom of current bar
        if(condition3 && condition4){
        drawShape( Shape.CIRCLE, BelowBar1, Color.blue);
        }
        }
        .
        __________________________
        Can u help whenever a blue dot is triggered i want alert is to issued in the alert list with sound. sound/alert should trigger only 1 time in the same bar without repeat of sound alert in the same bar, how can i do that what should i add go get it
        thanks
        khawaja.

        Comment

        Working...
        X