Announcement

Collapse
No announcement yet.

pivot & macd alert

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

  • pivot & macd alert

    Hello Jason

    I am using macd(alerts).efs and pivotpointsall2.efs and getting alerts for both crossover separately. Will it be possible to combine both studies and get alerts on some conditions.

    For example I would like to get alert on PP/S1/R1 crossover only if MACD of Daily and 60 mnts. of that particular Charts is above.

    As I have no exposure in efs, please give me the code if its possible.

    Thanks

    Askar

  • #2
    Hello Askar,

    What you are asking is possible in EFS. However, the EFS Studies forum is for eSignal users who need assistance with specific coding questions and guidance while in the process of developing their own formulas. We do not have the development resources to offer a custom development service. You may want to review our Posting Guidelines for this forum as well as our Custom EFS Development Policy.

    In order for you to accomplish your custom formula needs, I would encourage you to begin learning how to code with EFS. I would recommend starting with the help guides and tutorials in the EFS KnowledgeBase. If you need to learn more about the basics of JavaScript, which is the foundation of EFS, please review the complete list of resources below my signature. You can also find the complete Guide to Core JavaScript in the EFS KB.

    As you begin writing your own formulas and run into specific questions, post the code you are working on and specific details to this forum so that I or someone will be able to help provide specific guidance and suggestions to assist you through the learning process.

    If you are not interested in learning EFS, please review the following FAQ: How can I get my custom study built?
    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


    • #3
      Hi Jason

      Thanks for your reply and guidance. I will try to learn and accomplish my requirements.

      Askar

      Comment


      • #4
        Hi Jason

        As guided by you I have learned some basics of efs and modified pivotpointsall2.efs to meet my requirement. My idea is to get alert when the price is about to cross the previous day's High with the following additional conditions.

        Previous Day's High should be > Day's High
        Current Price + (Current Price*.007) > Previous Day's High

        I tried with my little knowledge but could not get the alert as specified. I have also attached the modified .efs file for your perusal. Please help me out.

        Regards,
        Askar
        Attached Files

        Comment


        • #5
          Hello Askar,

          The syntax for the condition you've coded appears to be the condition you've described in your post. From what I can see it is being evaluated and does find the condition to be true. However, the condition is very restrictive so it will not occur very often on historical bars. I ran a test on 30 days of 60min INTC and it found only 8 bars where the condition was true. In real time, on a tick-by-tick basis the alert should happen more frequently if the price trades into the range defined by the condition.



          To test your code to see if conditions are ever being triggered can be done by adding a debugPrintln() statement inside the conditional block.

          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
            Hello Askar,

            What Instrument are you trading?

            Have you tried settings with futures?

            I'm assuming you use the DeMark setting?

            Thanks in advance...

            Kirk
            Last edited by zeller4; 10-23-2007, 10:41 AM.

            Comment


            • #7
              Hi Jason

              Thanks a lot. Yes you are right altert triggers often while the price trading at the specified range. I am trying to figureout whether I can set alert only once per symbol. will it be possible? will be glad to see any such sample file if available, where some global varialble assigned externally which can evaluated in this condition.

              Regards,
              Askar

              Comment


              • #8
                Hi Kirk

                I am trading in equties NSE (india). I have not tried with futures. I am only a beginner and have no idea about DeMark setting. If you have any high probable intraday setup please do let me know.

                Regards
                Askar

                Comment


                • #9
                  Hello Askar,

                  Originally posted by asker
                  Hi Jason

                  Thanks a lot. Yes you are right altert triggers often while the price trading at the specified range. I am trying to figureout whether I can set alert only once per symbol. will it be possible? will be glad to see any such sample file if available, where some global varialble assigned externally which can evaluated in this condition.

                  Regards,
                  Askar
                  The formula will only generate alerts for the symbol that is used by the chart in which the formula is running. If you want the formula to only produce one alert you can add a global Boolean variable that is initially set to false. Also referred to as a flag.

                  PHP Code:
                  var bMyAlert false
                  In your formula condition, you will add a check for a false value of the flag to allow the condition to be evaluated. You may also want to add a check for bar index of 0 in the condition. Otherwise, the first historical instance of the alert be the only evaluation. I assume you want only the first real time (i.e. bar 0) alert.

                  PHP Code:
                  if (bMyAlert == false && getCurrentBarIndex() == &&  /* your condition */ ) }
                      
                  // execute this code when condition is true
                      
                  bMyAlert true;  //  set to true to prevent any more alerts

                  When the alert is triggered on the real time bar, set the Boolean flag to true. This will force the condition to evaluate to false and prevent any further alerts until you reload the formula or reset the value of bMyAlert somewhere else in your formula logic.


                  If instead you want to allow only one alert per bar, see the following formula example, AlertOncePerBar.efs. This follows a similar concept with the flag but resets the flag at the open of each new bar. This example shows you how to limit an alert to occur only once per bar.
                  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
                    Hi Jason

                    Thanks a lot.

                    Asker

                    Comment

                    Working...
                    X