Announcement

Collapse
No announcement yet.

EFS Help

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

  • EFS Help

    I am trying to write a study that updates only when a new high or low of the current bar is made. But the study keeps updating on every tick, which uses a lot of CPU. What is the syntax for a study to update only on a new high or new low of the current bar?

    Thanks in advance.

  • #2
    Try this...

    PHP Code:

    vClose 
    close();
    vHigh high();
    vLow low();

    // null check
    if (vClose == null || vHigh == null || vLow == null) return;

    if (
    vClose >= vHigh || vClose <= vLow) {
             
    // do something

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

    Comment


    • #3
      I think that code needs to be corrected..

      That code will do something when the high=close or low=close - not when a new high or low is formed.

      Here is how I would do it..

      PHP Code:

      // null check
      if (vClose == null || vHigh == null || vLow == null) return;

      if (
      close() > vLastHigh || close() < vlastLow ) {
               
      // do something - new high or low
      }

      vLastHigh high();
      vlastLow low(); 
      Brad Matheny
      eSignal Solution Provider since 2000

      Comment


      • #4
        JayF....

        Can you please email me privately. I have a request to make of you and part of it is to turn on my ability to send private messages on the BB. For some reason, I can't seem to do it - I think it is turned off.

        I have something else I would also like to show you.

        B
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment


        • #5
          Hello Brad,

          FYI, your PM mail box is full. I think you just need to delete some messages.
          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
            Thank you Jason, Brad

            Thank You Brad and Jason

            Comment

            Working...
            X