Announcement

Collapse
No announcement yet.

Specific point alarms

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

  • Specific point alarms

    Is there an ESF that allows you to set a specific point for alarm (i.e. the pivot point, or other points of support and resistance?) MK

  • #2
    Mark
    I don't know if there is an efs around that does that specific job but I don't think it would be very difficult to put one together especially if one uses an existing efs that calculate the S/R levels.
    Alex

    Comment


    • #3
      Please try this formula.

      PHP Code:
      /*
      Copyright © eSignal, 2003
      Title:        Alert at X
      Version:    1.0

      =============================================
      Fix History:


      =============================================
      Project Description:  

      This formula will provide an alert at a given price level.

      =============================================
      Notes:  
      Please note that the price level must be defined in the Edit Studies window
      before any alert is given.  If multiple alerts are needed, please create
      another instance of the formula.

      Once the alert is hit, the formula must be reloaded to reset the alert.

      */

      vInit false;
      var 
      PriceLevel null;
      var 
      vAlertTriggered false;

      function 
      preMain() {
          
          if (
      vInit == false) {
          
      setPriceStudy(true);
          
      setStudyTitle("Alert at X");
          
      setShowCursorLabel(false); 
          
          var 
      fp1 = new FunctionParameter("PriceLevel"FunctionParameter.NUMBER);

          var 
      fp1a = new FunctionParameter("HiLo"FunctionParameter.STRING);
          
      fp1a.setName("Alert Type?");
          
      fp1a.addOption("At_Or_Above");
          
      fp1a.addOption("At_Or_Below");
          
      fp1a.setDefault("At_Or_Above"); //Edit this value to set a new default    
          
          
      var fp2 = new FunctionParameter("Popup"FunctionParameter.BOOLEAN);
          
      fp2.setName("Pop-up Alert?");
          
      fp2.setDefault(true);
          
          var 
      fp3 = new FunctionParameter("Sound"FunctionParameter.BOOLEAN);
          
      fp3.setName("Sound Alert?");
          
      fp3.setDefault(true);
          
          var 
      fp4 = new FunctionParameter("Email"FunctionParameter.BOOLEAN);
          
      fp4.setName("Email Alert?");
          
      fp4.setDefault(false);
          
          
      vInit true;
          } else if (
      vInit == truesetStudyTitle("Alert at " PriceLevel);

      }

      function 
      main(PriceLevel,HiLo,Popup,Sound,Email) {

      if (
      PriceLevel == null || vAlertTriggered) return;

      if (
      HiLo == "At_Or_Above") {
          if (
      close() >= PriceLevel) {
              if (
      PopupAlert.addToList(getSymbol(), "ALERT: " getSymbol() + " >= " PriceLevel);
              if (
      SoundAlert.playSound(ding.wav);
              if (
      EmailAlert.email(getSymbol(), "ALERT: " getSymbol() + " >= " PriceLevel);
              
      vAlertTriggered true;
          }
      } else if (
      HiLo == "At_Or_Below") {
          if (
      close() <= PriceLevel) {
              if (
      PopupAlert.addToList(getSymbol(), "ALERT: " getSymbol() + " <= " PriceLevel);
              if (
      SoundAlert.playSound(ding.wav);
              if (
      EmailAlert.email(getSymbol(), "ALERT: " getSymbol() + " <= " PriceLevel);
              
      vAlertTriggered true;
          }
      }

      return;

      Attached Files
      Regards,
      Jay F.
      Product Manager
      _____________________________________
      Have a suggestion to improve our products?
      Click Support --> Request a Feature in eSignal 11

      Comment


      • #4
        Syntax error

        hello JayF

        When I run your formula and insert a price I get the following message:

        line 68: ReferenceError: ding is not defined.

        Can you help me define that particular ding alarm?

        Cheers

        Carlton

        Comment


        • #5
          Hello Carlton,

          I made some minor changes to this formula. It should work for you now. The sound file names need to be strings. That was the main problem. I also added some logic to allow only one alert per bar. Let me know if this helps.
          Attached Files
          Jason K.
          Project Manager
          eSignal - an Interactive Data company

          EFS KnowledgeBase
          JavaScript for EFS Video Series
          EFS Beginner Tutorial Series
          EFS Glossary
          Custom EFS Development Policy

          New User Orientation

          Comment


          • #6
            JayF,

            This works just fine.

            Cheers mate..

            Carlton

            Comment


            • #7
              Hello JayF,

              You may recall compiling the script below for me a while back. I was wondering if its possible to tweak the script to alert me when the highest high as been either reached or exceeded?

              Thank you

              Carlton

              Comment


              • #8
                Hi JayF,

                Would it be possible to make this Alert at X EFS automatically inherit its alert value from another efs value? Specifically I'm wondering if it would be possible to have an auto-alert generated that sounded when a Support or Resistance level generated from a Pivots EFS was broken. Right now of course I can instance your script multiple times manually for each day's pivots, but I was just curious to know if this could somehow be automated.

                Thanks for the help!

                Jonathan

                Comment


                • #9
                  Hello Jonathan,

                  This is possible. What you would need to do is incorporate the setGlobalValue( varname, value ) function into the pivot EFS to pass some value or true/false to the global space. Then in your alert formula, use getGlobalValue( varname ) to detect the event and trigger the alert.
                  Jason K.
                  Project Manager
                  eSignal - an Interactive Data company

                  EFS KnowledgeBase
                  JavaScript for EFS Video Series
                  EFS Beginner Tutorial Series
                  EFS Glossary
                  Custom EFS Development Policy

                  New User Orientation

                  Comment


                  • #10
                    If using eSignal build 723 (or later) download the attached revision of alert at x.efs which includes the changes required by the FunctionParameter BOOLEAN fix
                    Alex
                    Attached Files

                    Comment


                    • #11
                      Alex,
                      Thank you very much. This is exactly what I was looking for. I appreciate all your help, not just with this question, but the previous ones all.


                      -Nick
                      " If a man didn't make mistakes he'd own the world in a month. But if he didn't profit from his mistakes, he wouldn't own a blessed thing."
                      -Jesse Livermore

                      Comment


                      • #12
                        Nick
                        As far as I can see it is working properly when set to At_or_Above
                        Alex




                        Originally posted by Trader273
                        Alex,
                        I came across a small problem that you might be able to help me with. The EFS that you directed me to works very well. The only problem that occurs is when I have the settings set to " At or Above" the designated price. When i have this set and the price exceeds my designated price i dont get an alarm. (ex. alert set at 2.75, at or above. Price is at 2.83, but no alert was generated. Don't understand this since when i have th settings set to "At or Below" it works to perfection. Any ideas??

                        thanks
                        -Nick

                        Comment


                        • #13
                          Alex,
                          Thanks. I was using candles instead of bars and that fixed the problem. Thats why I deleted my questiion, but you answered it faster then i could delete it. Thanks for the help though.


                          Nick
                          " If a man didn't make mistakes he'd own the world in a month. But if he didn't profit from his mistakes, he wouldn't own a blessed thing."
                          -Jesse Livermore

                          Comment


                          • #14
                            Nick
                            It will work also with candlesticks.
                            Alex

                            Originally posted by Trader273
                            Alex,
                            Thanks. I was using candles instead of bars and that fixed the problem. Thats why I deleted my questiion, but you answered it faster then i could delete it. Thanks for the help though.


                            Nick

                            Comment

                            Working...
                            X