Announcement

Collapse
No announcement yet.

Indicators not working properly

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

  • Indicators not working properly

    Hi,

    I am having a slight problem with the Bill Williams indicators I have programmed into eSignal. When the indicators are loaded onto a chart after market hours they generally work fine. During market hours on a chart of any time frame, the indicators do not work on the current price bar. As the price changes, the indicators change to the wrong color. Every once in a while, it will work correctly, but not very often. Hitting reload only helps for a few seconds, because as soon as the price changes, it changes the indicators to the wrong color. When the AO and AC are both red, the price bar should be red, when they are both green, the price bar should be green, when one is red and one is green, the price bar should be gray. The squat formula makes certain price bars blue. On the attached picture, you can see that the AO should be green, because it is higher than the previous bar. The AC is correct, so the price bar should be gray, not red. I will attach all of the formulas I am using in this post so that you can see if anything is wrong. Thanks for the help!

    Troy
    Attached Files

  • #2
    Since I cannot attach all of the formulas in one post, I will attach each one seperately. Thank you.
    Attached Files

    Comment


    • #3
      Here is is AC formula:
      Attached Files

      Comment


      • #4
        Here is the formula which colors each price bar the correct color:
        Attached Files

        Comment


        • #5
          Hello Troy,

          I believe the formulas below will solve your problem. The problem had to do with the order of process. The values for AO1 and AC1, which are supposed to be the last values of the previous bars, were being set to the first value of the current bar. You'll notice in the code that I made AO and AC global variables and moved the getBarState() routines to the top of main. At the instance of a new bar we need to set the AO1 and AC1 to the last value of the previous bar before we calculate the new values for AO and AC on the first iteration of the new bar. Test these out and let me know if they are working properly for you.

          ao-ac-squat2.efs
          ac.efs
          ao.efs
          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
            Hi Jason,

            Everything seems to be working just fine now. I really appreciate all of your help!

            Thank you,

            Troy

            Comment

            Working...
            X